clean all inactive plugin in the plugin rep wordpress
authorhurons@caf4f556-3d62-0410-8435-a86758001935
Tue, 05 Jan 2010 09:59:49 +0000
branchwordpress
changeset 112 fb7cd02b9848
parent 111 6b96085291d7
child 123 561aa6d282f6
clean all inactive plugin in the plugin rep
web/wp-content/plugins/add-to-facebook-plugin/addtofacebook.php
web/wp-content/plugins/add-to-facebook-plugin/facebook.css
web/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif
web/wp-content/plugins/add-to-facebook-plugin/readme.txt
web/wp-content/plugins/calendar/calendar.php
web/wp-content/plugins/calendar/calendar.pot
web/wp-content/plugins/calendar/javascript.js
web/wp-content/plugins/calendar/readme.txt
web/wp-content/plugins/calendar/screenshot-1.png
web/wp-content/plugins/calendar/screenshot-2.png
web/wp-content/plugins/calendar/screenshot-3.png
web/wp-content/plugins/calendar/screenshot-4.png
web/wp-content/plugins/calendar/screenshot-5.png
web/wp-content/plugins/future-posts-calendar/future_calendar.php
web/wp-content/plugins/future-posts-calendar/readme.txt
web/wp-content/plugins/ggis-subscribe/ggis-subscribe.php
web/wp-content/plugins/ggis-subscribe/readme.txt
web/wp-content/plugins/ggis-subscribe/screen1.png
web/wp-content/plugins/ggis-subscribe/screen2.png
web/wp-content/plugins/gigs-calendar/ajaxSetup.php
web/wp-content/plugins/gigs-calendar/archive.ajax.php
web/wp-content/plugins/gigs-calendar/credits.ajax.php
web/wp-content/plugins/gigs-calendar/feedback.ajax.php
web/wp-content/plugins/gigs-calendar/gigs-calendar-admin-wp2.5.css
web/wp-content/plugins/gigs-calendar/gigs-calendar-admin.css
web/wp-content/plugins/gigs-calendar/gigs-calendar.php
web/wp-content/plugins/gigs-calendar/gigs-calendar.pot
web/wp-content/plugins/gigs-calendar/gigs-classes.php
web/wp-content/plugins/gigs-calendar/gigs.ajax.php
web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-de_DE.mo
web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-es_ES.mo
web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-fi_FI.mo
web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-fr_FR.mo
web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-it_IT.mo
web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-nl_NL.mo
web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-zh_CN.mo
web/wp-content/plugins/gigs-calendar/images/add.png
web/wp-content/plugins/gigs-calendar/images/ajax-loader.gif
web/wp-content/plugins/gigs-calendar/images/cancel.png
web/wp-content/plugins/gigs-calendar/images/delete.png
web/wp-content/plugins/gigs-calendar/images/disk.png
web/wp-content/plugins/gigs-calendar/images/feed-icon.png
web/wp-content/plugins/gigs-calendar/images/help.png
web/wp-content/plugins/gigs-calendar/images/link.png
web/wp-content/plugins/gigs-calendar/images/minus.gif
web/wp-content/plugins/gigs-calendar/images/money_dollar.png
web/wp-content/plugins/gigs-calendar/images/page_edit.png
web/wp-content/plugins/gigs-calendar/images/page_white_edit.png
web/wp-content/plugins/gigs-calendar/images/page_white_magnify.png
web/wp-content/plugins/gigs-calendar/images/plus.gif
web/wp-content/plugins/gigs-calendar/images/shape_square.png
web/wp-content/plugins/gigs-calendar/images/small-ajax-indicator.gif
web/wp-content/plugins/gigs-calendar/images/world.png
web/wp-content/plugins/gigs-calendar/js/jquery.form.js
web/wp-content/plugins/gigs-calendar/js/jquery.js
web/wp-content/plugins/gigs-calendar/js/jquery.tooltip.css
web/wp-content/plugins/gigs-calendar/js/jquery.tooltip.min.js
web/wp-content/plugins/gigs-calendar/js/ui.core.js
web/wp-content/plugins/gigs-calendar/js/ui.datepicker.css
web/wp-content/plugins/gigs-calendar/js/ui.datepicker.min.js
web/wp-content/plugins/gigs-calendar/js/ui.sortable.js
web/wp-content/plugins/gigs-calendar/readme.txt
web/wp-content/plugins/gigs-calendar/rss.php
web/wp-content/plugins/gigs-calendar/settings.ajax.php
web/wp-content/plugins/gigs-calendar/tables.sql
web/wp-content/plugins/gigs-calendar/templates/basic/attribution.php
web/wp-content/plugins/gigs-calendar/templates/basic/gig-post.php
web/wp-content/plugins/gigs-calendar/templates/basic/gigs-list.php
web/wp-content/plugins/gigs-calendar/templates/basic/next-widget.php
web/wp-content/plugins/gigs-calendar/templates/basic/rss.php
web/wp-content/plugins/gigs-calendar/templates/basic/style.css
web/wp-content/plugins/gigs-calendar/templates/basic/upcoming-widget.php
web/wp-content/plugins/gigs-calendar/templates/readme-first.txt
web/wp-content/plugins/gigs-calendar/tours.ajax.php
web/wp-content/plugins/gigs-calendar/venues.ajax.php
web/wp-content/plugins/gigs-calendar/version.php
--- a/web/wp-content/plugins/add-to-facebook-plugin/addtofacebook.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-<?php
-/*
-Plugin Name: Add To Facebook
-Version: 1.4.3
-Plugin URI: http://nothing.golddave.com/?page_id=108
-Description: Adds a footer link to add the current post or page to a Facebook Mini-Feed.
-Author: David Goldstein
-Author URI: http://nothing.golddave.com/
-*/
-
-/*
-Change Log
-
-1.4.3
-  * Improved option saving mechanism to avoid conflicts with other plugins.
-  
-1.4.2
-  * Added a title specs to the links.
-
-1.4.1
-  * Added slashes at end of image tags per XHTML specification.
-
-1.4
-  * Added CSS.
-  * Fixed bug that prevented the Facebook icon to appear in version 1.3.
-
-1.3
-  * Links now open in a new tab/window.
-
-1.2
-  * Added option to use a template tag.
-  * Fixed bug that prevented the Facebook icon to appear in version 1.1.
-
-1.1
-  * Added options page to choose between text/image links.
-
-1.0
-  * First public release.
-*/ 
-
-function add_to_facebook($data){
-	global $post;
-	$current_options = get_option('add_to_facebook_options');
-	$linktype = $current_options['link_type'];
-	switch ($linktype) {
-		case "text":
-			$data=$data."<p class=\"facebook\"><a href=\"http://www.facebook.com/share.php?u=".get_permalink($post->ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook</a></p>";
-			break;
-		case "image":
-			$data=$data."<p class=\"facebook\"><a href=\"http://www.facebook.com/share.php?u=".get_permalink($post->ID)."\" target=\"_blank\"><img src=\"".get_bloginfo(wpurl)."/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif\" alt=\"Share on Facebook\" title=\"Share on Facebook\" /></a></p>";
-			break;
-		case "both":
-			$data=$data."<p class=\"facebook\"><a href=\"http://www.facebook.com/share.php?u=".get_permalink($post->ID)."\" target=\"_blank\"><img src=\"".get_bloginfo(wpurl)."/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif\" alt=\"Share on Facebook\" title=\"Share on Facebook\" /></a><a href=\"http://www.facebook.com/share.php?u=".get_permalink($post->ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook</a></p>";
-			break;
-		}
-		return $data;
-}
-
-function activate_add_to_facebook(){
-	global $post;
-	$current_options = get_option('add_to_facebook_options');
-	$insertiontype = $current_options['insertion_type'];
-	if ($insertiontype != 'template'){
-		add_filter('the_content', 'add_to_facebook', 10);
-		add_filter('the_excerpt', 'add_to_facebook', 10);
-	}
-}
-
-activate_add_to_facebook();
-
-function addtofacebook(){
-	global $post;
-	$current_options = get_option('add_to_facebook_options');
-	$insertiontype = $current_options['insertion_type'];
-	if ($insertiontype != 'auto'){
-		$linktype = $current_options['link_type'];
-		switch ($linktype) {
-			case "text":
-				echo "<p class=\"facebook\"><a href=\"http://www.facebook.com/share.php?u=".get_permalink($post->ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook</a></p>";
-				break;
-			case "image":
-				echo "<p class=\"facebook\"><a href=\"http://www.facebook.com/share.php?u=".get_permalink($post->ID)."\" target=\"_blank\"><img src=\"".get_bloginfo(wpurl)."/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif\" alt=\"Share on Facebook\" title=\"Share on Facebook\" /></a></p>";
-				break;
-			case "both":
-				echo "<p class=\"facebook\"><a href=\"http://www.facebook.com/share.php?u=".get_permalink($post->ID)."\" target=\"_blank\"><img src=\"".get_bloginfo(wpurl)."/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif\" alt=\"Share on Facebook\" title=\"Share on Facebook\" /></a><a href=\"http://www.facebook.com/share.php?u=".get_permalink($post->ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook</a></p>";
-				break;
-			}
-		}
-}
-
-// Create the options page
-function add_to_facebook_options_page() { 
-	$current_options = get_option('add_to_facebook_options');
-	$link = $current_options["link_type"];
-	$insert = $current_options["insertion_type"];
-	if ($_POST['action']){ ?>
-		<div id="message" class="updated fade"><p><strong>Options saved.</strong></p></div>
-	<?php } ?>
-	<div class="wrap" id="add-to-facebook-options">
-		<h2>Add to Facebook Options</h2>
-		
-		<form method="post" action="<?php echo $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; ?>">
-			<fieldset>
-				<legend>Options:</legend>
-				<input type="hidden" name="action" value="save_add_to_facebook_options" />
-				<table width="100%" cellspacing="2" cellpadding="5" class="editform">
-					<tr>
-						<th valign="top" scope="row"><label for="link_type">Link Type:</label></th>
-						<td><select name="link_type">
-						<option value ="text"<?php if ($link == "text") { print " selected"; } ?>>Text Only</option>
-						<option value ="image"<?php if ($link == "image") { print " selected"; } ?>>Image Only</option>
-						<option value ="both"<?php if ($link == "both") { print " selected"; } ?>>Image and Text</option>
-						</select></td>
-					</tr>
-					<tr>
-						<th valign="top" scope="row"><label for="insertion_type">Insertion Type:</label></th>
-						<td><select name="insertion_type">
-						<option value ="auto"<?php if ($insert == "auto") { print " selected"; } ?>>Auto</option>
-						<option value ="template"<?php if ($insert == "template") { print " selected"; } ?>>Template</option>
-						</select></td>
-					</tr>
-				</table>
-			</fieldset>
-			<p class="submit">
-				<input type="submit" name="Submit" value="Update Options &raquo;" />
-			</p>
-		</form>
-	</div>
-<?php 
-}
-
-function add_to_facebook_add_options_page() {
-	// Add a new menu under Options:
-	add_options_page('Add to Facebook', 'Add to Facebook', 10, __FILE__, 'add_to_facebook_options_page');
-}
-
-function add_to_facebook_save_options() {
-	// create array
-	$add_to_facebook_options["link_type"] = $_POST["link_type"];
-	$add_to_facebook_options["insertion_type"] = $_POST["insertion_type"];
-	
-	update_option('add_to_facebook_options', $add_to_facebook_options);
-	$options_saved = true;
-}
-
-add_action('admin_menu', 'add_to_facebook_add_options_page');
-
-if (!get_option('add_to_facebook_options')){
-	// create default options
-	$add_to_facebook_options["link_type"] = 'text';
-	$add_to_facebook_options["insertion_type"] = 'auto';
-	
-	update_option('add_to_facebook_options', $add_to_facebook_options);
-}
-
-if ($_POST['action'] == 'save_add_to_facebook_options'){
-	add_to_facebook_save_options();
-}
-
-function facebookcss() {
-	?>
-	<link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-content/plugins/add-to-facebook-plugin/facebook.css" type="text/css" media="screen" />
-	<?php
-}
-
-add_action('wp_head', 'facebookcss');
-?>
\ No newline at end of file
--- a/web/wp-content/plugins/add-to-facebook-plugin/facebook.css	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-p.facebook a {
-	text-decoration: none;
-	font-style: italic;
-	color: #666;
-	font-size:12px;
-}
-
-p.facebook a:hover {
-	text-decoration: underline;
-}
-
-
-p.facebook img {
-	margin: 1px 5px 0 0;
-}
\ No newline at end of file
Binary file web/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif has changed
--- a/web/wp-content/plugins/add-to-facebook-plugin/readme.txt	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-=== Plugin Name ===
-Contributors: David Goldstein
-Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3396118
-Tags: facebook
-Requires at least: 2.0
-Tested up to: 2.7
-Stable tag: trunk
-
-This plugin adds a footer link to add the current post or page to a Facebook Mini-Feed.
-
-== Description ==
-This plugin adds a footer link to add the current post or page to a Facebook Mini-Feed.  While the plugin is activated a link will appear after the content of the post with the text "Share on Facebook" or the Facebook icon or both. Clicking this link will bring the user to the Facebook site.  If the user isn't logged in they will be prompted to do so. Once logged into Facebook the post will be added to the Mini-Feed of the account.
-
-== Installation ==
-1. Add a directory called 'add-to-facebook-plugin' (without the quotes) to your '/wp-content/plugins/' directory.
-1. Upload addtofacebook.php and facebook_share_icon.gif to the '/wp-content/plugins/add-to-facebook-plugin/' directory.
-1. Activate the plugin through the 'Plugins' menu in WordPress.
-1. Go to 'Options->Add to Facebook' in your admin interface to select you options.
-
-== CSS ==
-The CSS for this plugin is found in the included facebook.css file.  This file may be edited to change the style of the link.
-
-== Options ==
-There are two options on the options page: Link Type and Insertion Type.
-
-Link Type - This option sets if you want your Facebook link to be text, image or both.
-
-Insertion Type - This option sets how you want to insert the link into your posts/pages.  There are two choices: auto or template.
-
-* Auto - When insertion type is set to auto the Facebook link will automatically be inserted right after the post.
-* Template - When insertion type is set to template the Facebook link will appear wherever the template tag for the plugin is added to your theme. This option requires a template tag to be added to your theme.
-
-== Template Tag ==
-The following template tag must be added to your theme in the location you want the link to appear when insertion type is set to template:
-
-`<?php if(function_exists(addtofacebook)) : addtofacebook(); endif; ?>`
\ No newline at end of file
--- a/web/wp-content/plugins/calendar/calendar.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2712 +0,0 @@
-<?php
-/*
-Plugin Name: Calendar
-Plugin URI: http://www.kieranoshea.com
-Description: This plugin allows you to display a calendar of all your events and appointments as a page on your site.
-Author: Kieran O'Shea
-Author URI: http://www.kieranoshea.com
-Version: 1.2.2
-*/
-
-/*  Copyright 2008  Kieran O'Shea  (email : kieran@kieranoshea.com)
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-// Enable internationalisation
-$plugin_dir = basename(dirname(__FILE__));
-load_plugin_textdomain( 'calendar','wp-content/plugins/'.$plugin_dir, $plugin_dir);
-
-// Define the tables used in Calendar
-define('WP_CALENDAR_TABLE', $table_prefix . 'calendar');
-define('WP_CALENDAR_CONFIG_TABLE', $table_prefix . 'calendar_config');
-define('WP_CALENDAR_CATEGORIES_TABLE', $table_prefix . 'calendar_categories');
-
-// Create a master category for Calendar and its sub-pages
-add_action('admin_menu', 'calendar_menu');
-
-// Enable the ability for the calendar to be loaded from pages
-add_filter('the_content','calendar_insert');
-
-// Add the function that puts style information in the header
-add_action('wp_head', 'calendar_wp_head');
-
-// Add the function that deals with deleted users
-add_action('delete_user', 'deal_with_deleted_user');
-
-// Add the widgets if we are using version 2.8
-add_action('widgets_init', 'widget_init_calendar_today');
-add_action('widgets_init', 'widget_init_calendar_upcoming');
-
-// Before we get on with the functions, we need to define the initial style used for Calendar
-
-// Function to deal with events posted by a user when that user is deleted
-function deal_with_deleted_user($id)
-{
-  global $wpdb;
-
-  // This wouldn't work unless the database was up to date. Lets check.
-  check_calendar();
-
-  // Do the query
-  $wpdb->get_results("UPDATE ".WP_CALENDAR_TABLE." SET event_author=".$wpdb->get_var("SELECT MIN(ID) FROM ".$wpdb->prefix."users",0,0)." WHERE event_author=".$id);
-}
-
-// Function to add the calendar style into the header
-function calendar_wp_head()
-{
-  global $wpdb;
-
-  // If the calendar isn't installed or upgraded this won't work
-  check_calendar();
-
-  $styles = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='calendar_style'");
-  if (!empty($styles))
-    {
-      foreach ($styles as $style)
-        {
-	  echo '<style type="text/css">
-<!--
-';
-          echo $style->config_value.'
-';
-	  echo '//-->
-</style>
-';
-        }
-    }
-}
-
-// Function to deal with adding the calendar menus
-function calendar_menu() 
-{
-  global $wpdb;
-
-  // We make use of the Calendar tables so we must have installed Calendar
-  check_calendar();
-
-  // Set admin as the only one who can use Calendar for security
-  $allowed_group = 'manage_options';
-
-  // Use the database to *potentially* override the above if allowed
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='can_manage_events'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-	{
-	  $allowed_group = $config->config_value;
-	}
-    }
-
-  // Add the admin panel pages for Calendar. Use permissions pulled from above
-   if (function_exists('add_menu_page')) 
-     {
-       add_menu_page(__('Calendar','calendar'), __('Calendar','calendar'), $allowed_group, 'calendar', 'edit_calendar');
-     }
-   if (function_exists('add_submenu_page')) 
-     {
-       add_submenu_page('calendar', __('Manage Calendar','calendar'), __('Manage Calendar','calendar'), $allowed_group, 'calendar', 'edit_calendar');
-       add_action( "admin_head", 'calendar_add_javascript' );
-       // Note only admin can change calendar options
-       add_submenu_page('calendar', __('Manage Categories','calendar'), __('Manage Categories','calendar'), 'manage_options', 'calendar-categories', 'manage_categories');
-       add_submenu_page('calendar', __('Calendar Config','calendar'), __('Calendar Options','calendar'), 'manage_options', 'calendar-config', 'edit_calendar_config');
-     }
-}
-
-// Function to add the javascript to the admin header
-function calendar_add_javascript()
-{ 
-  echo '<script type="text/javascript" src="';
-  bloginfo('wpurl');
-  echo '/wp-content/plugins/calendar/javascript.js"></script>
-<script type="text/javascript">document.write(getCalendarStyles());</script>
-';
-}
-
-// Function to deal with loading the calendar into pages
-function calendar_insert($content)
-{
-  if (preg_match('{CALENDAR}',$content))
-    {
-      $cal_output = calendar();
-      $content = str_replace('{CALENDAR}',$cal_output,$content);
-    }
-  return $content;
-}
-
-// Function to check what version of Calendar is installed and install if needed
-function check_calendar()
-{
-  // Checks to make sure Calendar is installed, if not it adds the default
-  // database tables and populates them with test data. If it is, then the 
-  // version is checked through various means and if it is not up to date 
-  // then it is upgraded.
-
-  // Lets see if this is first run and create us a table if it is!
-  global $wpdb, $initial_style;
-
-  // All this style info will go into the database on a new install
-  // This looks nice in the Kubrick theme
-  $initial_style = "    .calnk a:hover {
-         background-position:0 0;
-         text-decoration:none;  
-         color:#000000;
-         border-bottom:1px dotted #000000;
-         }
-    .calnk a:visited {
-         text-decoration:none;
-         color:#000000;
-         border-bottom:1px dotted #000000;
-        }
-    .calnk a {
-        text-decoration:none; 
-        color:#000000; 
-        border-bottom:1px dotted #000000;
-        }
-    .calnk a span { 
-        display:none; 
-        }
-    .calnk a:hover span {
-        color:#333333; 
-        background:#F6F79B; 
-        display:block;
-        position:absolute; 
-        margin-top:1px; 
-        padding:5px; 
-        width:150px; 
-        z-index:100;
-        }
-     .calendar-table {
-        border:none;
-        width:100%;
-     }
-     .calendar-heading {
-        height:25px;
-        text-align:center;
-        border:1px solid #D6DED5;
-        background-color:#E4EBE3;
-     }
-     .calendar-next {
-        width:25%;
-        text-align:center;
-     }
-     .calendar-prev {
-        width:25%;
-        text-align:center;
-     }
-     .calendar-month {
-        width:50%;
-        text-align:center;
-        font-weight:bold;
-     }
-     .normal-day-heading {
-        text-align:center;
-        width:25px;
-        height:25px;
-        font-size:0.8em;
-        border:1px solid #DFE6DE;
-        background-color:#EBF2EA;
-     }
-     .weekend-heading {
-        text-align:center;
-        width:25px;
-        height:25px;
-        font-size:0.8em;
-        border:1px solid #DFE6DE;
-        background-color:#EBF2EA;
-        color:#FF0000;
-     }
-     .day-with-date {
-        vertical-align:text-top;
-        text-align:left;
-        width:60px;
-        height:60px;
-        border:1px solid #DFE6DE;
-     }
-     .no-events {
-
-     }
-     .day-without-date {
-        width:60px;
-        height:60px;
-        border:1px solid #E9F0E8;
-     }
-     span.weekend {
-        color:#FF0000;
-     }
-     .current-day {
-        vertical-align:text-top;
-        text-align:left;
-        width:60px;
-        height:60px;
-        border:1px solid #BFBFBF;
-        background-color:#E4EBE3;
-     }
-     span.event {
-        font-size:0.75em;
-     }
-     .kjo-link {
-        font-size:0.75em;
-        text-align:center;
-     }
-     .event-title {
-        text-align:center;
-        font-weight:bold;
-        font-size:1.2em;
-     }
-     .event-title-break {
-        width:96%;
-        margin-left:2%;
-        margin-right:2%;
-        margin-top:5px;
-        margin-bottom:5px;
-        text-align:center;
-        height:1px;
-        background-color:#000000;
-     }
-     .event-content-break {
-        width:96%;
-        margin-left:2%;
-        margin-right:2%;
-        margin-top:5px;
-        margin-bottom:5px;
-        text-align:center;
-        height:1px;
-        background-color:#000000;
-     }
-     .calendar-date-switcher {
-        height:25px;
-        text-align:center;
-        border:1px solid #D6DED5;
-        background-color:#E4EBE3;
-     }
-     .calendar-date-switcher form {
-        margin:0;
-        padding:0;
-     }
-     .calendar-date-switcher input {
-        border:1px #D6DED5 solid;
-     }
-     .calendar-date-switcher select {
-        border:1px #D6DED5 solid;
-     }
-     .cat-key {
-        width:100%;
-        margin-top:10px;
-        padding:5px;
-        border:1px solid #D6DED5;
-     }";
-     
-
-  // Assume this is not a new install until we prove otherwise
-  $new_install = false;
-  $vone_point_one_upgrade = false;
-  $vone_point_two_beta_upgrade = false;
-
-  $wp_calendar_exists = false;
-  $wp_calendar_config_exists = false;
-  $wp_calendar_config_version_number_exists = false;
-
-  // Determine the calendar version
-  $tables = $wpdb->get_results("show tables;");
-  foreach ( $tables as $table )
-    {
-      foreach ( $table as $value )
-        {
-	  if ( $value == WP_CALENDAR_TABLE )
-	    {
-	      $wp_calendar_exists = true;
-	    }
-	  if ( $value == WP_CALENDAR_CONFIG_TABLE )
-            {
-              $wp_calendar_config_exists = true;
-              
-	      // We now try and find the calendar version number
-              // This will be a lot easier than finding other stuff 
-              // in the future.
-	      $version_number = $wpdb->get_var("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='calendar_version'"); 
-	      if ($version_number == "1.2")
-		{
-		  $wp_calendar_config_version_number_exists = true;
-		}
-            }
-        }
-    }
-
-  if ($wp_calendar_exists == false && $wp_calendar_config_exists == false)
-    {
-      $new_install = true;
-    }
-  else if ($wp_calendar_exists == true && $wp_calendar_config_exists == false)
-    {
-      $vone_point_one_upgrade = true;
-    }
-  else if ($wp_calendar_exists == true && $wp_calendar_config_exists == true && $wp_calendar_config_version_number_exists == false)
-    {
-      $vone_point_two_beta_upgrade = true;
-    }
-
-  // Now we've determined what the current install is or isn't 
-  // we perform operations according to the findings
-  if ( $new_install == true )
-    {
-      $sql = "CREATE TABLE " . WP_CALENDAR_TABLE . " (
-                                event_id INT(11) NOT NULL AUTO_INCREMENT ,
-                                event_begin DATE NOT NULL ,
-                                event_end DATE NOT NULL ,
-                                event_title VARCHAR(30) NOT NULL ,
-                                event_desc TEXT NOT NULL ,
-                                event_time TIME ,
-                                event_recur CHAR(1) ,
-                                event_repeats INT(3) ,
-                                event_author BIGINT(20) UNSIGNED,
-                                PRIMARY KEY (event_id)
-                        )";
-      $wpdb->get_results($sql);
-      $sql = "CREATE TABLE " . WP_CALENDAR_CONFIG_TABLE . " (
-                                config_item VARCHAR(30) NOT NULL ,
-                                config_value TEXT NOT NULL ,
-                                PRIMARY KEY (config_item)
-                        )";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='can_manage_events', config_value='edit_posts'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_style', config_value='".$initial_style."'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_author', config_value='false'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_jump', config_value='false'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_todays', config_value='true'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_upcoming', config_value='true'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_upcoming_days', config_value=7";
-      $wpdb->get_results($sql);
-
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_version', config_value='1.2'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='enable_categories', config_value='false'";
-      $wpdb->get_results($sql);
-      $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_category BIGINT(20) UNSIGNED";
-      $wpdb->get_results($sql);
-      $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_category=1";
-      $wpdb->get_results($sql);
-      $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_link TEXT";
-      $wpdb->get_results($sql);
-      $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_link=''";
-      $wpdb->get_results($sql);
-      $sql = "CREATE TABLE " . WP_CALENDAR_CATEGORIES_TABLE . " ( 
-                                category_id INT(11) NOT NULL AUTO_INCREMENT, 
-                                category_name VARCHAR(30) NOT NULL , 
-                                category_colour VARCHAR(30) NOT NULL , 
-                                PRIMARY KEY (category_id) 
-                             )";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO " . WP_CALENDAR_CATEGORIES_TABLE . " SET category_id=1, category_name='General', category_colour='#F6F79B'";
-      $wpdb->get_results($sql);
-    }
-  else if ($vone_point_one_upgrade == true)
-    {
-      $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_author BIGINT(20) UNSIGNED";
-      $wpdb->get_results($sql);
-      $sql = "UPDATE ".WP_CALENDAR_TABLE." SET event_author=".$wpdb->get_var("SELECT MIN(ID) FROM ".$wpdb->prefix."users",0,0);
-      $wpdb->get_results($sql);
-      $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." MODIFY event_desc TEXT NOT NULL";
-      $wpdb->get_results($sql);
-      $sql = "CREATE TABLE " . WP_CALENDAR_CONFIG_TABLE . " (
-                                config_item VARCHAR(30) NOT NULL ,
-                                config_value TEXT NOT NULL ,
-                                PRIMARY KEY (config_item)
-                        )";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='can_manage_events', config_value='edit_posts'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_style', config_value='".$initial_style."'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_author', config_value='false'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_jump', config_value='false'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_todays', config_value='true'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_upcoming', config_value='true'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_upcoming_days', config_value=7";
-      $wpdb->get_results($sql);
-
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_version', config_value='1.2'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='enable_categories', config_value='false'";
-      $wpdb->get_results($sql);
-      $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_category BIGINT(20) UNSIGNED";
-      $wpdb->get_results($sql);
-      $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_category=1";
-      $wpdb->get_results($sql);
-      $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_link TEXT";
-      $wpdb->get_results($sql);
-      $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_link=''";
-      $wpdb->get_results($sql);
-      $sql = "CREATE TABLE " . WP_CALENDAR_CATEGORIES_TABLE . " ( 
-                                category_id INT(11) NOT NULL AUTO_INCREMENT, 
-                                category_name VARCHAR(30) NOT NULL , 
-                                category_colour VARCHAR(30) NOT NULL , 
-                                PRIMARY KEY (category_id) 
-                              )";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO " . WP_CALENDAR_CATEGORIES_TABLE . " SET category_id=1, category_name='General', category_colour='#F6F79B'";
-      $wpdb->get_results($sql);
-    }
-  else if ($vone_point_two_beta_upgrade == true)
-    {
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_version', config_value='1.2'";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='enable_categories', config_value='false'";
-      $wpdb->get_results($sql);
-      $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_category BIGINT(20) UNSIGNED";
-      $wpdb->get_results($sql);
-      $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_category=1";
-      $wpdb->get_results($sql);
-      $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_link TEXT";
-      $wpdb->get_results($sql);
-      $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_link=''";
-      $wpdb->get_results($sql);
-      $sql = "CREATE TABLE " . WP_CALENDAR_CATEGORIES_TABLE . " (
-                                category_id INT(11) NOT NULL AUTO_INCREMENT, 
-                                category_name VARCHAR(30) NOT NULL , 
-                                category_colour VARCHAR(30) NOT NULL , 
-                                PRIMARY KEY (category_id) 
-                             )";
-      $wpdb->get_results($sql);
-      $sql = "INSERT INTO " . WP_CALENDAR_CATEGORIES_TABLE . " SET category_id=1, category_name='General', category_colour='#F6F79B'";
-      $wpdb->get_results($sql);
-      $sql = "UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value='".$initial_style."' WHERE config_item='calendar_style'";
-      $wpdb->get_results($sql);
-    }
-}
-
-// Used on the manage events admin page to display a list of events
-function wp_events_display_list()
-{
-	global $wpdb;
-	
-	$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " ORDER BY event_begin DESC");
-	
-	if ( !empty($events) )
-	{
-		?>
-		<table class="widefat page fixed" width="100%" cellpadding="3" cellspacing="3">
-		        <thead>
-			    <tr>
-				<th class="manage-column" scope="col"><?php _e('ID','calendar') ?></th>
-				<th class="manage-column" scope="col"><?php _e('Title','calendar') ?></th>
-				<th class="manage-column" scope="col"><?php _e('Description','calendar') ?></th>
-				<th class="manage-column" scope="col"><?php _e('Start Date','calendar') ?></th>
-				<th class="manage-column" scope="col"><?php _e('End Date','calendar') ?></th>
-				<th class="manage-column" scope="col"><?php _e('Recurs','calendar') ?></th>
-				<th class="manage-column" scope="col"><?php _e('Repeats','calendar') ?></th>
-		                <th class="manage-column" scope="col"><?php _e('Author','calendar') ?></th>
-		                <th class="manage-column" scope="col"><?php _e('Category','calendar') ?></th>
-				<th class="manage-column" scope="col"><?php _e('Edit','calendar') ?></th>
-				<th class="manage-column" scope="col"><?php _e('Delete','calendar') ?></th>
-			    </tr>
-		        </thead>
-		<?php
-		$class = '';
-		foreach ( $events as $event )
-		{
-			$class = ($class == 'alternate') ? '' : 'alternate';
-			?>
-			<tr class="<?php echo $class; ?>">
-				<th scope="row"><?php echo $event->event_id; ?></th>
-				<td><?php echo $event->event_title; ?></td>
-				<td><?php echo $event->event_desc; ?></td>
-				<td><?php echo $event->event_begin; ?></td>
-				<td><?php echo $event->event_end; ?></td>
-				<td>
-				<?php 
-					// Interpret the DB values into something human readable
-					if ($event->event_recur == 'S') { echo __('Never','calendar'); } 
-					else if ($event->event_recur == 'W') { echo __('Weekly','calendar'); }
-					else if ($event->event_recur == 'M') { echo __('Monthly','calendar'); }
-					else if ($event->event_recur == 'Y') { echo __('Yearly','calendar'); }
-				?>
-				</td>
-				<td>
-				<?php
-				        // Interpret the DB values into something human readable
-					if ($event->event_recur == 'S') { echo __('N/A','calendar'); }
-					else if ($event->event_repeats == 0) { echo __('Forever','calendar'); }
-					else if ($event->event_repeats > 0) { echo $event->event_repeats.' '.__('Times','calendar'); }					
-				?>
-				</td>
-				<td><?php $e = get_userdata($event->event_author); echo $e->display_name; ?></td>
-                                <?php
-				$sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".$event->event_category;
-                                $this_cat = $wpdb->get_row($sql);
-                                ?>
-				<td style="background-color:<?php echo $this_cat->category_colour;?>;"><?php echo $this_cat->category_name; ?></td>
-				<?php unset($this_cat); ?>
-				<td><a href="<?php echo $_SERVER['PHP_SELF'] ?>?page=calendar&amp;action=edit&amp;event_id=<?php echo $event->event_id;?>" class='edit'><?php echo __('Edit','calendar'); ?></a></td>
-				<td><a href="<?php echo $_SERVER['PHP_SELF'] ?>?page=calendar&amp;action=delete&amp;event_id=<?php echo $event->event_id;?>" class="delete" onclick="return confirm('<?php _e('Are you sure you want to delete this event?','calendar'); ?>')"><?php echo __('Delete','calendar'); ?></a></td>
-			</tr>
-			<?php
-		}
-		?>
-		</table>
-		<?php
-	}
-	else
-	{
-		?>
-		<p><?php _e("There are no events in the database!",'calendar')	?></p>
-		<?php	
-	}
-}
-
-
-// The event edit form for the manage events admin page
-function wp_events_edit_form($mode='add', $event_id=false)
-{
-	global $wpdb,$users_entries;
-	$data = false;
-	
-	if ( $event_id !== false )
-	{
-		if ( intval($event_id) != $event_id )
-		{
-			echo "<div class=\"error\"><p>".__('Bad Monkey! No banana!','calendar')."</p></div>";
-			return;
-		}
-		else
-		{
-			$data = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_id='" . mysql_escape_string($event_id) . "' LIMIT 1");
-			if ( empty($data) )
-			{
-				echo "<div class=\"error\"><p>".__("An event with that ID couldn't be found",'calendar')."</p></div>";
-				return;
-			}
-			$data = $data[0];
-		}
-		// Recover users entries if they exist; in other words if editing an event went wrong
-		if (!empty($users_entries))
-		  {
-		    $data = $users_entries;
-		  }
-	}
-	// Deal with possibility that form was submitted but not saved due to error - recover user's entries here
-	else
-	  {
-	    $data = $users_entries;
-	  }
-	
-	?>
-        <div id="pop_up_cal" style="position:absolute;margin-left:150px;visibility:hidden;background-color:white;layer-background-color:white;z-index:1;"></div>
-	<form name="quoteform" id="quoteform" class="wrap" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=calendar">
-		<input type="hidden" name="action" value="<?php echo $mode; ?>">
-		<input type="hidden" name="event_id" value="<?php echo $event_id; ?>">
-	
-		<div id="linkadvanceddiv" class="postbox">
-			<div style="float: left; width: 98%; clear: both;" class="inside">
-                                <table cellpadding="5" cellspacing="5">
-                                <tr>				
-				<td><legend><?php _e('Event Title','calendar'); ?></legend></td>
-				<td><input type="text" name="event_title" class="input" size="40" maxlength="30"
-					value="<?php if ( !empty($data) ) echo htmlspecialchars($data->event_title); ?>" /></td>
-                                </tr>
-                                <tr>
-				<td style="vertical-align:top;"><legend><?php _e('Event Description','calendar'); ?></legend></td>
-				<td><textarea name="event_desc" class="input" rows="5" cols="50"><?php if ( !empty($data) ) echo htmlspecialchars($data->event_desc); ?></textarea></td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Event Category','calendar'); ?></legend></td>
-				<td>	 <select name="event_category">
-					     <?php
-					         // Grab all the categories and list them
-						 $sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE;
-	                                         $cats = $wpdb->get_results($sql);
-                                                 foreach($cats as $cat)
-						   {
-						     echo '<option value="'.$cat->category_id.'"';
-                                                     if (!empty($data))
-						       {
-							 if ($data->event_category == $cat->category_id)
-							   {
-							     echo 'selected="selected"';
-							   }
-						       }
-                                                     echo '>'.$cat->category_name.'</option>
-';
-						   }
-                                             ?>
-                                         </select>
-                                </td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Event Link (Optional)','calendar'); ?></legend></td>
-                                <td><input type="text" name="event_link" class="input" size="40" value="<?php if ( !empty($data) ) echo htmlspecialchars($data->event_link); ?>" /></td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Start Date','calendar'); ?></legend></td>
-                                <td>        <script type="text/javascript">
-					var cal_begin = new CalendarPopup('pop_up_cal');
-					function unifydates() {
-					  document.forms['quoteform'].event_end.value = document.forms['quoteform'].event_begin.value;
-					}
-					</script>
-					<input type="text" name="event_begin" class="input" size="12"
-					value="<?php 
-					if ( !empty($data) ) 
-					{
-						echo htmlspecialchars($data->event_begin);
-					}
-					else
-					{
-						echo date("Y-m-d");
-					} 
-					?>" /> <a href="#" onClick="cal_begin.select(document.forms['quoteform'].event_begin,'event_begin_anchor','yyyy-MM-dd'); return false;" name="event_begin_anchor" id="event_begin_anchor"><?php _e('Select Date','calendar'); ?></a>
-				</td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('End Date','calendar'); ?></legend></td>
-                                <td>    <script type="text/javascript">
-					function check_and_print() {
-					unifydates();
-					var cal_end = new CalendarPopup('pop_up_cal');
-					var newDate = new Date();
-					newDate.setFullYear(document.forms['quoteform'].event_begin.value.split('-')[0],document.forms['quoteform'].event_begin.value.split('-')[1]-1,document.forms['quoteform'].event_begin.value.split('-')[2]);
-					newDate.setDate(newDate.getDate()-1);
-                                        cal_end.addDisabledDates(null, formatDate(newDate, "yyyy-MM-dd"));
-                                        cal_end.select(document.forms['quoteform'].event_end,'event_end_anchor','yyyy-MM-dd');
-					}
-                                        </script>
-					<input type="text" name="event_end" class="input" size="12"
-					value="<?php 
-					if ( !empty($data) ) 
-					{
-						echo htmlspecialchars($data->event_end);
-					}
-					else
-					{
-						echo date("Y-m-d");
-					}
-					?>" />  <a href="#" onClick="check_and_print(); return false;" name="event_end_anchor" id="event_end_anchor"><?php _e('Select Date','calendar'); ?></a>
-				</td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Time (hh:mm)','calendar'); ?></legend></td>
-				<td>	<input type="text" name="event_time" class="input" size=12
-					value="<?php 
-					if ( !empty($data) ) 
-					{
-						if ($data->event_time == "00:00:00")
-						{
-							echo '';
-						}
-						else
-						{
-							echo date("H:i",strtotime(htmlspecialchars($data->event_time)));
-						}
-					}
-					else
-					{
-						echo date("H:i");
-					}
-					?>" /> <?php _e('Optional, set blank if not required.','calendar'); ?> <?php _e('Current time difference from GMT is ','calendar'); echo get_option('gmt_offset'); _e(' hour(s)'); ?>
-				</td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Recurring Events','calendar'); ?></legend></td>
-				<td>	<?php
-					if ($data->event_repeats != NULL)
-					{
-						$repeats = $data->event_repeats;
-					}
-					else
-					{
-						$repeats = 0;
-					}
-
-					if ($data->event_recur == "S")
-					{
-						$selected_s = 'selected="selected"';
-					}
-					else if ($data->event_recur == "W")
-					{
-						$selected_w = 'selected="selected"';
-					}
-					else if ($data->event_recur == "M")
-					{
-						$selected_m = 'selected="selected"';
-					}
-					else if ($data->event_recur == "Y")
-					{
-						$selected_y = 'selected="selected"';
-					}
-					?>
-					  <?php _e('Repeats for','calendar'); ?> 
-					<input type="text" name="event_repeats" class="input" size="1" value="<?php echo $repeats; ?>" /> 
-					<select name="event_recur" class="input">
-						<option class="input" <?php echo $selected_s; ?> value="S">None</option>
-						<option class="input" <?php echo $selected_w; ?> value="W">Weeks</option>
-						<option class="input" <?php echo $selected_m; ?> value="M">Months</option>
-						<option class="input" <?php echo $selected_y; ?> value="Y">Years</option>
-					</select><br />
-					<?php _e('Entering 0 means forever. Where the recurrance interval is left at none, the event will not reoccur.','calendar'); ?>
-				</td>
-                                </tr>
-                                </table>
-			</div>
-			<div style="clear:both; height:1px;">&nbsp;</div>
-		</div>
-                <input type="submit" name="save" class="button bold" value="<?php _e('Save','calendar'); ?> &raquo;" />
-	</form>
-	<?php
-}
-
-// The actual function called to render the manage events page and 
-// to deal with posts
-function edit_calendar()
-{
-    global $current_user, $wpdb, $users_entries;
-  ?>
-  <style type="text/css">
-<!--
-	.error {
-	  background: lightcoral;
-	  border: 1px solid #e64f69;
-	  margin: 1em 5% 10px;
-	  padding: 0 1em 0 1em;
-	}
-
-	.center { 
-	  text-align: center;	
-	}
-	.right { text-align: right;	
-	}
-        .left { 
-	  text-align: left;		
-	}
-	.top { 
-	  vertical-align: top;	
-	}
-	.bold { 
-	  font-weight: bold; 
-	}
-	.private { 
-	  color: #e64f69;		
-	}
-//-->
-</style>
-
-<?php
-
-// First some quick cleaning up 
-$edit = $create = $save = $delete = false;
-
-// Make sure we are collecting the variables we need to select years and months
-$action = !empty($_REQUEST['action']) ? $_REQUEST['action'] : '';
-$event_id = !empty($_REQUEST['event_id']) ? $_REQUEST['event_id'] : '';
-
-
-// Lets see if this is first run and create us a table if it is!
-check_calendar();
-
-// Deal with adding an event to the database
-if ( $action == 'add' )
-{
-	$title = !empty($_REQUEST['event_title']) ? $_REQUEST['event_title'] : '';
-	$desc = !empty($_REQUEST['event_desc']) ? $_REQUEST['event_desc'] : '';
-	$begin = !empty($_REQUEST['event_begin']) ? $_REQUEST['event_begin'] : '';
-	$end = !empty($_REQUEST['event_end']) ? $_REQUEST['event_end'] : '';
-	$time = !empty($_REQUEST['event_time']) ? $_REQUEST['event_time'] : '';
-	$recur = !empty($_REQUEST['event_recur']) ? $_REQUEST['event_recur'] : '';
-	$repeats = !empty($_REQUEST['event_repeats']) ? $_REQUEST['event_repeats'] : '';
-	$category = !empty($_REQUEST['event_category']) ? $_REQUEST['event_category'] : '';
-        $linky = !empty($_REQUEST['event_link']) ? $_REQUEST['event_link'] : '';
-
-	// Deal with the fools who have left magic quotes turned on
-	if ( ini_get('magic_quotes_gpc') )
-	{
-		$title = stripslashes($title);
-		$desc = stripslashes($desc);
-		$begin = stripslashes($begin);
-		$end = stripslashes($end);
-		$time = stripslashes($time);
-		$recur = stripslashes($recur);
-		$repeats = stripslashes($repeats);
-                $category = stripslashes($category);
-                $linky = stripslashes($linky);	
-	}	
-
-	// Perform some validation on the submitted dates - this checks for valid years and months
-	$date_format_one = '/^([0-9]{4})-([0][1-9])-([0-3][0-9])$/';
-        $date_format_two = '/^([0-9]{4})-([1][0-2])-([0-3][0-9])$/';
-	if ((preg_match($date_format_one,$begin) || preg_match($date_format_two,$begin)) && (preg_match($date_format_one,$end) || preg_match($date_format_two,$end)))
-	  {
-            // We know we have a valid year and month and valid integers for days so now we do a final check on the date
-            $begin_split = split('-',$begin);
-	    $begin_y = $begin_split[0]; 
-	    $begin_m = $begin_split[1];
-	    $begin_d = $begin_split[2];
-            $end_split = split('-',$end);
-	    $end_y = $end_split[0];
-	    $end_m = $end_split[1];
-	    $end_d = $end_split[2];
-            if (checkdate($begin_m,$begin_d,$begin_y) && checkdate($end_m,$end_d,$end_y))
-	     {
-	       // Ok, now we know we have valid dates, we want to make sure that they are either equal or that the end date is later than the start date
-	       if (strtotime($end) >= strtotime($begin))
-		 {
-		   $start_date_ok = 1;
-		   $end_date_ok = 1;
-		 }
-	       else
-		 {
-		   ?>
-		   <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('Your event end date must be either after or the same as your event begin date','calendar'); ?></p></div>
-		   <?php
-		 }
-	     } 
-	    else
-	      {
-		?>
-                <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('Your date formatting is correct but one or more of your dates is invalid. Check for number of days in month and leap year related errors.','calendar'); ?></p></div>
-                <?php
-	      }
-	  }
-	else
-	  {
-	    ?>
-            <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('Both start and end dates must be entered and be in the format YYYY-MM-DD','calendar'); ?></p></div>
-            <?php
-	  }
-        // We check for a valid time, or an empty one
-        $time_format_one = '/^([0-1][0-9]):([0-5][0-9])$/';
-	$time_format_two = '/^([2][0-3]):([0-5][0-9])$/';
-        if (preg_match($time_format_one,$time) || preg_match($time_format_two,$time) || $time == '')
-          {
-            $time_ok = 1;
-          }
-        else
-          {
-            ?>
-            <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('The time field must either be blank or be entered in the format hh:mm','calendar'); ?></p></div>
-            <?php
-	  }
-	// We check to make sure the URL is alright                                                        
-	if (preg_match('/^(http)(s?)(:)\/\//',$linky) || $linky == '')
-	  {
-	    $url_ok = 1;
-	  }
-	else
-	  {
-              ?>
-              <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('The URL entered must either be prefixed with http:// or be completely blank','calendar'); ?></p></div>
-              <?php
-	  }
-	// The title must be at least one character in length and no more than 30 - no non-standard characters allowed
-	if (preg_match('/^[a-zA-Z0-9]{1}[a-zA-Z0-9[:space:]]{0,29}$/',$title))
-	  {
-	    $title_ok =1;
-	  }
-	else
-	  {
-              ?>
-              <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('The event title must be between 1 and 30 characters in length and contain no punctuation. Spaces are allowed but the title must not start with one.','calendar'); ?></p></div>
-              <?php
-	  }
-	// We run some checks on recurrance                                                                        
-	if (($repeats == 0 && $recur == 'S') || (($repeats >= 0) && ($recur == 'W' || $recur == 'M' || $recur == 'Y')))
-	  {
-	    $recurring_ok = 1;
-	  }
-	else
-	  {
-              ?>
-              <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('The repetition value must be 0 unless a type of recurrance is selected in which case the repetition value must be 0 or higher','calendar'); ?></p></div>
-              <?php
-	  }
-	if ($start_date_ok == 1 && $end_date_ok == 1 && $time_ok == 1 && $url_ok == 1 && $title_ok == 1 && $recurring_ok == 1)
-	  {
-	    $sql = "INSERT INTO " . WP_CALENDAR_TABLE . " SET event_title='" . mysql_escape_string($title)
-	     . "', event_desc='" . mysql_escape_string($desc) . "', event_begin='" . mysql_escape_string($begin) 
-             . "', event_end='" . mysql_escape_string($end) . "', event_time='" . mysql_escape_string($time) . "', event_recur='" . mysql_escape_string($recur) . "', event_repeats='" . mysql_escape_string($repeats) . "', event_author=".$current_user->ID.", event_category=".mysql_escape_string($category).", event_link='".mysql_escape_string($linky)."'";
-	     
-	    $wpdb->get_results($sql);
-	
-	    $sql = "SELECT event_id FROM " . WP_CALENDAR_TABLE . " WHERE event_title='" . mysql_escape_string($title) . "'"
-		. " AND event_desc='" . mysql_escape_string($desc) . "' AND event_begin='" . mysql_escape_string($begin) . "' AND event_end='" . mysql_escape_string($end) . "' AND event_recur='" . mysql_escape_string($recur) . "' AND event_repeats='" . mysql_escape_string($repeats) . "' LIMIT 1";
-	    $result = $wpdb->get_results($sql);
-	
-	    if ( empty($result) || empty($result[0]->event_id) )
-	      {
-                ?>
-		<div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('An event with the details you submitted could not be found in the database. This may indicate a problem with your database or the way in which it is configured.','calendar'); ?></p></div>
-		<?php
-	      }
-	    else
-	      {
-		?>
-		<div class="updated"><p><?php _e('Event added. It will now show in your calendar.','calendar'); ?></p></div>
-		<?php
-	      }
-	  }
-	else
-	  {
-	    // The form is going to be rejected due to field validation issues, so we preserve the users entries here
-	    $users_entries->event_title = $title;
-	    $users_entries->event_desc = $desc;
-	    $users_entries->event_begin = $begin;
-	    $users_entries->event_end = $end;
-	    $users_entries->event_time = $time;
-	    $users_entries->event_recur = $recur;
-	    $users_entries->event_repeats = $repeats;
-	    $users_entries->event_category = $category;
-	    $users_entries->event_link = $linky;
-	  }
-}
-// Permit saving of events that have been edited
-elseif ( $action == 'edit_save' )
-{
-	$title = !empty($_REQUEST['event_title']) ? $_REQUEST['event_title'] : '';
-	$desc = !empty($_REQUEST['event_desc']) ? $_REQUEST['event_desc'] : '';
-	$begin = !empty($_REQUEST['event_begin']) ? $_REQUEST['event_begin'] : '';
-	$end = !empty($_REQUEST['event_end']) ? $_REQUEST['event_end'] : '';
-	$time = !empty($_REQUEST['event_time']) ? $_REQUEST['event_time'] : '';
-	$recur = !empty($_REQUEST['event_recur']) ? $_REQUEST['event_recur'] : '';
-	$repeats = !empty($_REQUEST['event_repeats']) ? $_REQUEST['event_repeats'] : '';
-	$category = !empty($_REQUEST['event_category']) ? $_REQUEST['event_category'] : '';
-        $linky = !empty($_REQUEST['event_link']) ? $_REQUEST['event_link'] : '';
-
-	// Deal with the fools who have left magic quotes turned on
-	if ( ini_get('magic_quotes_gpc') )
-	{
-		$title = stripslashes($title);
-		$desc = stripslashes($desc);
-		$begin = stripslashes($begin);
-		$end = stripslashes($end);
-		$time = stripslashes($time);
-		$recur = stripslashes($recur);
-		$repeats = stripslashes($repeats);
-                $category = stripslashes($category);
-                $linky = stripslashes($linky);	
-	}
-	
-	if ( empty($event_id) )
-	{
-		?>
-		<div class="error"><p><strong><?php _e('Failure','calendar'); ?>:</strong> <?php _e("You can't update an event if you haven't submitted an event id",'calendar'); ?></p></div>
-		<?php		
-	}
-	else
-	{
-	  // Perform some validation on the submitted dates - this checks for valid years and months
-          $date_format_one = '/^([0-9]{4})-([0][1-9])-([0-3][0-9])$/';
-	  $date_format_two = '/^([0-9]{4})-([1][0-2])-([0-3][0-9])$/';
-	  if ((preg_match($date_format_one,$begin) || preg_match($date_format_two,$begin)) && (preg_match($date_format_one,$end) || preg_match($date_format_two,$end)))
-	    {
-	      // We know we have a valid year and month and valid integers for days so now we do a final check on the date
-              $begin_split = split('-',$begin);
-	      $begin_y = $begin_split[0];
-	      $begin_m = $begin_split[1];
-	      $begin_d = $begin_split[2];
-	      $end_split = split('-',$end);
-	      $end_y = $end_split[0];
-	      $end_m = $end_split[1];
-	      $end_d = $end_split[2];
-	      if (checkdate($begin_m,$begin_d,$begin_y) && checkdate($end_m,$end_d,$end_y))
-		{
-		  // Ok, now we know we have valid dates, we want to make sure that they are either equal or that the end date is later than the start date
-                  if (strtotime($end) >= strtotime($begin))
-		    {
-		      $start_date_ok = 1;
-		      $end_date_ok = 1;
-		    }
-		  else
-		    {
-                      ?>
-                      <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('Your event end date must be either after or the same as your event begin date','calendar'); ?></p></div>
-                      <?php
-                    }
-		}
-	      else
-		{
-                ?>
-                <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('Your date formatting is correct but one or more of your dates is invalid. Check for number of days in month and leap year related errors.','calendar'); ?></p></div>
-                <?php
-                }
-	    }
-	  else
-	    {
-            ?>
-            <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('Both start and end dates must be entered and be in the format YYYY-MM-DD','calendar'); ?></p></div>
-            <?php
-	    }
-	  // We check for a valid time, or an empty one
-	  $time_format_one = '/^([0-1][0-9]):([0-5][0-9])$/';
-	  $time_format_two = '/^([2][0-3]):([0-5][0-9])$/';
-	  if (preg_match($time_format_one,$time) || preg_match($time_format_two,$time) || $time == '')
-	    {
-	      $time_ok = 1;
-	    }
-	  else
-	    {
-            ?>
-            <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('The time field must either be blank or be entered in the format hh:mm','calendar'); ?></p></div>
-            <?php
-	    }
-          // We check to make sure the URL is alright
-	  if (preg_match('/^(http)(s?)(:)\/\//',$linky) || $linky == '')
-	    {
-	      $url_ok = 1;
-	    }
-	  else
-	    {
-	      ?>
-	      <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('The URL entered must either be prefixed with http:// or be completely blank','calendar'); ?></p></div>
-	      <?php
-	    }
-	  // The title must be at least one character in length and no more than 30 - no non-standard characters allowed
-	  if (preg_match('/^[a-zA-Z0-9]{1}[a-zA-Z0-9[:space:]]{0,29}$/',$title))
-            {
-	      $title_ok =1;
-	    }
-          else
-            {
-	      ?>
-              <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('The event title must be between 1 and 30 characters in length and contain no punctuation. Spaces are allowed but the title must not start with one.','calendar'); ?></p></div>
-              <?php
-	    }
-	  // We run some checks on recurrance              
-          if (($repeats == 0 && $recur == 'S') || (($repeats >= 0) && ($recur == 'W' || $recur == 'M' || $recur == 'Y')))
-            {
-              $recurring_ok = 1;
-            }
-          else
-            {
-              ?>
-              <div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('The repetition value must be 0 unless a type of recurrance is selected in which case the repetition value must be 0 or higher','calendar'); ?></p></div>
-              <?php
-	    }
-	  if ($start_date_ok == 1 && $end_date_ok == 1 && $time_ok == 1 && $url_ok == 1 && $title_ok && $recurring_ok == 1)
-	    {
-		$sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_title='" . mysql_escape_string($title)
-		     . "', event_desc='" . mysql_escape_string($desc) . "', event_begin='" . mysql_escape_string($begin) 
-                     . "', event_end='" . mysql_escape_string($end) . "', event_time='" . mysql_escape_string($time) . "', event_recur='" . mysql_escape_string($recur) . "', event_repeats='" . mysql_escape_string($repeats) . "', event_author=".$current_user->ID . ", event_category=".mysql_escape_string($category).", event_link='".mysql_escape_string($linky)."' WHERE event_id='" . mysql_escape_string($event_id) . "'";
-		     
-		$wpdb->get_results($sql);
-		
-		$sql = "SELECT event_id FROM " . WP_CALENDAR_TABLE . " WHERE event_title='" . mysql_escape_string($title) . "'"
-		     . " AND event_desc='" . mysql_escape_string($desc) . "' AND event_begin='" . mysql_escape_string($begin) . "' AND event_end='" . mysql_escape_string($end) . "' AND event_recur='" . mysql_escape_string($recur) . "' AND event_repeats='" . mysql_escape_string($repeats) . "' LIMIT 1";
-		$result = $wpdb->get_results($sql);
-		
-		if ( empty($result) || empty($result[0]->event_id) )
-		{
-			?>
-			<div class="error"><p><strong><?php _e('Failure','calendar'); ?>:</strong> <?php _e('The database failed to return data to indicate the event has been updated sucessfully. This may indicate a problem with your database or the way in which it is configured.','calendar'); ?></p></div>
-			<?php
-		}
-		else
-		{
-			?>
-			<div class="updated"><p><?php _e('Event updated successfully','calendar'); ?></p></div>
-			<?php
-		}
-	    }
-          else
-	    {
-	      // The form is going to be rejected due to field validation issues, so we preserve the users entries here
-              $users_entries->event_title = $title;
-	      $users_entries->event_desc = $desc;
-	      $users_entries->event_begin = $begin;
-	      $users_entries->event_end = $end;
-	      $users_entries->event_time = $time;
-	      $users_entries->event_recur = $recur;
-	      $users_entries->event_repeats = $repeats;
-	      $users_entries->event_category = $category;
-	      $users_entries->event_link = $linky;
-	      $error_with_saving = 1;
-	    }		
-	}
-}
-// Deal with deleting an event from the database
-elseif ( $action == 'delete' )
-{
-	if ( empty($event_id) )
-	{
-		?>
-		<div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e("You can't delete an event if you haven't submitted an event id",'calendar'); ?></p></div>
-		<?php			
-	}
-	else
-	{
-		$sql = "DELETE FROM " . WP_CALENDAR_TABLE . " WHERE event_id='" . mysql_escape_string($event_id) . "'";
-		$wpdb->get_results($sql);
-		
-		$sql = "SELECT event_id FROM " . WP_CALENDAR_TABLE . " WHERE event_id='" . mysql_escape_string($event_id) . "'";
-		$result = $wpdb->get_results($sql);
-		
-		if ( empty($result) || empty($result[0]->event_id) )
-		{
-			?>
-			<div class="updated"><p><?php _e('Event deleted successfully','calendar'); ?></p></div>
-			<?php
-		}
-		else
-		{
-			?>
-			<div class="error"><p><strong><?php _e('Error','calendar'); ?>:</strong> <?php _e('Despite issuing a request to delete, the event still remains in the database. Please investigate.','calendar'); ?></p></div>
-			<?php
-
-		}		
-	}
-}
-
-// Now follows a little bit of code that pulls in the main 
-// components of this page; the edit form and the list of events
-?>
-
-<div class="wrap">
-	<?php
-	if ( $action == 'edit' || ($action == 'edit_save' && $error_with_saving == 1))
-	{
-		?>
-		<h2><?php _e('Edit Event','calendar'); ?></h2>
-		<?php
-		if ( empty($event_id) )
-		{
-			echo "<div class=\"error\"><p>".__("You must provide an event id in order to edit it",'calendar')."</p></div>";
-		}
-		else
-		{
-			wp_events_edit_form('edit_save', $event_id);
-		}	
-	}
-	else
-	{
-		?>
-		<h2><?php _e('Add Event','calendar'); ?></h2>
-		<?php wp_events_edit_form(); ?>
-	
-		<h2><?php _e('Manage Events','calendar'); ?></h2>
-		<?php
-			wp_events_display_list();
-	}
-	?>
-</div>
-
-<?php
- 
-}
-
-// Display the admin configuration page
-function edit_calendar_config()
-{
-  global $wpdb, $initial_style;
-
-  // We can't use this page unless Calendar is installed/upgraded
-  check_calendar();
-
-  if (isset($_POST['permissions']) && isset($_POST['style']))
-    {
-      if ($_POST['permissions'] == 'subscriber') { $new_perms = 'read'; }
-      else if ($_POST['permissions'] == 'contributor') { $new_perms = 'edit_posts'; }
-      else if ($_POST['permissions'] == 'author') { $new_perms = 'publish_posts'; }
-      else if ($_POST['permissions'] == 'editor') { $new_perms = 'moderate_comments'; }
-      else if ($_POST['permissions'] == 'admin') { $new_perms = 'manage_options'; }
-      else { $new_perms = 'manage_options'; }
-
-      $calendar_style = mysql_escape_string($_POST['style']);
-      $display_upcoming_days = mysql_escape_string($_POST['display_upcoming_days']);
-
-      if (mysql_escape_string($_POST['display_author']) == 'on')
-	{
-	  $disp_author = 'true';
-	}
-      else
-	{
-	  $disp_author = 'false';
-	}
-
-      if (mysql_escape_string($_POST['display_jump']) == 'on')
-        {
-          $disp_jump = 'true';
-        }
-      else
-        {
-          $disp_jump = 'false';
-        }
-
-      if (mysql_escape_string($_POST['display_todays']) == 'on')
-        {
-          $disp_todays = 'true';
-        }
-      else
-        {
-          $disp_todays = 'false';
-        }
-
-      if (mysql_escape_string($_POST['display_upcoming']) == 'on')
-        {
-          $disp_upcoming = 'true';
-        }
-      else
-        {
-          $disp_upcoming = 'false';
-        }
-
-      if (mysql_escape_string($_POST['enable_categories']) == 'on')
-        {
-          $enable_categories = 'true';
-        }
-      else
-        {
-	  $enable_categories = 'false';
-        }
-
-      $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$new_perms."' WHERE config_item='can_manage_events'");
-      $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$calendar_style."' WHERE config_item='calendar_style'");
-      $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$disp_author."' WHERE config_item='display_author'");
-      $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$disp_jump."' WHERE config_item='display_jump'");
-      $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$disp_todays."' WHERE config_item='display_todays'");
-      $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$disp_upcoming."' WHERE config_item='display_upcoming'");
-      $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$display_upcoming_days."' WHERE config_item='display_upcoming_days'");
-      $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$enable_categories."' WHERE config_item='enable_categories'");
-
-      // Check to see if we are replacing the original style
-      if (mysql_escape_string($_POST['reset_styles']) == 'on')
-        {
-          $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$initial_style."' WHERE config_item='calendar_style'");
-        }
-
-      echo "<div class=\"updated\"><p><strong>".__('Settings saved','calendar').".</strong></p></div>";
-    }
-
-  // Pull the values out of the database that we need for the form
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='can_manage_events'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-        {
-          $allowed_group = $config->config_value;
-        }
-    }
-
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='calendar_style'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-        {
-          $calendar_style = $config->config_value;
-        }
-    }
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_author'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-        {
-	  if ($config->config_value == 'true')
-	    {
-	      $yes_disp_author = 'selected="selected"';
-	    }
-	  else
-	    {
-	      $no_disp_author = 'selected="selected"';
-	    }
-        }
-    }
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_jump'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-        {
-          if ($config->config_value == 'true')
-            {
-              $yes_disp_jump = 'selected="selected"';
-            }
-          else
-            {
-              $no_disp_jump = 'selected="selected"';
-            }
-        }
-    }
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_todays'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-        {
-          if ($config->config_value == 'true')
-            {
-              $yes_disp_todays = 'selected="selected"';
-            }
-          else
-            {
-              $no_disp_todays = 'selected="selected"';
-            }
-        }
-    }
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_upcoming'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-        {
-          if ($config->config_value == 'true')
-            {
-              $yes_disp_upcoming = 'selected="selected"';
-            }
-          else
-            {
-              $no_disp_upcoming = 'selected="selected"';
-            }
-        }
-    }
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_upcoming_days'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-        {
-          $upcoming_days = $config->config_value;
-        }
-    }
-  $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='enable_categories'");
-  if (!empty($configs))
-    {
-      foreach ($configs as $config)
-        {
-          if ($config->config_value == 'true')
-            {
-              $yes_enable_categories = 'selected="selected"';
-            }
-          else
-            {
-              $no_enable_categories = 'selected="selected"';
-            }
-        }
-    }
-  if ($allowed_group == 'read') { $subscriber_selected='selected="selected"';}
-  else if ($allowed_group == 'edit_posts') { $contributor_selected='selected="selected"';}
-  else if ($allowed_group == 'publish_posts') { $author_selected='selected="selected"';}
-  else if ($allowed_group == 'moderate_comments') { $editor_selected='selected="selected"';}
-  else if ($allowed_group == 'manage_options') { $admin_selected='selected="selected"';}
-
-  // Now we render the form
-  ?>
-  <style type="text/css">
-  <!--
-        .error {
-	  background: lightcoral;
-	  border: 1px solid #e64f69;
-	  margin: 1em 5% 10px;
-	  padding: 0 1em 0 1em;
-	}
-
-        .center { 
-	  text-align: center; 
-	}
-        .right { 
-	  text-align: right; 
-	}
-        .left { 
-	  text-align: left; 
-	}
-        .top { 
-	  vertical-align: top; 
-	}
-        .bold { 
-	  font-weight: bold; 
-	}
-        .private { 
-	  color: #e64f69; 
-	}
-  //-->                                                                                                                                                        
-  </style>
-
-  <div class="wrap">
-  <h2><?php _e('Calendar Options','calendar'); ?></h2>
-  <form name="quoteform" id="quoteform" class="wrap" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=calendar-config">
-                <div id="linkadvanceddiv" class="postbox">
-                        <div style="float: left; width: 98%; clear: both;" class="inside">
-                                <table cellpadding="5" cellspacing="5">
-				<tr>
-                                <td><legend><?php _e('Choose the lowest user group that may manage events','calendar'); ?></legend></td>
-				<td>        <select name="permissions">
-				            <option value="subscriber"<?php echo $subscriber_selected ?>><?php _e('Subscriber','calendar')?></option>
-				            <option value="contributor" <?php echo $contributor_selected ?>><?php _e('Contributor','calendar')?></option>
-				            <option value="author" <?php echo $author_selected ?>><?php _e('Author','calendar')?></option>
-				            <option value="editor" <?php echo $editor_selected ?>><?php _e('Editor','calendar')?></option>
-				            <option value="admin" <?php echo $admin_selected ?>><?php _e('Administrator','calendar')?></option>
-				        </select>
-                                </td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Do you want to display the author name on events?','calendar'); ?></legend></td>
-                                <td>    <select name="display_author">
-                                        <option value="on" <?php echo $yes_disp_author ?>><?php _e('Yes','calendar') ?></option>
-                                        <option value="off" <?php echo $no_disp_author ?>><?php _e('No','calendar') ?></option>
-                                    </select>
-                                </td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Display a jumpbox for changing month and year quickly?','calendar'); ?></legend></td>
-                                <td>    <select name="display_jump">
-                                         <option value="on" <?php echo $yes_disp_jump ?>><?php _e('Yes','calendar') ?></option>
-                                         <option value="off" <?php echo $no_disp_jump ?>><?php _e('No','calendar') ?></option>
-                                    </select>
-                                </td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Display todays events?','calendar'); ?></legend></td>
-                                <td>    <select name="display_todays">
-						<option value="on" <?php echo $yes_disp_todays ?>><?php _e('Yes','calendar') ?></option>
-						<option value="off" <?php echo $no_disp_todays ?>><?php _e('No','calendar') ?></option>
-                                    </select>
-                                </td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Display upcoming events?','calendar'); ?></legend></td>
-                                <td>    <select name="display_upcoming">
-						<option value="on" <?php echo $yes_disp_upcoming ?>><?php _e('Yes','calendar') ?></option>
-						<option value="off" <?php echo $no_disp_upcoming ?>><?php _e('No','calendar') ?></option>
-                                    </select>
-				    <?php _e('for','calendar'); ?> <input type="text" name="display_upcoming_days" value="<?php echo $upcoming_days ?>" size="1" maxlength="2" /> <?php _e('days into the future','calendar'); ?>
-                                </td>
-                                </tr>
-                                <tr>
-				<td><legend><?php _e('Enable event categories?','calendar'); ?></legend></td>
-                                <td>    <select name="enable_categories">
-				                <option value="on" <?php echo $yes_enable_categories ?>><?php _e('Yes','calendar') ?></option>
-						<option value="off" <?php echo $no_enable_categories ?>><?php _e('No','calendar') ?></option>
-                                    </select>
-                                </td>
-                                </tr>
-                                <tr>
-				<td style="vertical-align:top;"><legend><?php _e('Configure the stylesheet for Calendar','calendar'); ?></legend></td>
-				<td><textarea name="style" rows="10" cols="60" tabindex="2"><?php echo $calendar_style; ?></textarea><br />
-                                <input type="checkbox" name="reset_styles" /> <?php _e('Tick this box if you wish to reset the Calendar style to default','calendar'); ?></td>
-                                </tr>
-                                </table>
-			</div>
-                        <div style="clear:both; height:1px;">&nbsp;</div>
-	        </div>
-                <input type="submit" name="save" class="button bold" value="<?php _e('Save','calendar'); ?> &raquo;" />
-  </form>
-  </div>
-  <?php
-
-
-}
-
-// Function to handle the management of categories
-function manage_categories()
-{
-  global $wpdb;
-
-  // Calendar must be installed and upgraded before this will work
-  check_calendar();
-
-?>
-<style type="text/css">
-  <!--
-   .error {
-     background: lightcoral;
-     border: 1px solid #e64f69;
-     margin: 1em 5% 10px;
-     padding: 0 1em 0 1em;
-   }
-
-  .center {
-    text-align: center;
-  }
-  .right {
-    text-align: right;
-  }
-  .left {
-    text-align: left;
-  }
-  .top {
-    vertical-align: top;
-  }
-  .bold {
-    font-weight: bold;
-  }
-  .private {
-  color: #e64f69;
-  }
-  //-->                                                                                                                                                                               
-</style>
-<?php
-  // We do some checking to see what we're doing
-  if (isset($_POST['mode']) && $_POST['mode'] == 'add')
-    {
-      $sql = "INSERT INTO " . WP_CALENDAR_CATEGORIES_TABLE . " SET category_name='".mysql_escape_string($_POST['category_name'])."', category_colour='".mysql_escape_string($_POST['category_colour'])."'";
-      $wpdb->get_results($sql);
-      echo "<div class=\"updated\"><p><strong>".__('Category added successfully','calendar')."</strong></p></div>";
-    }
-  else if (isset($_GET['mode']) && isset($_GET['category_id']) && $_GET['mode'] == 'delete')
-    {
-      $sql = "DELETE FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".mysql_escape_string($_GET['category_id']);
-      $wpdb->get_results($sql);
-      $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_category=1 WHERE event_category=".mysql_escape_string($_GET['category_id']);
-      $wpdb->get_results($sql);
-      echo "<div class=\"updated\"><p><strong>".__('Category deleted successfully','calendar')."</strong></p></div>";
-    }
-  else if (isset($_GET['mode']) && isset($_GET['category_id']) && $_GET['mode'] == 'edit' && !isset($_POST['mode']))
-    {
-      $sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".mysql_escape_string($_GET['category_id']);
-      $cur_cat = $wpdb->get_row($sql);
-      ?>
-<div class="wrap">
-   <h2><?php _e('Edit Category','calendar'); ?></h2>
-    <form name="catform" id="catform" class="wrap" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=calendar-categories">
-                <input type="hidden" name="mode" value="edit" />
-                <input type="hidden" name="category_id" value="<?php echo $cur_cat->category_id ?>" />
-                <div id="linkadvanceddiv" class="postbox">
-                        <div style="float: left; width: 98%; clear: both;" class="inside">
-				<table cellpadding="5" cellspacing="5">
-                                <tr>
-				<td><legend><?php _e('Category Name','calendar'); ?>:</legend></td>
-                                <td><input type="text" name="category_name" class="input" size="30" maxlength="30" value="<?php echo $cur_cat->category_name ?>" /></td>
-				</tr>
-                                <tr>
-				<td><legend><?php _e('Category Colour (Hex format)','calendar'); ?>:</legend></td>
-                                <td><input type="text" name="category_colour" class="input" size="10" maxlength="7" value="<?php echo $cur_cat->category_colour ?>" /></td>
-                                </tr>
-                                </table>
-                        </div>
-                        <div style="clear:both; height:1px;">&nbsp;</div>
-                </div>
-                <input type="submit" name="save" class="button bold" value="<?php _e('Save','calendar'); ?> &raquo;" />
-    </form>
-</div>
-      <?php
-    }
-  else if (isset($_POST['mode']) && isset($_POST['category_id']) && isset($_POST['category_name']) && isset($_POST['category_colour']) && $_POST['mode'] == 'edit')
-    {
-      $sql = "UPDATE " . WP_CALENDAR_CATEGORIES_TABLE . " SET category_name='".mysql_escape_string($_POST['category_name'])."', category_colour='".mysql_escape_string($_POST['category_colour'])."' WHERE category_id=".mysql_escape_string($_POST['category_id']);
-      $wpdb->get_results($sql);
-      echo "<div class=\"updated\"><p><strong>".__('Category edited successfully','calendar')."</strong></p></div>";
-    }
-
-  if ($_GET['mode'] != 'edit' || $_POST['mode'] == 'edit')
-    {
-?>
-
-  <div class="wrap">
-    <h2><?php _e('Add Category','calendar'); ?></h2>
-    <form name="catform" id="catform" class="wrap" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=calendar-categories">
-                <input type="hidden" name="mode" value="add" />
-                <input type="hidden" name="category_id" value="">
-                <div id="linkadvanceddiv" class="postbox">
-                        <div style="float: left; width: 98%; clear: both;" class="inside">
-       				<table cellspacing="5" cellpadding="5">
-                                <tr>
-                                <td><legend><?php _e('Category Name','calendar'); ?>:</legend></td>
-                                <td><input type="text" name="category_name" class="input" size="30" maxlength="30" value="" /></td>
-                                </tr>
-                                <tr>
-                                <td><legend><?php _e('Category Colour (Hex format)','calendar'); ?>:</legend></td>
-                                <td><input type="text" name="category_colour" class="input" size="10" maxlength="7" value="" /></td>
-                                </tr>
-                                </table>
-                        </div>
-		        <div style="clear:both; height:1px;">&nbsp;</div>
-                </div>
-                <input type="submit" name="save" class="button bold" value="<?php _e('Save','calendar'); ?> &raquo;" />
-    </form>
-    <h2><?php _e('Manage Categories','calendar'); ?></h2>
-<?php
-    
-    // We pull the categories from the database	
-    $categories = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " ORDER BY category_id ASC");
-
- if ( !empty($categories) )
-   {
-     ?>
-     <table class="widefat page fixed" width="50%" cellpadding="3" cellspacing="3">
-       <thead> 
-       <tr>
-         <th class="manage-column" scope="col"><?php _e('ID','calendar') ?></th>
-	 <th class="manage-column" scope="col"><?php _e('Category Name','calendar') ?></th>
-	 <th class="manage-column" scope="col"><?php _e('Category Colour','calendar') ?></th>
-	 <th class="manage-column" scope="col"><?php _e('Edit','calendar') ?></th>
-	 <th class="manage-column" scope="col"><?php _e('Delete','calendar') ?></th>
-       </tr>
-       </thead>
-       <?php
-       $class = '';
-       foreach ( $categories as $category )
-         {
-	   $class = ($class == 'alternate') ? '' : 'alternate';
-           ?>
-           <tr class="<?php echo $class; ?>">
-	     <th scope="row"><?php echo $category->category_id; ?></th>
-	     <td><?php echo $category->category_name; ?></td>
-	     <td style="background-color:<?php echo $category->category_colour; ?>;">&nbsp;</td>
-	     <td><a href="<?php echo $_SERVER['PHP_SELF']  ?>?page=calendar-categories&amp;mode=edit&amp;category_id=<?php echo $category->category_id;?>" class='edit'><?php echo __('Edit','calendar'); ?></a></td>
-	     <?php
-	     if ($category->category_id == 1)
-	       {
-		 echo '<td>'.__('N/A','calendar').'</td>';
-	       }
-             else
-	       {
-               ?>
-               <td><a href="<?php echo $_SERVER['PHP_SELF'] ?>?page=calendar-categories&amp;mode=delete&amp;category_id=<?php echo $category->category_id;?>" class="delete" onclick="return confirm('<?php echo __('Are you sure you want to delete this category?','calendar'); ?>')"><?php echo __('Delete','calendar'); ?></a></td>
-               <?php
-	       }
-                ?>
-              </tr>
-                <?php
-          }
-      ?>
-      </table>
-      <?php
-   }
- else
-   {
-     echo '<p>'.__('There are no categories in the database - something has gone wrong!','calendar').'</p>';
-   }
-
-?>
-  </div>
-
-<?php
-      } 
-}
-
-// Function to return a prefix which will allow the correct 
-// placement of arguments into the query string.
-function permalink_prefix()
-{
-  // Get the permalink structure from WordPress
-  $p_link = get_permalink();
-
-  // Work out what the real URL we are viewing is
-  $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; 
-  $protocol = substr(strtolower($_SERVER["SERVER_PROTOCOL"]), 0, strpos(strtolower($_SERVER["SERVER_PROTOCOL"]), "/")).$s;
-  $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
-  $real_link = $protocol.'://'.$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
-
-  // Now use all of that to get the correctly craft the Calendar link prefix
-  if (strstr($p_link, '?') && $p_link == $real_link)
-    {
-      $link_part = $p_link.'&';
-    }
-  else if ($p_link == $real_link)
-    {
-      $link_part = $p_link.'?';
-    }
-  else if (strstr($real_link, '?'))  
-    {
-      if (isset($_GET['month']) && isset($_GET['yr']))
-	{
-	  $new_tail = split("&", $real_link);
-	  foreach ($new_tail as $item)
-	    {
-	      if (!strstr($item, 'month') && !strstr($item, 'yr'))
-		{
-		  $link_part .= $item.'&';
-		}
-	    }
-	  if (!strstr($link_part, '?'))
-	    {
-	      $new_tail = split("month", $link_part);
-	      $link_part = $new_tail[0].'?'.$new_tail[1];
-	    }
-	}
-      else
-	{
-	  $link_part = $real_link.'&';
-	}
-    }
-  else
-    {
-      $link_part = $real_link.'?';
-    }
-
-  return $link_part;
-}
-
-// Configure the "Next" link in the calendar
-function next_link($cur_year,$cur_month)
-{
-  $mod_rewrite_months = array(1=>'jan','feb','mar','apr','may','jun','jul','aug','sept','oct','nov','dec');
-  $next_year = $cur_year + 1;
-
-  if ($cur_month == 12)
-    {
-      return '<a href="' . permalink_prefix() . 'month=jan&yr=' . $next_year . '">'.__('Next','calendar').' &raquo;</a>';
-    }
-  else
-    {
-      $next_month = $cur_month + 1;
-      $month = $mod_rewrite_months[$next_month];
-      return '<a href="' . permalink_prefix() . 'month='.$month.'&yr=' . $cur_year . '">'.__('Next','calendar').' &raquo;</a>';
-    }
-}
-
-// Configure the "Previous" link in the calendar
-function prev_link($cur_year,$cur_month)
-{
-  $mod_rewrite_months = array(1=>'jan','feb','mar','apr','may','jun','jul','aug','sept','oct','nov','dec');
-  $last_year = $cur_year - 1;
-
-  if ($cur_month == 1)
-    {
-      return '<a href="' . permalink_prefix() . 'month=dec&yr='. $last_year .'">&laquo; '.__('Prev','calendar').'</a>';
-    }
-  else
-    {
-      $next_month = $cur_month - 1;
-      $month = $mod_rewrite_months[$next_month];
-      return '<a href="' . permalink_prefix() . 'month='.$month.'&yr=' . $cur_year . '">&laquo; '.__('Prev','calendar').'</a>';
-    }
-}
-
-// Print upcoming events
-function upcoming_events()
-{
-  global $wpdb;
-
-  // This function cannot be called unless calendar is up to date
-  check_calendar();
- 
-  // Find out if we should be displaying upcoming events
-  $display = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_upcoming'",0,0);
-
-  if ($display == 'true')
-    {
-      // Get number of days we should go into the future 
-      $future_days = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_upcoming_days'",0,0);
-      $day_count = 1;
-
-      while ($day_count < $future_days+1)
-	{
-	  list($y,$m,$d) = split("-",date("Y-m-d",mktime($day_count*24,0,0,date("m"),date("d"),date("Y"))));
-	  $events = grab_events($y,$m,$d);
-	  usort($events, "time_cmp");
-	  if (count($events) != 0) {
-	    $output .= '<li>'.date(get_option('date_format'),mktime($day_count*24,0,0,date("m"),date("d"),date("Y"))).'<ul>';
-	  }
-	  foreach($events as $event)
-	    {
-	      if ($event->event_time == '00:00:00') {
-		$time_string = ' '.__('all day','calendar');
-	      }
-	      else {
-		$time_string = ' '.__('at','calendar').' '.date(get_option('time_format'), strtotime($event->event_time));
-	      }
-              $output .= '<li>'.draw_widget_event($event).$time_string.'</li>';
-	    }
-	  if (count($events) != 0) {
-	    $output .= '</ul></li>';
-	  }
-	  $day_count = $day_count+1;
-	}
-
-      if ($output != '')
-	{
-	  $visual = '<li class="upcoming-events"><h2>'.__('Upcoming Events','calendar').'</h2><ul>';
-	  $visual .= $output;
-	  $visual .= '</ul></li>';
-	  return $visual;
-	}
-    }
-}
-
-// Print todays events
-function todays_events()
-{
-  global $wpdb;
-
-  // This function cannot be called unless calendar is up to date
-  check_calendar();
-
-  // Find out if we should be displaying todays events
-  $display = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_todays'",0,0);
-
-  if ($display == 'true')
-    {
-      $output = '<li class="todays-events"><h2>'.__('Today\'s Events','calendar').'</h2><ul>';
-      $events = grab_events(date("Y"),date("m"),date("d"));
-      usort($events, "time_cmp");
-      foreach($events as $event)
-	{
-	  if ($event->event_time == '00:00:00') {
-	    $time_string = ' '.__('all day','calendar');
-	  }
-	  else {
-	    $time_string = ' '.__('at','calendar').' '.date(get_option('time_format'), strtotime($event->event_time));
-	  }
-	  $output .= '<li>'.draw_widget_event($event).$time_string.'</li>';
-	}
-      $output .= '</ul></li>';
-      if (count($events) != 0)
-	{
-	  return $output;
-	}
-    }
-}
-
-// Function to compare time in event objects
-function time_cmp($a, $b)
-{
-  if ($a->event_time == $b->event_time) {
-    return 0;
-  }
-  return ($a->event_time < $b->event_time) ? -1 : 1;
-}
-
-// Used to draw multiple events
-function draw_events($events)
-{
-  // We need to sort arrays of objects by time
-  usort($events, "time_cmp");
-
-  // Now process the events
-  foreach($events as $event)
-    {
-      $output .= draw_event($event);
-    }
-  return $output;
-}
-
-// Widget todays events
-function todays_events_widget() {
-  global $wpdb;
-
-  // This function cannot be called unless calendar is up to date
-  check_calendar();
-
-  // Find out if we should be displaying todays events
-  $display = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_todays'",0,0);
-
-  if ($display == 'true')
-    {
-      $output = '<ul>';
-      $events = grab_events(date("Y"),date("m"),date("d"));
-      usort($events, "time_cmp");
-      foreach($events as $event)
-        {
-          if ($event->event_time == '00:00:00') {
-            $time_string = ' '.__('all day','calendar');
-          }
-          else {
-            $time_string = ' '.__('at','calendar').' '.date(get_option('time_format'), strtotime($event->event_time));
-          }
-          $output .= '<li>'.draw_widget_event($event).$time_string.'</li>';
-        }
-      $output .= '</ul>';
-      if (count($events) != 0)
-        {
-          return $output;
-        }
-    }
-}
-
-// Widget upcoming events
-function upcoming_events_widget() {
-  global $wpdb;
-
-  // This function cannot be called unless calendar is up to date
-  check_calendar();
-
-  // Find out if we should be displaying upcoming events
-  $display = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_upcoming'",0,0);
-
-  if ($display == 'true')
-    {
-      // Get number of days we should go into the future
-      $future_days = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_upcoming_days'",0,0);
-      $day_count = 1;
-
-      while ($day_count < $future_days+1)
-        {
-          list($y,$m,$d) = split("-",date("Y-m-d",mktime($day_count*24,0,0,date("m"),date("d"),date("Y"))));
-          $events = grab_events($y,$m,$d);
-          usort($events, "time_cmp");
-          if (count($events) != 0) {
-            $output .= '<li>'.date(get_option('date_format'),mktime($day_count*24,0,0,date("m"),date("d"),date("Y"))).'<ul>';
-          }
-          foreach($events as $event)
-            {
-              if ($event->event_time == '00:00:00') {
-                $time_string = ' '.__('all day','calendar');
-              }
-              else {
-                $time_string = ' '.__('at','calendar').' '.date(get_option('time_format'), strtotime($event->event_time));
-              }
-              $output .= '<li>'.draw_widget_event($event).$time_string.'</li>';
-            }
-          if (count($events) != 0) {
-            $output .= '</ul></li>';
-          }
-          $day_count = $day_count+1;
-        }
-
-      if ($output != '')
-        {
-          $visual = '<ul>';
-          $visual .= $output;
-          $visual .= '</ul>';
-          return $visual;
-        }
-    }
-}
-
-// The widget to show todays events in the sidebar
-function widget_init_calendar_today() {
-  // Check for required functions
-  if (!function_exists('register_sidebar_widget'))
-    return;
-
-  function widget_calendar_today($args) {
-    extract($args);
-    $the_title = get_option('calendar_today_widget_title');
-    $widget_title = empty($the_title) ? __('Today\'s Events','calendar') : $the_title;
-    $the_events = todays_events_widget();
-    if ($the_events != '') {
-      echo $before_widget;
-      echo $before_title . $widget_title . $after_title;
-      echo $the_events;
-      echo $after_widget;
-    }
-  }
-
-  function widget_calendar_today_control() {
-    $widget_title = get_option('calendar_today_widget_title');
-    if (isset($_POST['calendar_today_widget_title'])) {
-      update_option('calendar_today_widget_title',strip_tags($_POST['calendar_today_widget_title']));
-    }
-    ?>
-    <p>
-       <label for="calendar_today_widget_title"><?php _e('Title','calendar'); ?>:<br />
-       <input class="widefat" type="text" id="calendar_today_widget_title" name="calendar_today_widget_title" value="<?php echo $widget_title; ?>"/></label>
-    </p>
-    <?php
-  }
-
-  register_sidebar_widget(__('Today\'s Events','calendar'),'widget_calendar_today');
-  register_widget_control(__('Today\'s Events','calendar'),'widget_calendar_today_control');
-  }
-
-// The widget to show todays events in the sidebar                                              
-function widget_init_calendar_upcoming() {
-  // Check for required functions                                                               
-  if (!function_exists('register_sidebar_widget'))
-    return;
-
-  function widget_calendar_upcoming($args) {
-    extract($args);
-    $the_title = get_option('calendar_upcoming_widget_title');
-    $widget_title = empty($the_title) ? __('Upcoming Events','calendar') : $the_title;
-    $the_events = upcoming_events_widget();
-    if ($the_events != '') {
-      echo $before_widget;
-      echo $before_title . $widget_title . $after_title;
-      echo $the_events;
-      echo $after_widget;
-    }
-  }
-
-  function widget_calendar_upcoming_control() {
-    $widget_title = get_option('calendar_upcoming_widget_title');
-    if (isset($_POST['calendar_upcoming_widget_title'])) {
-      update_option('calendar_upcoming_widget_title',strip_tags($_POST['calendar_upcoming_widget_title']));
-    }
-    ?>
-    <p>
-       <label for="calendar_upcoming_widget_title"><?php _e('Title','calendar'); ?>:<br />
-       <input class="widefat" type="text" id="calendar_upcoming_widget_title" name="calendar_upcoming_widget_title" value="<?php echo $widget_title; ?>"/></label>
-    </p>
-    <?php
-  }
-
-  register_sidebar_widget(__('Upcoming Events','calendar'),'widget_calendar_upcoming');
-  register_widget_control(__('Upcoming Events','calendar'),'widget_calendar_upcoming_control');
-}
-
-
-// Used to draw an event to the screen
-function draw_event($event)
-{
-  global $wpdb;
-
-  // Calendar must be updated to run this function
-  check_calendar();
-
-  // Before we do anything we want to know if we                                             
-  // should display the author and/or show categories. 
-  // We check for this later                                      
-  $display_author = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_author'",0,0);
-  $show_cat = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='enable_categories'",0,0);
-
-  if ($show_cat == 'true')
-    {
-      $sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".$event->event_category;
-      $cat_details = $wpdb->get_row($sql);
-      $style = "background-color:".$cat_details->category_colour.";";
-    }
-
-  $header_details .=  '<div class="event-title">'.$event->event_title.'</div><div class="event-title-break"></div>';
-  if ($event->event_time != "00:00:00")
-    {
-      $header_details .= '<strong>'.__('Time','calendar').':</strong> ' . date(get_option('time_format'), strtotime($event->event_time)) . '<br />';
-    }
-  if ($display_author == 'true')
-    {
-      $e = get_userdata($event->event_author);
-      $header_details .= '<strong>'.__('Posted by', 'calendar').':</strong> '.$e->display_name.'<br />';
-    }
-  if ($display_author == 'true' || $event->event_time != "00:00:00")
-    {
-      $header_details .= '<div class="event-content-break"></div>';
-    }
-  if ($event->event_link != '') { $linky = $event->event_link; }
-  else { $linky = '#'; }
-
-  $details = '<br />
-* <span class="calnk" nowrap="nowrap"><a href="'.$linky.'" style="'.$style.'">' . $event->event_title . '<span style="'.$style.'">' . $header_details . '' . $event->event_desc . '</span></a></span>';
-
-  return $details;
-}
-
-// Draw an event but customise the HTML for use in the widget
-function draw_widget_event($event)
-{
-  global $wpdb;
-
-  // Calendar must be updated to run this function
-  check_calendar();
-
-  // Before we do anything we want to know if we
-  // should display the author and/or show categories.
-  // We check for this later
-  $display_author = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_author'",0,0);
-  $show_cat = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='enable_categories'",0,0);
-
-  if ($show_cat == 'true')
-    {
-      $sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".$event->event_category;
-      $cat_details = $wpdb->get_row($sql);
-      $style = "background-color:".$cat_details->category_colour.";";
-    }
-
-  $header_details .=  '<div class="event-title">'.$event->event_title.'</div><div class="event-title-break"></div>';
-  if ($event->event_time != "00:00:00")
-    {
-      $header_details .= '<strong>'.__('Time','calendar').':</strong> ' . date(get_option('time_format'), strtotime($event->event_time)) . '<br />';
-    }
-  if ($display_author == 'true')
-    {
-      $e = get_userdata($event->event_author);
-      $header_details .= '<strong>'.__('Posted by','calendar').':</strong> '.$e->display_name.'<br />';
-    }
-  if ($display_author == 'true' || $event->event_time != "00:00:00")
-    {
-      $header_details .= '<div class="event-content-break"></div>';
-    }
-  if ($event->event_link != '') { $linky = $event->event_link; }
-  else { $linky = '#'; }
-
-  $details = '<span class="calnk" nowrap="nowrap"><a href="'.$linky.'">' . $event->event_title . '<span style="'.$style.'">' . $header_details . '' . $event->event_desc . '</span></a></span>';
-
-  return $details;
-}
-
-// Grab all events for the requested date from calendar
-function grab_events($y,$m,$d)
-{
-     global $wpdb;
-
-     $arr_events = array();
-
-     // Get the date format right
-     $date = $y . '-' . $m . '-' . $d;
-     
-     // Firstly we check for conventional events. These will form the first instance of a recurring event
-     // or the only instance of a one-off event
-     $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_begin <= '$date' AND event_end >= '$date' AND event_recur = 'S' ORDER BY event_id");
-     if (!empty($events))
-     {
-         foreach($events as $event)
-         {
-	   array_push($arr_events, $event);
-         }
-     }
-
-	// Even if there were results for that query, we may still have events recurring 
-	// from the past on this day. We now methodically check the for these events
-
-	/* 
-	 The yearly code - easy because the day and month will be the same, so we return all yearly
-	 events that match the date part. Out of these we show those with a repeat of 0, and fast-foward
-	 a number of years for those with a value more than 0. Those that land in the future are displayed.
-	*/
-
-	
-	// Deal with forever recurring year events
-	$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'Y' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats = 0 ORDER BY event_id");
-
-	if (!empty($events))
-     	{
-       	  foreach($events as $event)
-          {
-	    // This is going to get complex so lets setup what we would place in for 
-	    // an event so we can drop it in with ease
-
-	    // Technically we don't care about the years, but we need to find out if the 
-	    // event spans the turn of a year so we can deal with it appropriately.
-	    $year_begin = date('Y',strtotime($event->event_begin));
-	    $year_end = date('Y',strtotime($event->event_end));
-
-	    if ($year_begin == $year_end)
-	    {
-		if (date('m-d',strtotime($event->event_begin)) <= date('m-d',strtotime($date)) && 
-			date('m-d',strtotime($event->event_end)) >= date('m-d',strtotime($date)))
-		{
-	      		array_push($arr_events, $event);
-		}
-	    }
-	    else if ($year_begin < $year_end)
-	    {
-		if (date('m-d',strtotime($event->event_begin)) <= date('m-d',strtotime($date)) || 
-			date('m-d',strtotime($event->event_end)) >= date('m-d',strtotime($date)))
-		{
-	      		array_push($arr_events, $event);
-		}
-	    }
-          }
-     	}
-	
-	// Now the ones that happen a finite number of times
-	$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'Y' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats != 0 AND (EXTRACT(YEAR FROM '$date')-EXTRACT(YEAR FROM event_begin)) <= event_repeats ORDER BY event_id");
-	if (!empty($events))
-     	{
-       	  foreach($events as $event)
-          {
-	    // This is going to get complex so lets setup what we would place in for 
-	    // an event so we can drop it in with ease
-
-	    // Technically we don't care about the years, but we need to find out if the 
-	    // event spans the turn of a year so we can deal with it appropriately.
-	    $year_begin = date('Y',strtotime($event->event_begin));
-	    $year_end = date('Y',strtotime($event->event_end));
-
-	    if ($year_begin == $year_end)
-	    {
-		if (date('m-d',strtotime($event->event_begin)) <= date('m-d',strtotime($date)) && 
-			date('m-d',strtotime($event->event_end)) >= date('m-d',strtotime($date)))
-		{
-	      		array_push($arr_events, $event);
-		}
-	    }
-	    else if ($year_begin < $year_end)
-	    {
-		if (date('m-d',strtotime($event->event_begin)) <= date('m-d',strtotime($date)) || 
-			date('m-d',strtotime($event->event_end)) >= date('m-d',strtotime($date)))
-		{
-	      		array_push($arr_events, $event);
-		}
-	    }
-          }
-     	}	
-
-	/* 
-	  The monthly code - just as easy because as long as the day of the month is correct, then we 
-	  show the event
-	*/
-
-	// The monthly events that never stop recurring
-	$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'M' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats = 0 ORDER BY event_id");
-	if (!empty($events))
-     	{
-       	  foreach($events as $event)
-          {
-	    // This is going to get complex so lets setup what we would place in for 
-	    // an event so we can drop it in with ease
-
-	    // Technically we don't care about the years or months, but we need to find out if the 
-	    // event spans the turn of a year or month so we can deal with it appropriately.
-	    $month_begin = date('m',strtotime($event->event_begin));
-	    $month_end = date('m',strtotime($event->event_end));
-
-	    if ($month_begin == $month_end)
-	    {
-		if (date('d',strtotime($event->event_begin)) <= date('d',strtotime($date)) && 
-			date('d',strtotime($event->event_end)) >= date('d',strtotime($date)))
-		{
-	      		array_push($arr_events, $event);
-		}
-	    }
-	    else if ($month_begin < $month_end)
-	    {
-		if ( ($event->event_begin <= date('Y-m-d',strtotime($date))) && (date('d',strtotime($event->event_begin)) <= date('d',strtotime($date)) || 
-			date('d',strtotime($event->event_end)) >= date('d',strtotime($date))) )
-		{
-	      		array_push($arr_events, $event);
-		}
-	    }
-          }
-     	}
-
-
-	// Now the ones that happen a finite number of times
-	$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'M' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '$date'),EXTRACT(YEAR_MONTH FROM event_begin))) <= event_repeats ORDER BY event_id");
-	if (!empty($events))
-     	{
-       	  foreach($events as $event)
-          {
-	    // This is going to get complex so lets setup what we would place in for 
-	    // an event so we can drop it in with ease
-
-	    // Technically we don't care about the years or months, but we need to find out if the 
-	    // event spans the turn of a year or month so we can deal with it appropriately.
-	    $month_begin = date('m',strtotime($event->event_begin));
-	    $month_end = date('m',strtotime($event->event_end));
-
-	    if ($month_begin == $month_end)
-	    {
-		if (date('d',strtotime($event->event_begin)) <= date('d',strtotime($date)) && 
-			date('d',strtotime($event->event_end)) >= date('d',strtotime($date)))
-		{
-		        array_push($arr_events, $event);
-		}
-	    }
-	    else if ($month_begin < $month_end)
-	    {
-		if ( ($event->event_begin <= date('Y-m-d',strtotime($date))) && (date('d',strtotime($event->event_begin)) <= date('d',strtotime($date)) || 
-			date('d',strtotime($event->event_end)) >= date('d',strtotime($date))) )
-		{
-	      		array_push($arr_events, $event);
-		}
-	    }
-          }
-     	}
-
-
-	/* 
-	  Weekly - well isn't this fun! We need to scan all weekly events, find what day they fell on
-	  and see if that matches the current day. If it does, we check to see if the repeats are 0. 
-	  If they are, display the event, if not, we fast forward from the original day in week blocks 
-	  until the number is exhausted. If the date we arrive at is in the future, display the event.
-	*/
-
-	// The weekly events that never stop recurring
-	$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'W' AND '$date' >= event_begin AND event_repeats = 0 ORDER BY event_id");
-	if (!empty($events))
-     	{
-       	  foreach($events as $event)
-          {
-	    // This is going to get complex so lets setup what we would place in for 
-	    // an event so we can drop it in with ease
-
-	    // Now we are going to check to see what day the original event
-	    // fell on and see if the current date is both after it and on 
-	    // the correct day. If it is, display the event!
-	    $day_start_event = date('D',strtotime($event->event_begin));
-	    $day_end_event = date('D',strtotime($event->event_end));
-	    $current_day = date('D',strtotime($date));
-
-	    $plan = array();
-	    $plan['Mon'] = 1;
-	    $plan['Tue'] = 2;
-	    $plan['Wed'] = 3;
-	    $plan['Thu'] = 4;
-	    $plan['Fri'] = 5;
-	    $plan['Sat'] = 6;
-	    $plan['Sun'] = 7;
-
-	    if ($plan[$day_start_event] > $plan[$day_end_event])
-	    {
-		if (($plan[$day_start_event] <= $plan[$current_day]) || ($plan[$current_day] <= $plan[$day_end_event]))
-	    	{
-			array_push($arr_events, $event);
-	    	}
-	    }
-	    else if (($plan[$day_start_event] < $plan[$day_end_event]) || ($plan[$day_start_event]== $plan[$day_end_event]))
-	    {
-		if (($plan[$day_start_event] <= $plan[$current_day]) && ($plan[$current_day] <= $plan[$day_end_event]))
-	    	{
-			array_push($arr_events, $event);
-	    	}		
-	    }
-	    
-          }
-     	}
-
-	// The weekly events that have a limit on how many times they occur
-	$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'W' AND '$date' >= event_begin AND event_repeats != 0 AND (event_repeats*7) >= (TO_DAYS('$date') - TO_DAYS(event_end)) ORDER BY event_id");
-	if (!empty($events))
-     	{
-       	  foreach($events as $event)
-          {
-	    // This is going to get complex so lets setup what we would place in for 
-	    // an event so we can drop it in with ease
-
-	    // Now we are going to check to see what day the original event
-	    // fell on and see if the current date is both after it and on 
-	    // the correct day. If it is, display the event!
-	    $day_start_event = date('D',strtotime($event->event_begin));
-	    $day_end_event = date('D',strtotime($event->event_end));
-	    $current_day = date('D',strtotime($date));
-
-	    $plan = array();
-	    $plan['Mon'] = 1;
-	    $plan['Tue'] = 2;
-	    $plan['Wed'] = 3;
-	    $plan['Thu'] = 4;
-	    $plan['Fri'] = 5;
-	    $plan['Sat'] = 6;
-	    $plan['Sun'] = 7;
-
-	    if ($plan[$day_start_event] > $plan[$day_end_event])
-	    {
-		if (($plan[$day_start_event] <= $plan[$current_day]) || ($plan[$current_day] <= $plan[$day_end_event]))
-	    	{
-			array_push($arr_events, $event);
-	    	}
-	    }
-	    else if (($plan[$day_start_event] < $plan[$day_end_event]) || ($plan[$day_start_event]== $plan[$day_end_event]))
-	    {
-		if (($plan[$day_start_event] <= $plan[$current_day]) && ($plan[$current_day] <= $plan[$day_end_event]))
-	    	{
-			array_push($arr_events, $event);
-	    	}		
-	    }
-
-          }
-     	}
- 
-     return $arr_events;
-}
-
-
-// Actually do the printing of the calendar
-// Compared to searching for and displaying events
-// this bit is really rather easy!
-function calendar()
-{
-    global $wpdb;
-
-    // First things first, make sure calendar is up to date
-    check_calendar();
-
-    // Deal with the week not starting on a monday
-    if (get_option('start_of_week') == 0)
-      {
-	$name_days = array(1=>__('Sunday','calendar'),__('Monday','calendar'),__('Tuesday','calendar'),__('Wednesday','calendar'),__('Thursday','calendar'),__('Friday','calendar'),__('Saturday','calendar'));
-      }
-    // Choose Monday if anything other than Sunday is set
-    else
-      {
-	$name_days = array(1=>__('Monday','calendar'),__('Tuesday','calendar'),__('Wednesday','calendar'),__('Thursday','calendar'),__('Friday','calendar'),__('Saturday','calendar'),__('Sunday','calendar'));
-      }
-
-    // Carry on with the script
-    $name_months = array(1=>__('January','calendar'),__('February','calendar'),__('March','calendar'),__('April','calendar'),__('May','calendar'),__('June','calendar'),__('July','calendar'),__('August','calendar'),__('September','calendar'),__('October','calendar'),__('November','calendar'),__('December','calendar'));
-
-    // If we don't pass arguments we want a calendar that is relevant to today
-    if (empty($_GET['month']) || empty($_GET['yr']))
-    {
-        $c_year = date("Y");
-        $c_month = date("m");
-        $c_day = date("d");
-    }
-
-    // Years get funny if we exceed 3000, so we use this check
-    if ($_GET['yr'] <= 3000 && $_GET['yr'] >= 0)
-    {
-        // This is just plain nasty and all because of permalinks
-        // which are no longer used, this will be cleaned up soon
-        if ($_GET['month'] == 'jan' || $_GET['month'] == 'feb' || $_GET['month'] == 'mar' || $_GET['month'] == 'apr' || $_GET['month'] == 'may' || $_GET['month'] == 'jun' || $_GET['month'] == 'jul' || $_GET['month'] == 'aug' || $_GET['month'] == 'sept' || $_GET['month'] == 'oct' || $_GET['month'] == 'nov' || $_GET['month'] == 'dec')
-	  {
-
-	       // Again nasty code to map permalinks into something
-	       // databases can understand. This will be cleaned up
-               $c_year = mysql_escape_string($_GET['yr']);
-               if ($_GET['month'] == 'jan') { $t_month = 1; }
-               else if ($_GET['month'] == 'feb') { $t_month = 2; }
-               else if ($_GET['month'] == 'mar') { $t_month = 3; }
-               else if ($_GET['month'] == 'apr') { $t_month = 4; }
-               else if ($_GET['month'] == 'may') { $t_month = 5; }
-               else if ($_GET['month'] == 'jun') { $t_month = 6; }
-               else if ($_GET['month'] == 'jul') { $t_month = 7; }
-               else if ($_GET['month'] == 'aug') { $t_month = 8; }
-               else if ($_GET['month'] == 'sept') { $t_month = 9; }
-               else if ($_GET['month'] == 'oct') { $t_month = 10; }
-               else if ($_GET['month'] == 'nov') { $t_month = 11; }
-               else if ($_GET['month'] == 'dec') { $t_month = 12; }
-               $c_month = $t_month;
-               $c_day = date("d");
-        }
-	// No valid month causes the calendar to default to today
-        else
-        {
-               $c_year = date("Y");
-               $c_month = date("m");
-               $c_day = date("d");
-        }
-    }
-    // No valid year causes the calendar to default to today
-    else
-    {
-        $c_year = date("Y");
-        $c_month = date("m");
-        $c_day = date("d");
-    }
-
-    // Fix the days of the week if week start is not on a monday
-    if (get_option('start_of_week') == 0)
-      {
-	$first_weekday = date("w",mktime(0,0,0,$c_month,1,$c_year));
-        $first_weekday = ($first_weekday==0?1:$first_weekday+1);
-      }
-    // Otherwise assume the week starts on a Monday. Anything other 
-    // than Sunday or Monday is just plain odd
-    else
-      {
-	$first_weekday = date("w",mktime(0,0,0,$c_month,1,$c_year));
-	$first_weekday = ($first_weekday==0?7:$first_weekday);
-      }
-
-    $days_in_month = date("t", mktime (0,0,0,$c_month,1,$c_year));
-
-    // Start the table and add the header and naviagtion
-    $calendar_body .= '
-<table cellspacing="1" cellpadding="0" class="calendar-table">
-';
-
-    // We want to know if we should display the date switcher
-    $date_switcher = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_jump'",0,0);
-
-    if ($date_switcher == 'true')
-      {
-	$calendar_body .= '<tr>
-        <td colspan="7" class="calendar-date-switcher">
-            <form method="GET" action="'.$_SERVER['REQUEST_URI'].'">
-';
-	$qsa = array();
-	parse_str($_SERVER['QUERY_STRING'],$qsa);
-	foreach ($qsa as $name => $argument)
-	  {
-	    if ($name != 'month' && $name != 'yr')
-	      {
-		$calendar_body .= '<input type="hidden" name="'.$name.'" value="'.$argument.'" />
-';
-	      }
-	  }
-	function month_comparison($month)
-	  {
-	    $current_month = strtolower(date("M", time()));
-	    if (isset($_GET['yr']) && isset($_GET['month']))
-	      {
-		if ($month == $_GET['month'])
-		  {
-		    return ' selected="selected"';
-		  }
-	      }
-	    elseif ($month == $current_month) 
-	      { 
-		return ' selected="selected"'; 
-	      }
-	  }
-	// We build the months in the switcher
-	$calendar_body .= '
-            '.__('Month','calendar').': <select name="month" style="width:100px;">
-            <option value="jan"'.month_comparison('jan').'>'.__('January','calendar').'</option>
-            <option value="feb"'.month_comparison('feb').'>'.__('February','calendar').'</option>
-            <option value="mar"'.month_comparison('mar').'>'.__('March','calendar').'</option>
-            <option value="apr"'.month_comparison('apr').'>'.__('April','calendar').'</option>
-            <option value="may"'.month_comparison('may').'>'.__('May','calendar').'</option>
-            <option value="jun"'.month_comparison('jun').'>'.__('June','calendar').'</option>
-            <option value="jul"'.month_comparison('jul').'>'.__('July','calendar').'</option> 
-            <option value="aug"'.month_comparison('aug').'>'.__('August','calendar').'</option> 
-            <option value="sept"'.month_comparison('sept').'>'.__('September','calendar').'</option> 
-            <option value="oct"'.month_comparison('oct').'>'.__('October','calendar').'</option> 
-            <option value="nov"'.month_comparison('nov').'>'.__('November','calendar').'</option> 
-            <option value="dec"'.month_comparison('dec').'>'.__('December','calendar').'</option> 
-            </select>
-            '.__('Year','calendar').': <select name="yr" style="width:60px;">
-';
-
-	// The year builder is string mania. If you can make sense of this, 
-        // you know your PHP!
-	function year_comparison($year)
-          {
-            $current_year = strtolower(date("Y", time()));
-            if (isset($_GET['yr']) && isset($_GET['month']))
-              {
-                if ($year == $_GET['yr'])
-                  {
-                    return ' selected="selected"';
-                  }
-              }
-            else if ($year == $current_year)
-              {
-                return ' selected="selected"';
-              }
-          }
-
-	$past = 30;
-	$future = 30;
-	$fut = 1;
-	while ($past > 0)
-	  {
-	    $p .= '            <option value="';
-	    $p .= date("Y",time())-$past;
-	    $p .= '"'.year_comparison(date("Y",time())-$past).'>';
-	    $p .= date("Y",time())-$past.'</option>
-';
-	    $past = $past - 1;
-	  }
-	while ($fut < $future) 
-	  {
-	    $f .= '            <option value="';
-	    $f .= date("Y",time())+$fut;
-	    $f .= '"'.year_comparison(date("Y",time())+$fut).'>';
-	    $f .= date("Y",time())+$fut.'</option>
-';
-	    $fut = $fut + 1;
-	  } 
-	$calendar_body .= $p;
-	$calendar_body .= '            <option value="'.date("Y",time()).'"'.year_comparison(date("Y",time())).'>'.date("Y",time()).'</option>
-';
-	$calendar_body .= $f;
-        $calendar_body .= '</select>
-            <input type="submit" value="Go" />
-            </form>
-        </td>
-</tr>
-';
-      }
-
-    // The header of the calendar table and the links. Note calls to link functions
-    $calendar_body .= '<tr>
-                <td colspan="7" class="calendar-heading">
-                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
-                    <tr>
-                    <td class="calendar-prev">' . prev_link($c_year,$c_month) . '</td>
-                    <td class="calendar-month">'.$name_months[(int)$c_month].' '.$c_year.'</td>
-                    <td class="calendar-next">' . next_link($c_year,$c_month) . '</td>
-                    </tr>
-                    </table>
-                </td>
-</tr>
-';
-
-    // Print the headings of the days of the week
-    $calendar_body .= '<tr>
-';
-    for ($i=1; $i<=7; $i++) 
-      {
-	// Colours need to be different if the starting day of the week is different
-	if (get_option('start_of_week') == 0)
-	  {
-	    $calendar_body .= '        <td class="'.($i<7&&$i>1?'normal-day-heading':'weekend-heading').'">'.$name_days[$i].'</td>
-';
-	  }
-	else
-	  {
-	    $calendar_body .= '        <td class="'.($i<6?'normal-day-heading':'weekend-heading').'">'.$name_days[$i].'</td>
-';
-	  }
-      }
-    $calendar_body .= '</tr>
-';
-
-    for ($i=1; $i<=$days_in_month;)
-      {
-        $calendar_body .= '<tr>
-';
-        for ($ii=1; $ii<=7; $ii++)
-	  {
-            if ($ii==$first_weekday && $i==1)
-	      {
-		$go = TRUE;
-	      }
-            elseif ($i > $days_in_month ) 
-	      {
-		$go = FALSE;
-	      }
-
-            if ($go) 
-	      {
-		// Colours again, this time for the day numbers
-		if (get_option('start_of_week') == 0)
-		  {
-		    // This bit of code is for styles believe it or not.
-		    $grabbed_events = grab_events($c_year,$c_month,$i);
-		    $no_events_class = '';
-		    if (!count($grabbed_events))
-		      {
-			$no_events_class = ' no-events';
-		      }
-		    $calendar_body .= '        <td class="'.(date("Ymd", mktime (0,0,0,$c_month,$i,$c_year))==date("Ymd")?'current-day':'day-with-date').$no_events_class.'"><span '.($ii<7&&$ii>1?'':'class="weekend"').'>'.$i++.'</span><span class="event">' . draw_events($grabbed_events) . '</span></td>
-';
-		  }
-		else
-		  {
-		    $grabbed_events = grab_events($c_year,$c_month,$i);
-		    $no_events_class = '';
-	            if (!count($grabbed_events))
-		      {
-			$no_events_class = ' no-events';
-		      }
-		    $calendar_body .= '        <td class="'.(date("Ymd", mktime (0,0,0,$c_month,$i,$c_year))==date("Ymd")?'current-day':'day-with-date').$no_events_class.'"><span '.($ii<6?'':'class="weekend"').'>'.$i++.'</span><span class="event">' . draw_events($grabbed_events) . '</span></td>
-';
-		  }
-	      }
-            else 
-	      {
-		$calendar_body .= '        <td class="day-without-date">&nbsp;</td>
-';
-	      }
-        }
-        $calendar_body .= '</tr>
-';
-    }
-    $show_cat = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='enable_categories'",0,0);
-
-    if ($show_cat == 'true')
-      {
-	$sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " ORDER BY category_name ASC";
-	$cat_details = $wpdb->get_results($sql);
-        $calendar_body .= '<tr><td colspan="7">
-<table class="cat-key">
-<tr><td colspan="2"><strong>'.__('Category Key','calendar').'</strong></td></tr>
-';
-        foreach($cat_details as $cat_detail)
-	  {
-	    $calendar_body .= '<tr><td style="background-color:'.$cat_detail->category_colour.'; width:20px; height:20px;"></td><td>'.$cat_detail->category_name.'</td></tr>';
-	  }
-        $calendar_body .= '</table>
-</td></tr>
-';
-      }
-    $calendar_body .= '</table>
-';
-
-    // A little link to yours truely. See the README if you wish to remove this
-    $calendar_body .= '<div class="kjo-link" style="visibility:visible;display:block;"><p>'.__('Calendar developed and supported by ', 'calendar').'<a href="http://www.kieranoshea.com">Kieran O\'Shea</a></p></div>
-';
-
-    // Phew! After that bit of string building, spit it all out.
-    // The actual printing is done by the calling function.
-    return $calendar_body;
-}
-
-?>
--- a/web/wp-content/plugins/calendar/calendar.pot	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,505 +0,0 @@
-# Calendar translation file
-# Copyright (C) 2009 Kieran O'Shea
-# This file is distributed under the same license as the PACKAGE package.
-# Kieran O'Shea <kieran@kieranoshea.com>, 2009
-
-#: calendar.php:116
-msgid "Calendar"
-msgstr ""
-
-#: calendar.php:120
-msgid "Manage Calendar"
-msgstr ""
-
-#: calendar.php:123 calendar.php:1628
-msgid "Manage Categories"
-msgstr ""
-
-#: calendar.php:124
-msgid "Calendar Config"
-msgstr ""
-
-#: calendar.php:124 calendar.php:1437
-msgid "Calendar Options"
-msgstr ""
-
-#: calendar.php:516 calendar.php:1640
-msgid "ID"
-msgstr ""
-
-#: calendar.php:517 calendar.php:1992 calendar.php:2025
-msgid "Title"
-msgstr ""
-
-#: calendar.php:518
-msgid "Description"
-msgstr ""
-
-#: calendar.php:519 calendar.php:665
-msgid "Start Date"
-msgstr ""
-
-#: calendar.php:520 calendar.php:683
-msgid "End Date"
-msgstr ""
-
-#: calendar.php:521
-msgid "Recurs"
-msgstr ""
-
-#: calendar.php:522
-msgid "Repeats"
-msgstr ""
-
-#: calendar.php:523 calendar.php:1447
-msgid "Author"
-msgstr ""
-
-#: calendar.php:524
-msgid "Category"
-msgstr ""
-
-#: calendar.php:525 calendar.php:565 calendar.php:1643 calendar.php:1657
-msgid "Edit"
-msgstr ""
-
-#: calendar.php:526 calendar.php:566 calendar.php:1644 calendar.php:1666
-msgid "Delete"
-msgstr ""
-
-#: calendar.php:544
-msgid "Never"
-msgstr ""
-
-#: calendar.php:545
-msgid "Weekly"
-msgstr ""
-
-#: calendar.php:546
-msgid "Monthly"
-msgstr ""
-
-#: calendar.php:547
-msgid "Yearly"
-msgstr ""
-
-#: calendar.php:553 calendar.php:1661
-msgid "N/A"
-msgstr ""
-
-#: calendar.php:554
-msgid "Forever"
-msgstr ""
-
-#: calendar.php:555
-msgid "Times"
-msgstr ""
-
-#: calendar.php:566
-msgid "Are you sure you want to delete this event?"
-msgstr ""
-
-#: calendar.php:577
-msgid "There are no events in the database!"
-msgstr ""
-
-#: calendar.php:593
-msgid "Bad Monkey! No banana!"
-msgstr ""
-
-#: calendar.php:601
-msgid "An event with that ID couldn't be found"
-msgstr ""
-
-#: calendar.php:628
-msgid "Event Title"
-msgstr ""
-
-#: calendar.php:633
-msgid "Event Description"
-msgstr ""
-
-#: calendar.php:637
-msgid "Event Category"
-msgstr ""
-
-#: calendar.php:661
-msgid "Event Link (Optional)"
-msgstr ""
-
-#: calendar.php:679 calendar.php:704
-msgid "Select Date"
-msgstr ""
-
-#: calendar.php:708
-msgid "Time (hh:mm)"
-msgstr ""
-
-#: calendar.php:726
-msgid "Optional, set blank if not required."
-msgstr ""
-
-#: calendar.php:726
-msgid "Current time difference from GMT is "
-msgstr ""
-
-#: calendar.php:726
-msgid " hour(s)"
-msgstr ""
-
-#: calendar.php:730
-msgid "Recurring Events"
-msgstr ""
-
-#: calendar.php:758
-msgid "Repeats for"
-msgstr ""
-
-#: calendar.php:766
-msgid ""
-"Entering 0 means forever. Where the recurrance interval is left at none, the "
-"event will not reoccur."
-msgstr ""
-
-#: calendar.php:773 calendar.php:1503 calendar.php:1590 calendar.php:1626
-msgid "Save"
-msgstr ""
-
-#: calendar.php:878 calendar.php:885 calendar.php:892 calendar.php:905
-#: calendar.php:916 calendar.php:927 calendar.php:938 calendar.php:956
-#: calendar.php:1040 calendar.php:1047 calendar.php:1054 calendar.php:1067
-#: calendar.php:1078 calendar.php:1089 calendar.php:1100 calendar.php:1150
-#: calendar.php:1170
-msgid "Error"
-msgstr ""
-
-#: calendar.php:878 calendar.php:1040
-msgid ""
-"Your event end date must be either after or the same as your event begin date"
-msgstr ""
-
-#: calendar.php:885 calendar.php:1047
-msgid ""
-"Your date formatting is correct but one or more of your dates is invalid. "
-"Check for number of days in month and leap year related errors."
-msgstr ""
-
-#: calendar.php:892 calendar.php:1054
-msgid ""
-"Both start and end dates must be entered and be in the format YYYY-MM-DD"
-msgstr ""
-
-#: calendar.php:905 calendar.php:1067
-msgid "The time field must either be blank or be entered in the format hh:mm"
-msgstr ""
-
-#: calendar.php:916 calendar.php:1078
-msgid ""
-"The URL entered must either be prefixed with http:// or be completely blank"
-msgstr ""
-
-#: calendar.php:927 calendar.php:1089
-msgid ""
-"The event title must be between 1 and 30 characters in length and contain no "
-"punctuation. Spaces are allowed but the title must not start with one."
-msgstr ""
-
-#: calendar.php:938 calendar.php:1100
-msgid ""
-"The repetition value must be 0 unless a type of recurrance is selected in "
-"which case the repetition value must be 0 or higher"
-msgstr ""
-
-#: calendar.php:956
-msgid ""
-"An event with the details you submitted could not be found in the database. "
-"This may indicate a problem with your database or the way in which it is "
-"configured."
-msgstr ""
-
-#: calendar.php:962
-msgid "Event added. It will now show in your calendar."
-msgstr ""
-
-#: calendar.php:1010 calendar.php:1118
-msgid "Failure"
-msgstr ""
-
-#: calendar.php:1010
-msgid "You can't update an event if you haven't submitted an event id"
-msgstr ""
-
-#: calendar.php:1118
-msgid ""
-"The database failed to return data to indicate the event has been updated "
-"sucessfully. This may indicate a problem with your database or the way in "
-"which it is configured."
-msgstr ""
-
-#: calendar.php:1124
-msgid "Event updated successfully"
-msgstr ""
-
-#: calendar.php:1150
-msgid "You can't delete an event if you haven't submitted an event id"
-msgstr ""
-
-#: calendar.php:1164
-msgid "Event deleted successfully"
-msgstr ""
-
-#: calendar.php:1170
-msgid ""
-"Despite issuing a request to delete, the event still remains in the "
-"database. Please investigate."
-msgstr ""
-
-#: calendar.php:1186
-msgid "Edit Event"
-msgstr ""
-
-#: calendar.php:1190
-msgid "You must provide an event id in order to edit it"
-msgstr ""
-
-#: calendar.php:1200
-msgid "Add Event"
-msgstr ""
-
-#: calendar.php:1203
-msgid "Manage Events"
-msgstr ""
-
-#: calendar.php:1294
-msgid "Settings saved"
-msgstr ""
-
-#: calendar.php:1443
-msgid "Choose the lowest user group that may manage events"
-msgstr ""
-
-#: calendar.php:1445
-msgid "Subscriber"
-msgstr ""
-
-#: calendar.php:1446
-msgid "Contributor"
-msgstr ""
-
-#: calendar.php:1448
-msgid "Editor"
-msgstr ""
-
-#: calendar.php:1449
-msgid "Administrator"
-msgstr ""
-
-#: calendar.php:1454
-msgid "Do you want to display the author name on events?"
-msgstr ""
-
-#: calendar.php:1456 calendar.php:1464 calendar.php:1472 calendar.php:1480
-#: calendar.php:1489
-msgid "Yes"
-msgstr ""
-
-#: calendar.php:1457 calendar.php:1465 calendar.php:1473 calendar.php:1481
-#: calendar.php:1490
-msgid "No"
-msgstr ""
-
-#: calendar.php:1462
-msgid "Display a jumpbox for changing month and year quickly?"
-msgstr ""
-
-#: calendar.php:1470
-msgid "Display todays events?"
-msgstr ""
-
-#: calendar.php:1478
-msgid "Display upcoming events?"
-msgstr ""
-
-#: calendar.php:1483
-msgid "for"
-msgstr ""
-
-#: calendar.php:1483
-msgid "days into the future"
-msgstr ""
-
-#: calendar.php:1487
-msgid "Enable event categories?"
-msgstr ""
-
-#: calendar.php:1495
-msgid "Configure the stylesheet for Calendar"
-msgstr ""
-
-#: calendar.php:1497
-msgid "Tick this box if you wish to reset the Calendar style to default"
-msgstr ""
-
-#: calendar.php:1555
-msgid "Category added successfully"
-msgstr ""
-
-#: calendar.php:1563
-msgid "Category deleted successfully"
-msgstr ""
-
-#: calendar.php:1571
-msgid "Edit Category"
-msgstr ""
-
-#: calendar.php:1579 calendar.php:1615 calendar.php:1641
-msgid "Category Name"
-msgstr ""
-
-#: calendar.php:1583 calendar.php:1619
-msgid "Category Colour (Hex format)"
-msgstr ""
-
-#: calendar.php:1599
-msgid "Category edited successfully"
-msgstr ""
-
-#: calendar.php:1607
-msgid "Add Category"
-msgstr ""
-
-#: calendar.php:1642
-msgid "Category Colour"
-msgstr ""
-
-#: calendar.php:1666
-msgid "Are you sure you want to delete this category?"
-msgstr ""
-
-#: calendar.php:1679
-msgid "There are no categories in the database - something has gone wrong!"
-msgstr ""
-
-#: calendar.php:1750 calendar.php:1756
-msgid "Next"
-msgstr ""
-
-#: calendar.php:1768 calendar.php:1774
-msgid "Prev"
-msgstr ""
-
-#: calendar.php:1806 calendar.php:1848 calendar.php:1904 calendar.php:1946
-msgid "all day"
-msgstr ""
-
-#: calendar.php:1809 calendar.php:1851 calendar.php:1907 calendar.php:1949
-msgid "at"
-msgstr ""
-
-#: calendar.php:1821 calendar.php:2011 calendar.php:2031 calendar.php:2032
-msgid "Upcoming Events"
-msgstr ""
-
-#: calendar.php:1842 calendar.php:1978 calendar.php:1998 calendar.php:1999
-msgid "Today's Events"
-msgstr ""
-
-#: calendar.php:2060 calendar.php:2104
-msgid "Time"
-msgstr ""
-
-#: calendar.php:2065 calendar.php:2109
-msgid "Posted by"
-msgstr ""
-
-#: calendar.php:2404 calendar.php:2409
-msgid "Sunday"
-msgstr ""
-
-#: calendar.php:2404 calendar.php:2409
-msgid "Monday"
-msgstr ""
-
-#: calendar.php:2404 calendar.php:2409
-msgid "Tuesday"
-msgstr ""
-
-#: calendar.php:2404 calendar.php:2409
-msgid "Wednesday"
-msgstr ""
-
-#: calendar.php:2404 calendar.php:2409
-msgid "Thursday"
-msgstr ""
-
-#: calendar.php:2404 calendar.php:2409
-msgid "Friday"
-msgstr ""
-
-#: calendar.php:2404 calendar.php:2409
-msgid "Saturday"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2523
-msgid "January"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2524
-msgid "February"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2525
-msgid "March"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2526
-msgid "April"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2527
-msgid "May"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2528
-msgid "June"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2529
-msgid "July"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2530
-msgid "August"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2531
-msgid "September"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2532
-msgid "October"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2533
-msgid "November"
-msgstr ""
-
-#: calendar.php:2413 calendar.php:2534
-msgid "December"
-msgstr ""
-
-#: calendar.php:2522
-msgid "Month"
-msgstr ""
-
-#: calendar.php:2536
-msgid "Year"
-msgstr ""
-
-#: calendar.php:2683
-msgid "Category Key"
-msgstr ""
-
-#: calendar.php:2697
-msgid "Calendar developed and supported by "
-msgstr ""
--- a/web/wp-content/plugins/calendar/javascript.js	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1467 +0,0 @@
-// ===================================================================
-// Author: Matt Kruse <matt@mattkruse.com>
-// WWW: http://www.mattkruse.com/
-//
-// NOTICE: You may use this code for any purpose, commercial or
-// private, without any further permission from the author. You may
-// remove this notice from your final code if you wish, however it is
-// appreciated by the author if at least my web site address is kept.
-//
-// You may *NOT* re-distribute this code in any way except through its
-// use. That means, you can include it in your product, or your web
-// site, or any other form where the code is actually being used. You
-// may not put the plain javascript up on your site for download or
-// include it in your javascript libraries for download. 
-// If you wish to share this code with others, please just point them
-// to the URL instead.
-// Please DO NOT link directly to my .js files from your site. Copy
-// the files to your server and use them there. Thank you.
-// ===================================================================
-
-
-/* SOURCE FILE: AnchorPosition.js */
-
-/* 
-AnchorPosition.js
-Author: Matt Kruse
-Last modified: 10/11/02
-
-DESCRIPTION: These functions find the position of an <A> tag in a document,
-so other elements can be positioned relative to it.
-
-COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
-positioning errors - usually with Window positioning - occur on the 
-Macintosh platform.
-
-FUNCTIONS:
-getAnchorPosition(anchorname)
-  Returns an Object() having .x and .y properties of the pixel coordinates
-  of the upper-left corner of the anchor. Position is relative to the PAGE.
-
-getAnchorWindowPosition(anchorname)
-  Returns an Object() having .x and .y properties of the pixel coordinates
-  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.
-
-NOTES:
-
-1) For popping up separate browser windows, use getAnchorWindowPosition. 
-   Otherwise, use getAnchorPosition
-
-2) Your anchor tag MUST contain both NAME and ID attributes which are the 
-   same. For example:
-   <A NAME="test" ID="test"> </A>
-
-3) There must be at least a space between <A> </A> for IE5.5 to see the 
-   anchor tag correctly. Do not do <A></A> with no space.
-*/ 
-
-// getAnchorPosition(anchorname)
-//   This function returns an object having .x and .y properties which are the coordinates
-//   of the named anchor, relative to the page.
-function getAnchorPosition(anchorname) {
-	// This function will return an Object with x and y properties
-	var useWindow=false;
-	var coordinates=new Object();
-	var x=0,y=0;
-	// Browser capability sniffing
-	var use_gebi=false, use_css=false, use_layers=false;
-	if (document.getElementById) { use_gebi=true; }
-	else if (document.all) { use_css=true; }
-	else if (document.layers) { use_layers=true; }
-	// Logic to find position
- 	if (use_gebi && document.all) {
-		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
-		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
-		}
-	else if (use_gebi) {
-		var o=document.getElementById(anchorname);
-		x=AnchorPosition_getPageOffsetLeft(o);
-		y=AnchorPosition_getPageOffsetTop(o);
-		}
- 	else if (use_css) {
-		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
-		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
-		}
-	else if (use_layers) {
-		var found=0;
-		for (var i=0; i<document.anchors.length; i++) {
-			if (document.anchors[i].name==anchorname) { found=1; break; }
-			}
-		if (found==0) {
-			coordinates.x=0; coordinates.y=0; return coordinates;
-			}
-		x=document.anchors[i].x;
-		y=document.anchors[i].y;
-		}
-	else {
-		coordinates.x=0; coordinates.y=0; return coordinates;
-		}
-	coordinates.x=x;
-	coordinates.y=y;
-	return coordinates;
-	}
-
-// getAnchorWindowPosition(anchorname)
-//   This function returns an object having .x and .y properties which are the coordinates
-//   of the named anchor, relative to the window
-function getAnchorWindowPosition(anchorname) {
-	var coordinates=getAnchorPosition(anchorname);
-	var x=0;
-	var y=0;
-	if (document.getElementById) {
-		if (isNaN(window.screenX)) {
-			x=coordinates.x-document.body.scrollLeft+window.screenLeft;
-			y=coordinates.y-document.body.scrollTop+window.screenTop;
-			}
-		else {
-			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
-			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
-			}
-		}
-	else if (document.all) {
-		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
-		y=coordinates.y-document.body.scrollTop+window.screenTop;
-		}
-	else if (document.layers) {
-		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
-		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
-		}
-	coordinates.x=x;
-	coordinates.y=y;
-	return coordinates;
-	}
-
-// Functions for IE to get position of an object
-function AnchorPosition_getPageOffsetLeft (el) {
-	var ol=el.offsetLeft;
-	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
-	return ol;
-	}
-function AnchorPosition_getWindowOffsetLeft (el) {
-	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
-	}	
-function AnchorPosition_getPageOffsetTop (el) {
-	var ot=el.offsetTop;
-	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
-	return ot;
-	}
-function AnchorPosition_getWindowOffsetTop (el) {
-	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
-	}
-
-/* SOURCE FILE: date.js */
-
-// HISTORY
-// ------------------------------------------------------------------
-// May 17, 2003: Fixed bug in parseDate() for dates <1970
-// March 11, 2003: Added parseDate() function
-// March 11, 2003: Added "NNN" formatting option. Doesn't match up
-//                 perfectly with SimpleDateFormat formats, but 
-//                 backwards-compatability was required.
-
-// ------------------------------------------------------------------
-// These functions use the same 'format' strings as the 
-// java.text.SimpleDateFormat class, with minor exceptions.
-// The format string consists of the following abbreviations:
-// 
-// Field        | Full Form          | Short Form
-// -------------+--------------------+-----------------------
-// Year         | yyyy (4 digits)    | yy (2 digits), y (2 or 4 digits)
-// Month        | MMM (name or abbr.)| MM (2 digits), M (1 or 2 digits)
-//              | NNN (abbr.)        |
-// Day of Month | dd (2 digits)      | d (1 or 2 digits)
-// Day of Week  | EE (name)          | E (abbr)
-// Hour (1-12)  | hh (2 digits)      | h (1 or 2 digits)
-// Hour (0-23)  | HH (2 digits)      | H (1 or 2 digits)
-// Hour (0-11)  | KK (2 digits)      | K (1 or 2 digits)
-// Hour (1-24)  | kk (2 digits)      | k (1 or 2 digits)
-// Minute       | mm (2 digits)      | m (1 or 2 digits)
-// Second       | ss (2 digits)      | s (1 or 2 digits)
-// AM/PM        | a                  |
-//
-// NOTE THE DIFFERENCE BETWEEN MM and mm! Month=MM, not mm!
-// Examples:
-//  "MMM d, y" matches: January 01, 2000
-//                      Dec 1, 1900
-//                      Nov 20, 00
-//  "M/d/yy"   matches: 01/20/00
-//                      9/2/00
-//  "MMM dd, yyyy hh:mm:ssa" matches: "January 01, 2000 12:30:45AM"
-// ------------------------------------------------------------------
-
-var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
-var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat');
-function LZ(x) {return(x<0||x>9?"":"0")+x}
-
-// ------------------------------------------------------------------
-// isDate ( date_string, format_string )
-// Returns true if date string matches format of format string and
-// is a valid date. Else returns false.
-// It is recommended that you trim whitespace around the value before
-// passing it to this function, as whitespace is NOT ignored!
-// ------------------------------------------------------------------
-function isDate(val,format) {
-	var date=getDateFromFormat(val,format);
-	if (date==0) { return false; }
-	return true;
-	}
-
-// -------------------------------------------------------------------
-// compareDates(date1,date1format,date2,date2format)
-//   Compare two date strings to see which is greater.
-//   Returns:
-//   1 if date1 is greater than date2
-//   0 if date2 is greater than date1 of if they are the same
-//  -1 if either of the dates is in an invalid format
-// -------------------------------------------------------------------
-function compareDates(date1,dateformat1,date2,dateformat2) {
-	var d1=getDateFromFormat(date1,dateformat1);
-	var d2=getDateFromFormat(date2,dateformat2);
-	if (d1==0 || d2==0) {
-		return -1;
-		}
-	else if (d1 > d2) {
-		return 1;
-		}
-	return 0;
-	}
-
-// ------------------------------------------------------------------
-// formatDate (date_object, format)
-// Returns a date in the output format specified.
-// The format string uses the same abbreviations as in getDateFromFormat()
-// ------------------------------------------------------------------
-function formatDate(date,format) {
-	format=format+"";
-	var result="";
-	var i_format=0;
-	var c="";
-	var token="";
-	var y=date.getYear()+"";
-	var M=date.getMonth()+1;
-	var d=date.getDate();
-	var E=date.getDay();
-	var H=date.getHours();
-	var m=date.getMinutes();
-	var s=date.getSeconds();
-	var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;
-	// Convert real date parts into formatted versions
-	var value=new Object();
-	if (y.length < 4) {y=""+(y-0+1900);}
-	value["y"]=""+y;
-	value["yyyy"]=y;
-	value["yy"]=y.substring(2,4);
-	value["M"]=M;
-	value["MM"]=LZ(M);
-	value["MMM"]=MONTH_NAMES[M-1];
-	value["NNN"]=MONTH_NAMES[M+11];
-	value["d"]=d;
-	value["dd"]=LZ(d);
-	value["E"]=DAY_NAMES[E+7];
-	value["EE"]=DAY_NAMES[E];
-	value["H"]=H;
-	value["HH"]=LZ(H);
-	if (H==0){value["h"]=12;}
-	else if (H>12){value["h"]=H-12;}
-	else {value["h"]=H;}
-	value["hh"]=LZ(value["h"]);
-	if (H>11){value["K"]=H-12;} else {value["K"]=H;}
-	value["k"]=H+1;
-	value["KK"]=LZ(value["K"]);
-	value["kk"]=LZ(value["k"]);
-	if (H > 11) { value["a"]="PM"; }
-	else { value["a"]="AM"; }
-	value["m"]=m;
-	value["mm"]=LZ(m);
-	value["s"]=s;
-	value["ss"]=LZ(s);
-	while (i_format < format.length) {
-		c=format.charAt(i_format);
-		token="";
-		while ((format.charAt(i_format)==c) && (i_format < format.length)) {
-			token += format.charAt(i_format++);
-			}
-		if (value[token] != null) { result=result + value[token]; }
-		else { result=result + token; }
-		}
-	return result;
-	}
-	
-// ------------------------------------------------------------------
-// Utility functions for parsing in getDateFromFormat()
-// ------------------------------------------------------------------
-function _isInteger(val) {
-	var digits="1234567890";
-	for (var i=0; i < val.length; i++) {
-		if (digits.indexOf(val.charAt(i))==-1) { return false; }
-		}
-	return true;
-	}
-function _getInt(str,i,minlength,maxlength) {
-	for (var x=maxlength; x>=minlength; x--) {
-		var token=str.substring(i,i+x);
-		if (token.length < minlength) { return null; }
-		if (_isInteger(token)) { return token; }
-		}
-	return null;
-	}
-	
-// ------------------------------------------------------------------
-// getDateFromFormat( date_string , format_string )
-//
-// This function takes a date string and a format string. It matches
-// If the date string matches the format string, it returns the 
-// getTime() of the date. If it does not match, it returns 0.
-// ------------------------------------------------------------------
-function getDateFromFormat(val,format) {
-	val=val+"";
-	format=format+"";
-	var i_val=0;
-	var i_format=0;
-	var c="";
-	var token="";
-	var token2="";
-	var x,y;
-	var now=new Date();
-	var year=now.getYear();
-	var month=now.getMonth()+1;
-	var date=1;
-	var hh=now.getHours();
-	var mm=now.getMinutes();
-	var ss=now.getSeconds();
-	var ampm="";
-	
-	while (i_format < format.length) {
-		// Get next token from format string
-		c=format.charAt(i_format);
-		token="";
-		while ((format.charAt(i_format)==c) && (i_format < format.length)) {
-			token += format.charAt(i_format++);
-			}
-		// Extract contents of value based on format token
-		if (token=="yyyy" || token=="yy" || token=="y") {
-			if (token=="yyyy") { x=4;y=4; }
-			if (token=="yy")   { x=2;y=2; }
-			if (token=="y")    { x=2;y=4; }
-			year=_getInt(val,i_val,x,y);
-			if (year==null) { return 0; }
-			i_val += year.length;
-			if (year.length==2) {
-				if (year > 70) { year=1900+(year-0); }
-				else { year=2000+(year-0); }
-				}
-			}
-		else if (token=="MMM"||token=="NNN"){
-			month=0;
-			for (var i=0; i<MONTH_NAMES.length; i++) {
-				var month_name=MONTH_NAMES[i];
-				if (val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase()) {
-					if (token=="MMM"||(token=="NNN"&&i>11)) {
-						month=i+1;
-						if (month>12) { month -= 12; }
-						i_val += month_name.length;
-						break;
-						}
-					}
-				}
-			if ((month < 1)||(month>12)){return 0;}
-			}
-		else if (token=="EE"||token=="E"){
-			for (var i=0; i<DAY_NAMES.length; i++) {
-				var day_name=DAY_NAMES[i];
-				if (val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()) {
-					i_val += day_name.length;
-					break;
-					}
-				}
-			}
-		else if (token=="MM"||token=="M") {
-			month=_getInt(val,i_val,token.length,2);
-			if(month==null||(month<1)||(month>12)){return 0;}
-			i_val+=month.length;}
-		else if (token=="dd"||token=="d") {
-			date=_getInt(val,i_val,token.length,2);
-			if(date==null||(date<1)||(date>31)){return 0;}
-			i_val+=date.length;}
-		else if (token=="hh"||token=="h") {
-			hh=_getInt(val,i_val,token.length,2);
-			if(hh==null||(hh<1)||(hh>12)){return 0;}
-			i_val+=hh.length;}
-		else if (token=="HH"||token=="H") {
-			hh=_getInt(val,i_val,token.length,2);
-			if(hh==null||(hh<0)||(hh>23)){return 0;}
-			i_val+=hh.length;}
-		else if (token=="KK"||token=="K") {
-			hh=_getInt(val,i_val,token.length,2);
-			if(hh==null||(hh<0)||(hh>11)){return 0;}
-			i_val+=hh.length;}
-		else if (token=="kk"||token=="k") {
-			hh=_getInt(val,i_val,token.length,2);
-			if(hh==null||(hh<1)||(hh>24)){return 0;}
-			i_val+=hh.length;hh--;}
-		else if (token=="mm"||token=="m") {
-			mm=_getInt(val,i_val,token.length,2);
-			if(mm==null||(mm<0)||(mm>59)){return 0;}
-			i_val+=mm.length;}
-		else if (token=="ss"||token=="s") {
-			ss=_getInt(val,i_val,token.length,2);
-			if(ss==null||(ss<0)||(ss>59)){return 0;}
-			i_val+=ss.length;}
-		else if (token=="a") {
-			if (val.substring(i_val,i_val+2).toLowerCase()=="am") {ampm="AM";}
-			else if (val.substring(i_val,i_val+2).toLowerCase()=="pm") {ampm="PM";}
-			else {return 0;}
-			i_val+=2;}
-		else {
-			if (val.substring(i_val,i_val+token.length)!=token) {return 0;}
-			else {i_val+=token.length;}
-			}
-		}
-	// If there are any trailing characters left in the value, it doesn't match
-	if (i_val != val.length) { return 0; }
-	// Is date valid for month?
-	if (month==2) {
-		// Check for leap year
-		if ( ( (year%4==0)&&(year%100 != 0) ) || (year%400==0) ) { // leap year
-			if (date > 29){ return 0; }
-			}
-		else { if (date > 28) { return 0; } }
-		}
-	if ((month==4)||(month==6)||(month==9)||(month==11)) {
-		if (date > 30) { return 0; }
-		}
-	// Correct hours value
-	if (hh<12 && ampm=="PM") { hh=hh-0+12; }
-	else if (hh>11 && ampm=="AM") { hh-=12; }
-	var newdate=new Date(year,month-1,date,hh,mm,ss);
-	return newdate.getTime();
-	}
-
-// ------------------------------------------------------------------
-// parseDate( date_string [, prefer_euro_format] )
-//
-// This function takes a date string and tries to match it to a
-// number of possible date formats to get the value. It will try to
-// match against the following international formats, in this order:
-// y-M-d   MMM d, y   MMM d,y   y-MMM-d   d-MMM-y  MMM d
-// M/d/y   M-d-y      M.d.y     MMM-d     M/d      M-d
-// d/M/y   d-M-y      d.M.y     d-MMM     d/M      d-M
-// A second argument may be passed to instruct the method to search
-// for formats like d/M/y (european format) before M/d/y (American).
-// Returns a Date object or null if no patterns match.
-// ------------------------------------------------------------------
-function parseDate(val) {
-	var preferEuro=(arguments.length==2)?arguments[1]:false;
-	generalFormats=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d');
-	monthFirst=new Array('M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d');
-	dateFirst =new Array('d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M');
-	var checkList=new Array('generalFormats',preferEuro?'dateFirst':'monthFirst',preferEuro?'monthFirst':'dateFirst');
-	var d=null;
-	for (var i=0; i<checkList.length; i++) {
-		var l=window[checkList[i]];
-		for (var j=0; j<l.length; j++) {
-			d=getDateFromFormat(val,l[j]);
-			if (d!=0) { return new Date(d); }
-			}
-		}
-	return null;
-	}
-
-/* SOURCE FILE: PopupWindow.js */
-
-/* 
-PopupWindow.js
-Author: Matt Kruse
-Last modified: 02/16/04
-
-DESCRIPTION: This object allows you to easily and quickly popup a window
-in a certain place. The window can either be a DIV or a separate browser
-window.
-
-COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
-positioning errors - usually with Window positioning - occur on the 
-Macintosh platform. Due to bugs in Netscape 4.x, populating the popup 
-window with <STYLE> tags may cause errors.
-
-USAGE:
-// Create an object for a WINDOW popup
-var win = new PopupWindow(); 
-
-// Create an object for a DIV window using the DIV named 'mydiv'
-var win = new PopupWindow('mydiv'); 
-
-// Set the window to automatically hide itself when the user clicks 
-// anywhere else on the page except the popup
-win.autoHide(); 
-
-// Show the window relative to the anchor name passed in
-win.showPopup(anchorname);
-
-// Hide the popup
-win.hidePopup();
-
-// Set the size of the popup window (only applies to WINDOW popups
-win.setSize(width,height);
-
-// Populate the contents of the popup window that will be shown. If you 
-// change the contents while it is displayed, you will need to refresh()
-win.populate(string);
-
-// set the URL of the window, rather than populating its contents
-// manually
-win.setUrl("http://www.site.com/");
-
-// Refresh the contents of the popup
-win.refresh();
-
-// Specify how many pixels to the right of the anchor the popup will appear
-win.offsetX = 50;
-
-// Specify how many pixels below the anchor the popup will appear
-win.offsetY = 100;
-
-NOTES:
-1) Requires the functions in AnchorPosition.js
-
-2) Your anchor tag MUST contain both NAME and ID attributes which are the 
-   same. For example:
-   <A NAME="test" ID="test"> </A>
-
-3) There must be at least a space between <A> </A> for IE5.5 to see the 
-   anchor tag correctly. Do not do <A></A> with no space.
-
-4) When a PopupWindow object is created, a handler for 'onmouseup' is
-   attached to any event handler you may have already defined. Do NOT define
-   an event handler for 'onmouseup' after you define a PopupWindow object or
-   the autoHide() will not work correctly.
-*/ 
-
-// Set the position of the popup window based on the anchor
-function PopupWindow_getXYPosition(anchorname) {
-	var coordinates;
-	if (this.type == "WINDOW") {
-		coordinates = getAnchorWindowPosition(anchorname);
-		}
-	else {
-		coordinates = getAnchorPosition(anchorname);
-		}
-	this.x = coordinates.x;
-	this.y = coordinates.y;
-	}
-// Set width/height of DIV/popup window
-function PopupWindow_setSize(width,height) {
-	this.width = width;
-	this.height = height;
-	}
-// Fill the window with contents
-function PopupWindow_populate(contents) {
-	this.contents = contents;
-	this.populated = false;
-	}
-// Set the URL to go to
-function PopupWindow_setUrl(url) {
-	this.url = url;
-	}
-// Set the window popup properties
-function PopupWindow_setWindowProperties(props) {
-	this.windowProperties = props;
-	}
-// Refresh the displayed contents of the popup
-function PopupWindow_refresh() {
-	if (this.divName != null) {
-		// refresh the DIV object
-		if (this.use_gebi) {
-			document.getElementById(this.divName).innerHTML = this.contents;
-			}
-		else if (this.use_css) { 
-			document.all[this.divName].innerHTML = this.contents;
-			}
-		else if (this.use_layers) { 
-			var d = document.layers[this.divName]; 
-			d.document.open();
-			d.document.writeln(this.contents);
-			d.document.close();
-			}
-		}
-	else {
-		if (this.popupWindow != null && !this.popupWindow.closed) {
-			if (this.url!="") {
-				this.popupWindow.location.href=this.url;
-				}
-			else {
-				this.popupWindow.document.open();
-				this.popupWindow.document.writeln(this.contents);
-				this.popupWindow.document.close();
-			}
-			this.popupWindow.focus();
-			}
-		}
-	}
-// Position and show the popup, relative to an anchor object
-function PopupWindow_showPopup(anchorname) {
-	this.getXYPosition(anchorname);
-	this.x += this.offsetX;
-	this.y += this.offsetY;
-	if (!this.populated && (this.contents != "")) {
-		this.populated = true;
-		this.refresh();
-		}
-	if (this.divName != null) {
-		// Show the DIV object
-		if (this.use_gebi) {
-			document.getElementById(this.divName).style.left = this.x + "px";
-			document.getElementById(this.divName).style.top = this.y + "px";
-			document.getElementById(this.divName).style.visibility = "visible";
-			}
-		else if (this.use_css) {
-			document.all[this.divName].style.left = this.x;
-			document.all[this.divName].style.top = this.y;
-			document.all[this.divName].style.visibility = "visible";
-			}
-		else if (this.use_layers) {
-			document.layers[this.divName].left = this.x;
-			document.layers[this.divName].top = this.y;
-			document.layers[this.divName].visibility = "visible";
-			}
-		}
-	else {
-		if (this.popupWindow == null || this.popupWindow.closed) {
-			// If the popup window will go off-screen, move it so it doesn't
-			if (this.x<0) { this.x=0; }
-			if (this.y<0) { this.y=0; }
-			if (screen && screen.availHeight) {
-				if ((this.y + this.height) > screen.availHeight) {
-					this.y = screen.availHeight - this.height;
-					}
-				}
-			if (screen && screen.availWidth) {
-				if ((this.x + this.width) > screen.availWidth) {
-					this.x = screen.availWidth - this.width;
-					}
-				}
-			var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled );
-			this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
-			}
-		this.refresh();
-		}
-	}
-// Hide the popup
-function PopupWindow_hidePopup() {
-	if (this.divName != null) {
-		if (this.use_gebi) {
-			document.getElementById(this.divName).style.visibility = "hidden";
-			}
-		else if (this.use_css) {
-			document.all[this.divName].style.visibility = "hidden";
-			}
-		else if (this.use_layers) {
-			document.layers[this.divName].visibility = "hidden";
-			}
-		}
-	else {
-		if (this.popupWindow && !this.popupWindow.closed) {
-			this.popupWindow.close();
-			this.popupWindow = null;
-			}
-		}
-	}
-// Pass an event and return whether or not it was the popup DIV that was clicked
-function PopupWindow_isClicked(e) {
-	if (this.divName != null) {
-		if (this.use_layers) {
-			var clickX = e.pageX;
-			var clickY = e.pageY;
-			var t = document.layers[this.divName];
-			if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
-				return true;
-				}
-			else { return false; }
-			}
-		else if (document.all) { // Need to hard-code this to trap IE for error-handling
-			var t = window.event.srcElement;
-			while (t.parentElement != null) {
-				if (t.id==this.divName) {
-					return true;
-					}
-				t = t.parentElement;
-				}
-			return false;
-			}
-		else if (this.use_gebi && e) {
-			var t = e.originalTarget;
-			while (t.parentNode != null) {
-				if (t.id==this.divName) {
-					return true;
-					}
-				t = t.parentNode;
-				}
-			return false;
-			}
-		return false;
-		}
-	return false;
-	}
-
-// Check an onMouseDown event to see if we should hide
-function PopupWindow_hideIfNotClicked(e) {
-	if (this.autoHideEnabled && !this.isClicked(e)) {
-		this.hidePopup();
-		}
-	}
-// Call this to make the DIV disable automatically when mouse is clicked outside it
-function PopupWindow_autoHide() {
-	this.autoHideEnabled = true;
-	}
-// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
-function PopupWindow_hidePopupWindows(e) {
-	for (var i=0; i<popupWindowObjects.length; i++) {
-		if (popupWindowObjects[i] != null) {
-			var p = popupWindowObjects[i];
-			p.hideIfNotClicked(e);
-			}
-		}
-	}
-// Run this immediately to attach the event listener
-function PopupWindow_attachListener() {
-	if (document.layers) {
-		document.captureEvents(Event.MOUSEUP);
-		}
-	window.popupWindowOldEventListener = document.onmouseup;
-	if (window.popupWindowOldEventListener != null) {
-		document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
-		}
-	else {
-		document.onmouseup = PopupWindow_hidePopupWindows;
-		}
-	}
-// CONSTRUCTOR for the PopupWindow object
-// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
-function PopupWindow() {
-	if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
-	if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
-	if (!window.listenerAttached) {
-		window.listenerAttached = true;
-		PopupWindow_attachListener();
-		}
-	this.index = popupWindowIndex++;
-	popupWindowObjects[this.index] = this;
-	this.divName = null;
-	this.popupWindow = null;
-	this.width=0;
-	this.height=0;
-	this.populated = false;
-	this.visible = false;
-	this.autoHideEnabled = false;
-	
-	this.contents = "";
-	this.url="";
-	this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
-	if (arguments.length>0) {
-		this.type="DIV";
-		this.divName = arguments[0];
-		}
-	else {
-		this.type="WINDOW";
-		}
-	this.use_gebi = false;
-	this.use_css = false;
-	this.use_layers = false;
-	if (document.getElementById) { this.use_gebi = true; }
-	else if (document.all) { this.use_css = true; }
-	else if (document.layers) { this.use_layers = true; }
-	else { this.type = "WINDOW"; }
-	this.offsetX = 0;
-	this.offsetY = 0;
-	// Method mappings
-	this.getXYPosition = PopupWindow_getXYPosition;
-	this.populate = PopupWindow_populate;
-	this.setUrl = PopupWindow_setUrl;
-	this.setWindowProperties = PopupWindow_setWindowProperties;
-	this.refresh = PopupWindow_refresh;
-	this.showPopup = PopupWindow_showPopup;
-	this.hidePopup = PopupWindow_hidePopup;
-	this.setSize = PopupWindow_setSize;
-	this.isClicked = PopupWindow_isClicked;
-	this.autoHide = PopupWindow_autoHide;
-	this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
-	}
-
-/* SOURCE FILE: CalendarPopup.js */
-
-// HISTORY
-// ------------------------------------------------------------------
-// Feb 7, 2005: Fixed a CSS styles to use px unit
-// March 29, 2004: Added check in select() method for the form field
-//      being disabled. If it is, just return and don't do anything.
-// March 24, 2004: Fixed bug - when month name and abbreviations were
-//      changed, date format still used original values.
-// January 26, 2004: Added support for drop-down month and year
-//      navigation (Thanks to Chris Reid for the idea)
-// September 22, 2003: Fixed a minor problem in YEAR calendar with
-//      CSS prefix.
-// August 19, 2003: Renamed the function to get styles, and made it
-//      work correctly without an object reference
-// August 18, 2003: Changed showYearNavigation and 
-//      showYearNavigationInput to optionally take an argument of
-//      true or false
-// July 31, 2003: Added text input option for year navigation.
-//      Added a per-calendar CSS prefix option to optionally use 
-//      different styles for different calendars.
-// July 29, 2003: Fixed bug causing the Today link to be clickable 
-//      even though today falls in a disabled date range.
-//      Changed formatting to use pure CSS, allowing greater control
-//      over look-and-feel options.
-// June 11, 2003: Fixed bug causing the Today link to be unselectable
-//      under certain cases when some days of week are disabled
-// March 14, 2003: Added ability to disable individual dates or date
-//      ranges, display as light gray and strike-through
-// March 14, 2003: Removed dependency on graypixel.gif and instead 
-///     use table border coloring
-// March 12, 2003: Modified showCalendar() function to allow optional
-//      start-date parameter
-// March 11, 2003: Modified select() function to allow optional
-//      start-date parameter
-/* 
-DESCRIPTION: This object implements a popup calendar to allow the user to
-select a date, month, quarter, or year.
-
-COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
-positioning errors - usually with Window positioning - occur on the 
-Macintosh platform.
-The calendar can be modified to work for any location in the world by 
-changing which weekday is displayed as the first column, changing the month
-names, and changing the column headers for each day.
-
-USAGE:
-// Create a new CalendarPopup object of type WINDOW
-var cal = new CalendarPopup(); 
-
-// Create a new CalendarPopup object of type DIV using the DIV named 'mydiv'
-var cal = new CalendarPopup('mydiv'); 
-
-// Easy method to link the popup calendar with an input box. 
-cal.select(inputObject, anchorname, dateFormat);
-// Same method, but passing a default date other than the field's current value
-cal.select(inputObject, anchorname, dateFormat, '01/02/2000');
-// This is an example call to the popup calendar from a link to populate an 
-// input box. Note that to use this, date.js must also be included!!
-<A HREF="#" onClick="cal.select(document.forms[0].date,'anchorname','MM/dd/yyyy'); return false;">Select</A>
-
-// Set the type of date select to be used. By default it is 'date'.
-cal.setDisplayType(type);
-
-// When a date, month, quarter, or year is clicked, a function is called and
-// passed the details. You must write this function, and tell the calendar
-// popup what the function name is.
-// Function to be called for 'date' select receives y, m, d
-cal.setReturnFunction(functionname);
-// Function to be called for 'month' select receives y, m
-cal.setReturnMonthFunction(functionname);
-// Function to be called for 'quarter' select receives y, q
-cal.setReturnQuarterFunction(functionname);
-// Function to be called for 'year' select receives y
-cal.setReturnYearFunction(functionname);
-
-// Show the calendar relative to a given anchor
-cal.showCalendar(anchorname);
-
-// Hide the calendar. The calendar is set to autoHide automatically
-cal.hideCalendar();
-
-// Set the month names to be used. Default are English month names
-cal.setMonthNames("January","February","March",...);
-
-// Set the month abbreviations to be used. Default are English month abbreviations
-cal.setMonthAbbreviations("Jan","Feb","Mar",...);
-
-// Show navigation for changing by the year, not just one month at a time
-cal.showYearNavigation();
-
-// Show month and year dropdowns, for quicker selection of month of dates
-cal.showNavigationDropdowns();
-
-// Set the text to be used above each day column. The days start with 
-// sunday regardless of the value of WeekStartDay
-cal.setDayHeaders("S","M","T",...);
-
-// Set the day for the first column in the calendar grid. By default this
-// is Sunday (0) but it may be changed to fit the conventions of other
-// countries.
-cal.setWeekStartDay(1); // week is Monday - Sunday
-
-// Set the weekdays which should be disabled in the 'date' select popup. You can
-// then allow someone to only select week end dates, or Tuedays, for example
-cal.setDisabledWeekDays(0,1); // To disable selecting the 1st or 2nd days of the week
-
-// Selectively disable individual days or date ranges. Disabled days will not
-// be clickable, and show as strike-through text on current browsers.
-// Date format is any format recognized by parseDate() in date.js
-// Pass a single date to disable:
-cal.addDisabledDates("2003-01-01");
-// Pass null as the first parameter to mean "anything up to and including" the
-// passed date:
-cal.addDisabledDates(null, "01/02/03");
-// Pass null as the second parameter to mean "including the passed date and
-// anything after it:
-cal.addDisabledDates("Jan 01, 2003", null);
-// Pass two dates to disable all dates inbetween and including the two
-cal.addDisabledDates("January 01, 2003", "Dec 31, 2003");
-
-// When the 'year' select is displayed, set the number of years back from the 
-// current year to start listing years. Default is 2.
-// This is also used for year drop-down, to decide how many years +/- to display
-cal.setYearSelectStartOffset(2);
-
-// Text for the word "Today" appearing on the calendar
-cal.setTodayText("Today");
-
-// The calendar uses CSS classes for formatting. If you want your calendar to
-// have unique styles, you can set the prefix that will be added to all the
-// classes in the output.
-// For example, normal output may have this:
-//     <SPAN CLASS="cpTodayTextDisabled">Today<SPAN>
-// But if you set the prefix like this:
-cal.setCssPrefix("Test");
-// The output will then look like:
-//     <SPAN CLASS="TestcpTodayTextDisabled">Today<SPAN>
-// And you can define that style somewhere in your page.
-
-// When using Year navigation, you can make the year be an input box, so
-// the user can manually change it and jump to any year
-cal.showYearNavigationInput();
-
-// Set the calendar offset to be different than the default. By default it
-// will appear just below and to the right of the anchorname. So if you have
-// a text box where the date will go and and anchor immediately after the
-// text box, the calendar will display immediately under the text box.
-cal.offsetX = 20;
-cal.offsetY = 20;
-
-NOTES:
-1) Requires the functions in AnchorPosition.js and PopupWindow.js
-
-2) Your anchor tag MUST contain both NAME and ID attributes which are the 
-   same. For example:
-   <A NAME="test" ID="test"> </A>
-
-3) There must be at least a space between <A> </A> for IE5.5 to see the 
-   anchor tag correctly. Do not do <A></A> with no space.
-
-4) When a CalendarPopup object is created, a handler for 'onmouseup' is
-   attached to any event handler you may have already defined. Do NOT define
-   an event handler for 'onmouseup' after you define a CalendarPopup object 
-   or the autoHide() will not work correctly.
-   
-5) The calendar popup display uses style sheets to make it look nice.
-
-*/ 
-
-// CONSTRUCTOR for the CalendarPopup Object
-function CalendarPopup() {
-	var c;
-	if (arguments.length>0) {
-		c = new PopupWindow(arguments[0]);
-		}
-	else {
-		c = new PopupWindow();
-		c.setSize(150,175);
-		}
-	c.offsetX = -152;
-	c.offsetY = 25;
-	c.autoHide();
-	// Calendar-specific properties
-	c.monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
-	c.monthAbbreviations = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
-	c.dayHeaders = new Array("S","M","T","W","T","F","S");
-	c.returnFunction = "CP_tmpReturnFunction";
-	c.returnMonthFunction = "CP_tmpReturnMonthFunction";
-	c.returnQuarterFunction = "CP_tmpReturnQuarterFunction";
-	c.returnYearFunction = "CP_tmpReturnYearFunction";
-	c.weekStartDay = 0;
-	c.isShowYearNavigation = false;
-	c.displayType = "date";
-	c.disabledWeekDays = new Object();
-	c.disabledDatesExpression = "";
-	c.yearSelectStartOffset = 2;
-	c.currentDate = null;
-	c.todayText="Today";
-	c.cssPrefix="";
-	c.isShowNavigationDropdowns=false;
-	c.isShowYearNavigationInput=false;
-	window.CP_calendarObject = null;
-	window.CP_targetInput = null;
-	window.CP_dateFormat = "MM/dd/yyyy";
-	// Method mappings
-	c.copyMonthNamesToWindow = CP_copyMonthNamesToWindow;
-	c.setReturnFunction = CP_setReturnFunction;
-	c.setReturnMonthFunction = CP_setReturnMonthFunction;
-	c.setReturnQuarterFunction = CP_setReturnQuarterFunction;
-	c.setReturnYearFunction = CP_setReturnYearFunction;
-	c.setMonthNames = CP_setMonthNames;
-	c.setMonthAbbreviations = CP_setMonthAbbreviations;
-	c.setDayHeaders = CP_setDayHeaders;
-	c.setWeekStartDay = CP_setWeekStartDay;
-	c.setDisplayType = CP_setDisplayType;
-	c.setDisabledWeekDays = CP_setDisabledWeekDays;
-	c.addDisabledDates = CP_addDisabledDates;
-	c.setYearSelectStartOffset = CP_setYearSelectStartOffset;
-	c.setTodayText = CP_setTodayText;
-	c.showYearNavigation = CP_showYearNavigation;
-	c.showCalendar = CP_showCalendar;
-	c.hideCalendar = CP_hideCalendar;
-	c.getStyles = getCalendarStyles;
-	c.refreshCalendar = CP_refreshCalendar;
-	c.getCalendar = CP_getCalendar;
-	c.select = CP_select;
-	c.setCssPrefix = CP_setCssPrefix;
-	c.showNavigationDropdowns = CP_showNavigationDropdowns;
-	c.showYearNavigationInput = CP_showYearNavigationInput;
-	c.copyMonthNamesToWindow();
-	// Return the object
-	return c;
-	}
-function CP_copyMonthNamesToWindow() {
-	// Copy these values over to the date.js 
-	if (typeof(window.MONTH_NAMES)!="undefined" && window.MONTH_NAMES!=null) {
-		window.MONTH_NAMES = new Array();
-		for (var i=0; i<this.monthNames.length; i++) {
-			window.MONTH_NAMES[window.MONTH_NAMES.length] = this.monthNames[i];
-		}
-		for (var i=0; i<this.monthAbbreviations.length; i++) {
-			window.MONTH_NAMES[window.MONTH_NAMES.length] = this.monthAbbreviations[i];
-		}
-	}
-}
-// Temporary default functions to be called when items clicked, so no error is thrown
-function CP_tmpReturnFunction(y,m,d) { 
-	if (window.CP_targetInput!=null) {
-		var dt = new Date(y,m-1,d,0,0,0);
-		if (window.CP_calendarObject!=null) { window.CP_calendarObject.copyMonthNamesToWindow(); }
-		window.CP_targetInput.value = formatDate(dt,window.CP_dateFormat);
-		// Kieran - fixed issue	with end date not becoming begin date after begin date is set
-		if (CP_targetInput.name == 'event_begin') {
-			document.forms['quoteform'].event_end.value = formatDate(dt,window.CP_dateFormat);
-                }
-		}
-	else {
-		alert('Use setReturnFunction() to define which function will get the clicked results!'); 
-		}
-	}
-function CP_tmpReturnMonthFunction(y,m) { 
-	alert('Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , month='+m); 
-	}
-function CP_tmpReturnQuarterFunction(y,q) { 
-	alert('Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , quarter='+q); 
-	}
-function CP_tmpReturnYearFunction(y) { 
-	alert('Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year='+y); 
-	}
-
-// Set the name of the functions to call to get the clicked item
-function CP_setReturnFunction(name) { this.returnFunction = name; }
-function CP_setReturnMonthFunction(name) { this.returnMonthFunction = name; }
-function CP_setReturnQuarterFunction(name) { this.returnQuarterFunction = name; }
-function CP_setReturnYearFunction(name) { this.returnYearFunction = name; }
-
-// Over-ride the built-in month names
-function CP_setMonthNames() {
-	for (var i=0; i<arguments.length; i++) { this.monthNames[i] = arguments[i]; }
-	this.copyMonthNamesToWindow();
-	}
-
-// Over-ride the built-in month abbreviations
-function CP_setMonthAbbreviations() {
-	for (var i=0; i<arguments.length; i++) { this.monthAbbreviations[i] = arguments[i]; }
-	this.copyMonthNamesToWindow();
-	}
-
-// Over-ride the built-in column headers for each day
-function CP_setDayHeaders() {
-	for (var i=0; i<arguments.length; i++) { this.dayHeaders[i] = arguments[i]; }
-	}
-
-// Set the day of the week (0-7) that the calendar display starts on
-// This is for countries other than the US whose calendar displays start on Monday(1), for example
-function CP_setWeekStartDay(day) { this.weekStartDay = day; }
-
-// Show next/last year navigation links
-function CP_showYearNavigation() { this.isShowYearNavigation = (arguments.length>0)?arguments[0]:true; }
-
-// Which type of calendar to display
-function CP_setDisplayType(type) {
-	if (type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year") { alert("Invalid display type! Must be one of: date,week-end,month,quarter,year"); return false; }
-	this.displayType=type;
-	}
-
-// How many years back to start by default for year display
-function CP_setYearSelectStartOffset(num) { this.yearSelectStartOffset=num; }
-
-// Set which weekdays should not be clickable
-function CP_setDisabledWeekDays() {
-	this.disabledWeekDays = new Object();
-	for (var i=0; i<arguments.length; i++) { this.disabledWeekDays[arguments[i]] = true; }
-	}
-	
-// Disable individual dates or ranges
-// Builds an internal logical test which is run via eval() for efficiency
-function CP_addDisabledDates(start, end) {
-	if (arguments.length==1) { end=start; }
-	if (start==null && end==null) { return; }
-	if (this.disabledDatesExpression!="") { this.disabledDatesExpression+= "||"; }
-	if (start!=null) { start = parseDate(start); start=""+start.getFullYear()+LZ(start.getMonth()+1)+LZ(start.getDate());}
-	if (end!=null) { end=parseDate(end); end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate());}
-	if (start==null) { this.disabledDatesExpression+="(ds<="+end+")"; }
-	else if (end  ==null) { this.disabledDatesExpression+="(ds>="+start+")"; }
-	else { this.disabledDatesExpression+="(ds>="+start+"&&ds<="+end+")"; }
-	}
-	
-// Set the text to use for the "Today" link
-function CP_setTodayText(text) {
-	this.todayText = text;
-	}
-
-// Set the prefix to be added to all CSS classes when writing output
-function CP_setCssPrefix(val) { 
-	this.cssPrefix = val; 
-	}
-
-// Show the navigation as an dropdowns that can be manually changed
-function CP_showNavigationDropdowns() { this.isShowNavigationDropdowns = (arguments.length>0)?arguments[0]:true; }
-
-// Show the year navigation as an input box that can be manually changed
-function CP_showYearNavigationInput() { this.isShowYearNavigationInput = (arguments.length>0)?arguments[0]:true; }
-
-// Hide a calendar object
-function CP_hideCalendar() {
-	if (arguments.length > 0) { window.popupWindowObjects[arguments[0]].hidePopup(); }
-	else { this.hidePopup(); }
-	}
-
-// Refresh the contents of the calendar display
-function CP_refreshCalendar(index) {
-	var calObject = window.popupWindowObjects[index];
-	if (arguments.length>1) { 
-		calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));
-		}
-	else {
-		calObject.populate(calObject.getCalendar());
-		}
-	calObject.refresh();
-	}
-
-// Populate the calendar and display it
-function CP_showCalendar(anchorname) {
-	if (arguments.length>1) {
-		if (arguments[1]==null||arguments[1]=="") {
-			this.currentDate=new Date();
-			}
-		else {
-			this.currentDate=new Date(parseDate(arguments[1]));
-			}
-		}
-	this.populate(this.getCalendar());
-	this.showPopup(anchorname);
-	}
-
-// Simple method to interface popup calendar with a text-entry box
-function CP_select(inputobj, linkname, format) {
-	var selectedDate=(arguments.length>3)?arguments[3]:null;
-	if (!window.getDateFromFormat) {
-		alert("calendar.select: To use this method you must also include 'date.js' for date formatting");
-		return;
-		}
-	if (this.displayType!="date"&&this.displayType!="week-end") {
-		alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");
-		return;
-		}
-	if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") { 
-		alert("calendar.select: Input object passed is not a valid form input object"); 
-		window.CP_targetInput=null;
-		return;
-		}
-	if (inputobj.disabled) { return; } // Can't use calendar input on disabled form input!
-	window.CP_targetInput = inputobj;
-	window.CP_calendarObject = this;
-	this.currentDate=null;
-	var time=0;
-	if (selectedDate!=null) {
-		time = getDateFromFormat(selectedDate,format)
-		}
-	else if (inputobj.value!="") {
-		time = getDateFromFormat(inputobj.value,format);
-		}
-	if (selectedDate!=null || inputobj.value!="") {
-		if (time==0) { this.currentDate=null; }
-		else { this.currentDate=new Date(time); }
-		}
-	window.CP_dateFormat = format;
-	this.showCalendar(linkname);
-	}
-	
-// Get style block needed to display the calendar correctly
-function getCalendarStyles() {
-	var result = "";
-	var p = "";
-	if (this!=null && typeof(this.cssPrefix)!="undefined" && this.cssPrefix!=null && this.cssPrefix!="") { p=this.cssPrefix; }
-	result += "<STYLE>\n";
-	result += "."+p+"cpYearNavigation,."+p+"cpMonthNavigation { background-color:#C0C0C0; text-align:center; vertical-align:center; text-decoration:none; color:#000000; font-weight:bold; }\n";
-	result += "."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText { font-family:arial; font-size:8pt; }\n";
-	result += "TD."+p+"cpDayColumnHeader { text-align:right; border:solid thin #C0C0C0;border-width:0px 0px 1px 0px; }\n";
-	result += "."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate  { text-align:right; text-decoration:none; }\n";
-	result += "."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+p+"cpCurrentDateDisabled { color:#D0D0D0; text-align:right; text-decoration:line-through; }\n";
-	result += "."+p+"cpCurrentMonthDate, .cpCurrentDate { color:#000000; }\n";
-	result += "."+p+"cpOtherMonthDate { color:#808080; }\n";
-	result += "TD."+p+"cpCurrentDate { color:white; background-color: #C0C0C0; border-width:1px; border:solid thin #800000; }\n";
-	result += "TD."+p+"cpCurrentDateDisabled { border-width:1px; border:solid thin #FFAAAA; }\n";
-	result += "TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled { border:solid thin #C0C0C0; border-width:1px 0px 0px 0px;}\n";
-	result += "A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled { height:20px; }\n";
-	result += "A."+p+"cpTodayText { color:black; }\n";
-	result += "."+p+"cpTodayTextDisabled { color:#D0D0D0; }\n";
-	result += "."+p+"cpBorder { border:solid thin #808080; }\n";
-	result += "</STYLE>\n";
-	return result;
-	}
-
-// Return a string containing all the calendar code to be displayed
-function CP_getCalendar() {
-	var now = new Date();
-	// Reference to window
-	if (this.type == "WINDOW") { var windowref = "window.opener."; }
-	else { var windowref = ""; }
-	var result = "";
-	// If POPUP, write entire HTML document
-	if (this.type == "WINDOW") {
-		result += "<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";
-		result += '<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';
-		}
-	else {
-		result += '<TABLE CLASS="'+this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';
-		result += '<TR><TD ALIGN=CENTER>\n';
-		result += '<CENTER>\n';
-		}
-	// Code for DATE display (default)
-	// -------------------------------
-	if (this.displayType=="date" || this.displayType=="week-end") {
-		if (this.currentDate==null) { this.currentDate = now; }
-		if (arguments.length > 0) { var month = arguments[0]; }
-			else { var month = this.currentDate.getMonth()+1; }
-		if (arguments.length > 1 && arguments[1]>0 && arguments[1]-0==arguments[1]) { var year = arguments[1]; }
-			else { var year = this.currentDate.getFullYear(); }
-		var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
-		if ( ( (year%4 == 0)&&(year%100 != 0) ) || (year%400 == 0) ) {
-			daysinmonth[2] = 29;
-			}
-		var current_month = new Date(year,month-1,1);
-		var display_year = year;
-		var display_month = month;
-		var display_date = 1;
-		var weekday= current_month.getDay();
-		var offset = 0;
-		
-		offset = (weekday >= this.weekStartDay) ? weekday-this.weekStartDay : 7-this.weekStartDay+weekday ;
-		if (offset > 0) {
-			display_month--;
-			if (display_month < 1) { display_month = 12; display_year--; }
-			display_date = daysinmonth[display_month]-offset+1;
-			}
-		var next_month = month+1;
-		var next_month_year = year;
-		if (next_month > 12) { next_month=1; next_month_year++; }
-		var last_month = month-1;
-		var last_month_year = year;
-		if (last_month < 1) { last_month=12; last_month_year--; }
-		var date_class;
-		if (this.type!="WINDOW") {
-			result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
-			}
-		result += '<TR>\n';
-		var refresh = windowref+'CP_refreshCalendar';
-		var refreshLink = 'javascript:' + refresh;
-		if (this.isShowNavigationDropdowns) {
-			result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onChange="'+refresh+'('+this.index+',this.options[this.selectedIndex].value-0,'+(year-0)+');">';
-			for( var monthCounter=1; monthCounter<=12; monthCounter++ ) {
-				var selected = (monthCounter==month) ? 'SELECTED' : '';
-				result += '<option value="'+monthCounter+'" '+selected+'>'+this.monthNames[monthCounter-1]+'</option>';
-				}
-			result += '</select></TD>';
-			result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';
-
-			result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="56" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpYearNavigation" name="cpYear" onChange="'+refresh+'('+this.index+','+month+',this.options[this.selectedIndex].value-0);">';
-			for( var yearCounter=year-this.yearSelectStartOffset; yearCounter<=year+this.yearSelectStartOffset; yearCounter++ ) {
-				var selected = (yearCounter==year) ? 'SELECTED' : '';
-				result += '<option value="'+yearCounter+'" '+selected+'>'+yearCounter+'</option>';
-				}
-			result += '</select></TD>';
-			}
-		else {
-			if (this.isShowYearNavigation) {
-				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+last_month+','+last_month_year+');">&lt;</A></TD>';
-				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+'</SPAN></TD>';
-				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+next_month+','+next_month_year+');">&gt;</A></TD>';
-				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';
-
-				result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refreshLink+'('+this.index+','+month+','+(year-1)+');">&lt;</A></TD>';
-				if (this.isShowYearNavigationInput) {
-					result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+'('+this.index+','+month+',this.value-0);"></TD>';
-					}
-				else {
-					result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+'</SPAN></TD>';
-					}
-				result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refreshLink+'('+this.index+','+month+','+(year+1)+');">&gt;</A></TD>';
-				}
-			else {
-				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+last_month+','+last_month_year+');">&lt;&lt;</A></TD>\n';
-				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+' '+year+'</SPAN></TD>\n';
-				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+next_month+','+next_month_year+');">&gt;&gt;</A></TD>\n';
-				}
-			}
-		result += '</TR></TABLE>\n';
-		result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n';
-		result += '<TR>\n';
-		for (var j=0; j<7; j++) {
-
-			result += '<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+'</TD>\n';
-			}
-		result += '</TR>\n';
-		for (var row=1; row<=6; row++) {
-			result += '<TR>\n';
-			for (var col=1; col<=7; col++) {
-				var disabled=false;
-				if (this.disabledDatesExpression!="") {
-					var ds=""+display_year+LZ(display_month)+LZ(display_date);
-					eval("disabled=("+this.disabledDatesExpression+")");
-					}
-				var dateClass = "";
-				if ((display_month == this.currentDate.getMonth()+1) && (display_date==this.currentDate.getDate()) && (display_year==this.currentDate.getFullYear())) {
-					dateClass = "cpCurrentDate";
-					}
-				else if (display_month == month) {
-					dateClass = "cpCurrentMonthDate";
-					}
-				else {
-					dateClass = "cpOtherMonthDate";
-					}
-				if (disabled || this.disabledWeekDays[col-1]) {
-					result += '	<TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+'</SPAN></TD>\n';
-					}
-				else {
-					var selected_date = display_date;
-					var selected_month = display_month;
-					var selected_year = display_year;
-					if (this.displayType=="week-end") {
-						var d = new Date(selected_year,selected_month-1,selected_date,0,0,0,0);
-						d.setDate(d.getDate() + (7-col));
-						selected_year = d.getYear();
-						if (selected_year < 1000) { selected_year += 1900; }
-						selected_month = d.getMonth()+1;
-						selected_date = d.getDate();
-						}
-					result += '	<TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+'('+selected_year+','+selected_month+','+selected_date+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+'</A></TD>\n';
-					}
-				display_date++;
-				if (display_date > daysinmonth[display_month]) {
-					display_date=1;
-					display_month++;
-					}
-				if (display_month > 12) {
-					display_month=1;
-					display_year++;
-					}
-				}
-			result += '</TR>';
-			}
-		var current_weekday = now.getDay() - this.weekStartDay;
-		if (current_weekday < 0) {
-			current_weekday += 7;
-			}
-		result += '<TR>\n';
-		result += '	<TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';
-		if (this.disabledDatesExpression!="") {
-			var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());
-			eval("disabled=("+this.disabledDatesExpression+")");
-			}
-		if (disabled || this.disabledWeekDays[current_weekday+1]) {
-			result += '		<SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+'</SPAN>\n';
-			}
-		else {
-			result += '		<A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+'(\''+now.getFullYear()+'\',\''+(now.getMonth()+1)+'\',\''+now.getDate()+'\');'+windowref+'CP_hideCalendar(\''+this.index+'\');">'+this.todayText+'</A>\n';
-			}
-		result += '		<BR>\n';
-		result += '	</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n';
-	}
-
-	// Code common for MONTH, QUARTER, YEAR
-	// ------------------------------------
-	if (this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year") {
-		if (arguments.length > 0) { var year = arguments[0]; }
-		else { 
-			if (this.displayType=="year") {	var year = now.getFullYear()-this.yearSelectStartOffset; }
-			else { var year = now.getFullYear(); }
-			}
-		if (this.displayType!="year" && this.isShowYearNavigation) {
-			result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
-			result += '<TR>\n';
-			result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-1)+');">&lt;&lt;</A></TD>\n';
-			result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+'</TD>\n';
-			result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+1)+');">&gt;&gt;</A></TD>\n';
-			result += '</TR></TABLE>\n';
-			}
-		}
-		
-	// Code for MONTH display 
-	// ----------------------
-	if (this.displayType=="month") {
-		// If POPUP, write entire HTML document
-		result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
-		for (var i=0; i<4; i++) {
-			result += '<TR>';
-			for (var j=0; j<3; j++) {
-				var monthindex = ((i*3)+j);
-				result += '<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+'('+year+','+(monthindex+1)+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+'</A></TD>';
-				}
-			result += '</TR>';
-			}
-		result += '</TABLE></CENTER></TD></TR></TABLE>\n';
-		}
-	
-	// Code for QUARTER display
-	// ------------------------
-	if (this.displayType=="quarter") {
-		result += '<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n';
-		for (var i=0; i<2; i++) {
-			result += '<TR>';
-			for (var j=0; j<2; j++) {
-				var quarter = ((i*2)+j+1);
-				result += '<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+'('+year+','+quarter+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+'</A><BR><BR></TD>';
-				}
-			result += '</TR>';
-			}
-		result += '</TABLE></CENTER></TD></TR></TABLE>\n';
-		}
-
-	// Code for YEAR display
-	// ---------------------
-	if (this.displayType=="year") {
-		var yearColumnSize = 4;
-		result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
-		result += '<TR>\n';
-		result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-(yearColumnSize*2))+');">&lt;&lt;</A></TD>\n';
-		result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+(yearColumnSize*2))+');">&gt;&gt;</A></TD>\n';
-		result += '</TR></TABLE>\n';
-		result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
-		for (var i=0; i<yearColumnSize; i++) {
-			for (var j=0; j<2; j++) {
-				var currentyear = year+(j*yearColumnSize)+i;
-				result += '<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+'('+currentyear+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+currentyear+'</A></TD>';
-				}
-			result += '</TR>';
-			}
-		result += '</TABLE></CENTER></TD></TR></TABLE>\n';
-		}
-	// Common
-	if (this.type == "WINDOW") {
-		result += "</BODY></HTML>\n";
-		}
-	return result;
-	}
-
--- a/web/wp-content/plugins/calendar/readme.txt	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-=== Calendar ===
-Contributors: KieranOShea
-Donate link: http://www.kieranoshea.com
-Tags: calendar, dates, times, events
-Requires at least: 2.0
-Tested up to: 2.8
-Stable tag: 1.2.2
-
-A simple but effective Calendar plugin for WordPress that allows you to 
-manage your events and appointments and display them to the world.
-
-== Description ==
-
-A simple but effective Calendar plugin for WordPress that allows you to 
-manage your events and appointments and display them to the world on your 
-website.
-
-Features:
-
-*   Monthly view of events
-*   Mouse-over details for each event
-*   Events can have a timestamp (optional)
-*   Events can display their author (optional)
-*   Events can span more than one day
-*   Multiple events per day possible
-*   Events can repeat on a weekly, monthly or yearly basis
-*   Repeats can occur indefinitely or a limited number of times
-*   Easy to use events manager in admin dashboard
-*   Sidebar function/Widget to show todays events
-*   Sidebar function/Widget to show upcoming events
-*   Lists of todays events can be displayed in posts or pages
-*   Lists of upcoming events can be displayed in posts or pages
-*   Comprehensive options panel for admin
-*   Modifiable CSS using the options panel
-*   Optional drop down boxes to quickly change month and year
-*   User groups other than admin can be permitted to manage events
-*   Events can be placed into categories
-*   A calendar of events for just one of more categories can be displayed
-*   Categories system can be switched on or off
-*   Pop up javascript calendars help the choosing of dates
-*   Events can be links pointing to a location of your choice
-*   Full internationalisation is possible
-*   Comaptible with WordPress MU
-
-== Installation ==
-
-The installation is extremely simple and straightforward. It only takes a second.
-
-Installing:
-
-1. Upload the whole calendar directory into your WordPress plugins directory.
-
-2. Activate the plugin on your WordPress plugins page
-
-3. Configure Calendar using the following pages in the admin panel:
-
-   Calendar -> Manage Events
-
-   Calendar -> Manage Categories
-
-   Calendar -> Calendar Options
-
-4. Edit or create a page on your blog which includes the text {CALENDAR} and visit 
-   the page you have edited or created. You should see your calendar in action.
-
-Upgrading from 1.2 or later:
-
-1. Deactivate the plugin (you will not lose any events)
-
-2. Remove your current calendar directory from the WordPress plugins directory
-
-2. Upload the whole calendar directory into your WordPress plugins directory.
-
-3. Activate the plugin on your WordPress plugins page
-
-4. Configure Calendar using the following pages in the admin panel:
-
-   Calendar -> Manage Events
-
-   Calendar -> Manage Categories
-
-   Calendar -> Calendar Options
-
-5. Edit or create a page on your blog which includes the text {CALENDAR} and visit
-   the page you have edited or created page. You should see your calendar in action.
-
-Upgrading from 1.1:
-
-1. Deactivate the plugin (you will not lose any events)
-
-2. Remove the Rewrite rules from your .htaccess file that you added 
-   when you first installed Calendar.
-
-3. Delete plugins/calendar.php, wp-admin/edit-calendar.php, wp-calendar.php
-
-4. Upload the whole calendar directory into your WordPress plugins directory.
-
-5. Activate the plugin on your WordPress plugins page
-
-6. Configure Calendar using the following pages in the admin panel:
-
-   Calendar -> Manage Events
-
-   Calendar -> Manage Categories
-
-   Calendar -> Calendar Options
-
-7. Edit or create a page on your blog which includes the text {CALENDAR} and visit
-   the page you have edited or created page. You should see your calendar in action.
-
-Uninstalling:
-
-1. Deactivate the plugin on the plugins page of your blog dashboard
-
-2. Delete the uploaded files for the plugin
-
-3. Remove the text {CALENDAR} from the page you were using to show calendar, or delete that page
-
-== Frequently Asked Questions ==
-
-= Where are the frequently asked questions for Calendar? =
-
-   They are located on [Kieran O'Shea's forum](http://www.kieranoshea.com/forum/viewtopic.php?f=13&t=10 "Kieran O'Shea's forum"). 
-   Please note that you should check these before asking any support questions or thinking your calendar install isn't working 
-   properly.
-
-= Where can I get support for the plugin? =
-
-   Support is only available on [Kieran O'Shea's forum](http://www.kieranoshea.com/forum/viewtopic.php?f=13&t=10 "Kieran O'Shea's forum"). 
-   Regrettably e-mail support became too cumberome to manage and so now all support and bug report e-mails for calendar will be ignored. All 
-   such queries will be answered promptly on the forums, although please make sure you search first before asking your question.
-
-= Can I remove the link to your site? =
-   
-   Yes, you may do this, but please be aware that support will not be provided 
-   to those who choose to remove the link. When you ask your support question 
-   you will be asked for the URL to your blog and the presence of the link will 
-   be checked before support will be provided.
-
-== Screenshots ==
-
-1. Calendar being used on a blog page
-
-2. Widgets showing in the sidebar
-
-3. The event management screen of calendar
-
-4. The category management screen of calendar
-
-5. The options screen of Calendar
Binary file web/wp-content/plugins/calendar/screenshot-1.png has changed
Binary file web/wp-content/plugins/calendar/screenshot-2.png has changed
Binary file web/wp-content/plugins/calendar/screenshot-3.png has changed
Binary file web/wp-content/plugins/calendar/screenshot-4.png has changed
Binary file web/wp-content/plugins/calendar/screenshot-5.png has changed
--- a/web/wp-content/plugins/future-posts-calendar/future_calendar.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-<?php
-/*
-Plugin Name: Future Calendar
-Plugin URI: http://anthologyoi.com/wordpress/plugins/future-posts-calendar-plugin.html
-Description: A simple plugin that utalizes a modified get_calendar function that shows what dates have a future post scheduled in a calendar format, and makes it easy to change the current timestamp. Temperature Functionality and some tweaks by Flavio Jarabeck (www.InternetDrops.com.br)
-Author: Aaron Harun
-Version: 1.0
-Author URI: http://anthologyoi.com/
-*/
-
-/*Uncomment the following line if you want to have the calendar appear on the dashboard.*/
-//add_action('activity_box_end', 'get_future_calendar_html');
-
-
-	if (strpos($_SERVER['PHP_SELF'], 'post')){	
-		if($wp_version < 2.5){
-			add_action('dbx_post_sidebar', 'get_future_calendar_html',2);
-		}else{
-			add_action('submitpost_box', 'get_future_calendar_html');
-		}
-		add_action('admin_head', 'fcal_javascript');
-	}
-
-
-// This gets called at the plugins_loaded action
-function widget_fut_posts_init() {
-
-	// Check for the required API functions
-	if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )
-		return;
-
-	// This saves options and prints the widget's config form.
-	function widget_fut_posts_control() {
-		$options = $newoptions = get_option('widget_fut_posts');
-		if ( $_POST['fut_posts-submit'] ) {
-			$newoptions['title'] = strip_tags(stripslashes($_POST['fut_posts-title']));
-		}
-		if ( $options != $newoptions ) {
-			$options = $newoptions;
-			update_option('widget_fut_posts', $options);
-		}
-	?>
-				<div style="text-align:right">
-				<label for="fut_posts-title" style="line-height:35px;display:block;"><?php _e('Widget title:', 'widgets'); ?> <input type="text" id="fut_posts-title" name="fut_posts-title" value="<?php echo wp_specialchars($options['title'], true); ?>" /></label>
-				<input type="hidden" name="fut_posts-submit" id="fut_posts-submit" value="1" />
-				</div>
-	<?php
-	}
-
-	// This prints the widget
-	function widget_fut_posts($args) {
-		extract($args);
-		$defaults = array('title' => 'Future Posts');
-		$options = (array) get_option('widget_fut_posts');
-
-		foreach ( $defaults as $key => $value )
-			if ( !isset($options[$key]) )
-				$options[$key] = $defaults[$key];
-
-			echo $before_widget . $before_title . $title . $after_title;
-			fcal_get_future_posts(0);
-			echo $after_widget;
-	}
-
-
-	register_sidebar_widget('Future Posts', 'widget_fut_posts');
-	register_widget_control('Future Posts', 'widget_fut_posts_control');
-}
-
-// Delay plugin execution to ensure Dynamic Sidebar has a chance to load first
-add_action('widgets_init', 'widget_fut_posts_init');
-
-
-function future_post_sidebar(){
-	$title = __('Future Post','fcal');
-	echo '<div>' . '<h3>' . $title . '</h3>';
-	fcal_get_future_posts();
-	echo '</div>';
-}
-
-function fcal_javascript(){
-	echo '
-	<script type="text/javascript">
-		function fcal_set_date(day,month,year){
-
-				if(day > 0 && month <= 12 && month >= 0 && year > 0){
-				document.getElementById("jj").value = day;
-				document.getElementById("aa").value = year;
-				document.getElementsByName("mm")[0].selectedIndex = month;
-				}
-
-		}
-	</script>
-	';
-}
-
-
-function get_future_calendar_html(){
-global $wp_version;
-	
-	if($wp_version < 2.5){
-		echo '<fieldset id="future_cal" class="dbx-box side-info">';
-		echo '<h3 class="dbx-handle">'.__('Future Post Dates','fcal').'</h3>';
-		echo '<div class="dbx-content">';
-			fcal_get_future_posts();
-		echo '</div></fieldset>';
-	}else{
-		echo '<div class="inside">';
-		echo '<p><strong>'.__('Future Post Dates','fcal').'</strong></p>';
-			fcal_get_future_posts();
-		echo '</div>';
-		
-	}
-	
-}
-
-function fcal_get_future_posts($onclick = 1){
-global $wpdb, $wp_locale;
-
-	$thisyear = gmdate('Y', current_time('timestamp'));
-	$thismonth = gmdate('m', current_time('timestamp'));
-
-	// Quick check. If we have no posts at all, abort!
-	if ( !$posts ) {
-		$gotsome = $wpdb->get_var("SELECT ID from $wpdb->posts WHERE post_type = 'post' AND post_status = 'future' ORDER BY post_date DESC LIMIT 1");
-		if ( !$gotsome ){
-			get_future_calendar($thismonth,$thisyear,$onclick);
-			return;
-		}
-	}
-
-	get_future_calendar($thismonth,$thisyear,$onclick);
-
-	//Technically thismonth is really nextmonth, but no reason to be technical about it
-	//But if thismonth is 12 then we need to reset it, and add a year otherwise we will be checking
-	// out the 13th month of this year.
-	if($thismonth == 12){
-		$thismonth = 0;
-		$thisyear +=1;
-	}
-	// Get months this year and next with at least one post
-	$future = $wpdb->get_results("SELECT
-		DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
-		FROM $wpdb->posts
-		WHERE post_date >'$thisyear-".($thismonth+1)."-01'
-		AND post_type = 'post' AND post_status = 'future'
-		ORDER	BY post_date ASC");
-
-	foreach($future as $now){
-		get_future_calendar($now->month,$now->year);
-	}
-}
-
-
-// Calendar Output...
-function get_future_calendar( $thismonth ='', $thisyear='', $onclick=1, $initial=true ) {
-	global $wpdb, $timedifference, $wp_locale;
-	$unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);
-
-	// week_begins = 0 stands for Sunday
-	$week_begins = intval(get_option('start_of_week'));
-	$add_hours = intval(get_option('gmt_offset'));
-	$add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours));
-
-	echo '<table class="wp-calendar">
-	<caption><em>' . $wp_locale->get_month($thismonth) . ' ' . $thisyear . '</em></caption>
-	<thead>
-	<tr>';
-
-	$myweek = array();
-
-	for ( $wdcount=0; $wdcount<=6; $wdcount++ ) {
-		$myweek[] = $wp_locale->get_weekday(($wdcount+$week_begins)%7);
-	}
-
-	foreach ( $myweek as $wd ) {
-		$day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd);
-		echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">$day_name</th>";
-	}
-
-	echo '
-	</tr>
-	</thead>
-	<tbody>
-	<tr>';
-
-	// Get days with posts
-	$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
-		FROM $wpdb->posts WHERE MONTH(post_date) = '$thismonth'
-		AND YEAR(post_date) = '$thisyear'
-		AND post_type = 'post' AND post_status = 'future'
-		AND post_date > '" . current_time('mysql') . '\'', ARRAY_N);
-	if ( $dayswithposts ) {
-		foreach ( $dayswithposts as $daywith ) {
-			$daywithpost[] = $daywith[0];
-		}
-	} else {
-		$daywithpost = array();
-	}
-
-
-
-	if ( strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'camino') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') )
-		$ak_title_separator = "\n";
-	else
-		$ak_title_separator = ', ';
-
-	$ak_titles_for_day = array();
-    //sets the Density Thermometer
-	$ak_posts_for_day = array();
-
-	$ak_post_titles = $wpdb->get_results("SELECT post_title, DAYOFMONTH(post_date) as dom "
-		."FROM $wpdb->posts "
-		."WHERE YEAR(post_date) = '$thisyear' "
-		."AND MONTH(post_date) = '$thismonth' "
-		."AND post_date > '".current_time('mysql')."' "
-		."AND post_type = 'post' AND post_status = 'future'"
-	);
-	if ( $ak_post_titles ) {
-		foreach ( $ak_post_titles as $ak_post_title ) {
-				if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) )
-					$ak_titles_for_day['day_'.$ak_post_title->dom] = '';
-				if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one
-					$ak_titles_for_day["$ak_post_title->dom"] = str_replace('"', '&quot;', wptexturize($ak_post_title->post_title));
-				else
-					$ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '&quot;', wptexturize($ak_post_title->post_title));
-
-                $ak_posts_for_day["$ak_post_title->dom"] +=1;
-
-		}
-	}
-
-
-	// See how much we should pad in the beginning
-	$pad = calendar_week_mod(date('w', $unixmonth)-$week_begins);
-	if ( 0 != $pad ) { echo "\n\t\t".'<td colspan="'.$pad.'" class="pad">&nbsp;</td>'; }
-
-	    //Determines the Density Thermometer colors
-	    $thermo = Array( "#BDFFBE", "#7AFFDE", "#2FEEFF", "#108BFF", "#0E72FF" );
-
-
-	$daysinmonth = intval(date('t', $unixmonth));
-	for ( $day = 1; $day <= $daysinmonth; ++$day ) {
-		if ( isset($newrow) && $newrow )
-			echo "\n\t</tr>\n\t<tr>\n\t\t";
-		$newrow = false;
-
-		if ( $day == gmdate('j', (time() + (get_option('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_option('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_option('gmt_offset') * 3600)) )
-			echo '<td style="font-weight:bold;">';
-		else
-			echo '<td>';
-
-		if($onclick == 1){
-			$onclick1 = 'onclick="fcal_set_date('.$day.','.($thismonth-1).','.$thisyear.')"';
-		}
-
-        // any posts on that day?
-		if ( in_array($day, $daywithpost) ) {
-            //Outputs the Density Thermometer along with the day...
-			echo '<span style="background-color:'.($ak_posts_for_day[$day]<=Count($thermo) ? $thermo[$ak_posts_for_day[$day]-1] : $thermo[Count($thermo)-1]).';" title="'.$ak_titles_for_day[$day].' '.$onclick1.' >'.$day.'</span>';
-
-		} else {
-			echo '<span '.$onclick1.' >'.$day.'</span>';
-        }
-		echo '</td>';
-
-		if ( 6 == calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins) )
-			$newrow = true;
-	}
-
-	$pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins);
-	if ( $pad != 0 && $pad != 7 )
-		echo "\n\t\t".'<td class="pad" colspan="'.$pad.'">&nbsp;</td>';
-
-	echo "\n\t</tr>\n\t</tbody>\n\t</table>";
-}
-?>
--- a/web/wp-content/plugins/future-posts-calendar/readme.txt	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-=== Future Posts Calendar Plugin ===
-Contributors: Aaron Harun
-Donate link: http://anthologyoi.com/about/donate/
-Tags: calendar, future posts, edit, post, date, admin,widget,stats
-Requires at least: 2.1
-Tested up to: 2.5 (Trunk)
-Stable tag: 1.0
-
-This plugin adds a monthly calendar that shows all the dates you have future posts.
-
-== Description ==
-It adds a simple month-by-month calendar that shows all the months you have future posts for (and the current month no matter what), it highlights the days you have posts for, and as an added bonus if you click a day, the Post Timestamp boxes change to that day, month and year (although it doesn’t check the edit timestamp box to avoid accidental changes).
-
-== Installation ==
-1. Download the zip file
-1. Unzip and upload future_posts.php to your *wp-content/plugins/* folder.
-1. The new box will automatically appear on edit/write post pages.
-1. Optionally you can add it as a sidebar widget or uncomment the line "//add_action('activity_box_end', 'get_future_calendar_html');" to have it appear on your dashboard, or use the Dashboard Editor plugin to add it as a widget.
--- a/web/wp-content/plugins/ggis-subscribe/ggis-subscribe.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,558 +0,0 @@
-<?php
-/*
-Plugin Name: ggis Subscribe
-Plugin URI: http://dvector.com/oracle/category/ggissubscribe/
-Description: Manages subscriptions to email lists. Simply add [-ggis-subscribe-] to your post.
-Author: Gary Dalton
-Version: 0.9
-Author URI: http://dvector.com/oracle/
-*/
-
-/*  Copyright 2008 Gary Dalton  (email : PLUGIN AUTHOR EMAIL)
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
-
-// Pre-2.6 compatibility
-if ( ! defined( 'WP_CONTENT_URL' ) )
-      define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
-if ( ! defined( 'WP_CONTENT_DIR' ) )
-      define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
-if ( ! defined( 'WP_PLUGIN_URL' ) )
-      define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
-if ( ! defined( 'WP_PLUGIN_DIR' ) )
-      define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
-
-/*
-*	START CLASS
-*/
-if (!class_exists("ggisSubscribe")) {
-	class ggisSubscribe {
-		/*
-			formAction - URL to post form to.
-			maillist - Which mailing list the subscription is for. [validated]
-				listname@npexchange.org
-			action - Subscribe or unsubscribe [validated]
-			email - Email address to manage [validated
-			name - Subscriber's name [optional] [validated]
-			nextpage - Go to this URL after processing subscription.[validated]
-				http://example.com
-			formurl - URL with full subscribe/unsubscribe form[validated]
-				http://example.com
-			listmanager - Software managing the mailing list
-				ezmlm, mailman
-		*/
-
-		
-		
-//		var $formAction = 'http://dvector.com/ggis_wp-subscribe.php';
-		var $formAction = '';
-		var $maillist;
-		var $nextpage;
-		var $formurl;
-		var $managerdefault = 'ezmlm';
-		var $managertypes = array('ezmlm', 'mailman');
-
-		var $adminOptionsName = 'ggisSubscribeAdminOptions';
-		
-
-		function ggisSubscribe() { //constructor
-//			$this->formAction = 'http://dvector.com/ggis_wp-subscribe.php';
-//			$this->formAction = WP_PLUGIN_URL . '/ggis_wp-subscribe.php';
-		}
-		function addHeaderCode(){
-			echo '<!-- ggisSubscribe Plugin - Copyright 2008 - GGIS -->';
-		}
-		
-		// OUTPUT FUNCTIONS
-		var $processing_unit_tag;
-		var $processing_within;
-		var $unit_count;
-		var $widget_count;
-		var $regex;
-		function the_content_filter($content) {
-			$this->processing_within = 'p' . get_the_ID();
-			$this->unit_count = 0;
-			
-			
-			$regex = '/\[-\s*ggis-subscribe\s*(\d+)?\s*(".*")?\s*-\]/';
-//			$regex = '/\[-\s*ggis-subscribe\s+(\d+)(?:\s+.*?)?\s*-\]/'; // [-ggis-subscribe 1 -]
-//			$regex = '/<!--\s*ggis-subscribe\s+(\d+)\s+(.*)\s*-->/';
-			return preg_replace_callback($regex, array(&$this, 'the_content_filter_callback'), $content);
-			
-			$this->processing_within = null;
-		}
-		
-		function widget_text_filter($content) {
-			$this->widget_count += 1;
-			$this->processing_within = 'w' . $this->widget_count;
-			$this->unit_count = 0;
-	
-			$regex = '/\[-\s*ggis-subscribe\s*(\d+)?\s*(".*")?\s*-\]/';	
-			return preg_replace_callback($regex, array(&$this, 'the_content_filter_callback'), $content);
-			
-			$this->processing_within = null;
-		}
-		
-		function the_content_filter_callback($matches) {
-
-			// GET AND SET VARIABLES
-			$list_select = '';
-			$listonly = NULL;
-			$options = unserialize( get_option( 'ggis-Subscribe'));
-			$options['maillists'] = explode( ',', $options['maillists'] );
-			$id = (int) $matches[1];
-			
-			// DETERMINE FORM TYPE
-			if ( $id == 1 ){
-				$listonly = str_replace( '"', '', $matches[2]);
-				if ( !is_email( $listonly) ){
-					$id = 0;
-				}
-			}else {
-				$id = 0;
-			}
-			
-			// FORM HEADERS
-			$this->unit_count += 1;
-			$unit_tag = 'ggis-subscribe-f' . $id . '-' . $this->processing_within . '-o' . $this->unit_count;
-			$this->processing_unit_tag = $unit_tag;
-
-			$form = '<div class="ggis-subscribe-form" id="' . $unit_tag . '">';
-			$form .= '<form action="' . $this->formAction . '" method="post" class="ggis-subscribe-form">';
-			$form .= '<input type="hidden" name="formtype" id="formtype" value="ggis-subscribe-form">';
-			$form .= '<input type="hidden" name="nextpage" id="nextpage" class="ggis-subscribe-form" value="'. $options['nextpage'] . '">';
-			$form .= '<input type="hidden" name="formurl" id="formurl" class="ggis-subscribe-form" value="'. $options['formurl'] . '">';
-			
-			// CREATE EITHER A HIDDEN FIELD OR SELECT BOX FOR MAILING LIST
-			if ( $id == 1 ){
-				$list_select .= '<input type="hidden" name="maillist" id="maillist" class="ggis-subscribe-form" value="'. $listonly . '">';
-			}else{
-				if ( count( $options['maillists']) == 1 ){
-					$list_select .= '<input type="hidden" name="maillist" id="maillist" class="ggis-subscribe-form" value="'. $options['maillists'][0] . '">';
-				} else{
-					$list_select .= 'Which list?<br>
-									<select name="maillist">';
-					foreach( $options['maillists'] as $key=>$list ){
-						$list_select .= '<option value="' . $list . '"';
-						if ( $key == 0 ){
-							$list_select .= ' SELECTED';
-						}
-						$list_select .= ">$list</option>";
-					}
-					$list_select .= '</select>';
-				}
-			}
-
-			if ( $id == 0){
-				// LONG FORM
-				$form .= '<fieldset><legend>Subscription Management</legend>
-						<p class="ggis-subscribe-form">';
-				$form .= $list_select;
-				$form .= '</p><p>&nbsp;Action:<br>
-						&nbsp;&nbsp;<input type="radio" name="action" id="subscribe" value="subscribe" checked="checked" /> Subscribe<br>
-						&nbsp;&nbsp;<input type="radio" name="action" id="unsubscribe" value="unsubscribe" /> Unsubscribe</p>
-						<p>&nbsp;Your Email:<br>
-						&nbsp;<input type="text" name="ggis-subscribe-email" id="ggis-subscribe-email" class="ggis-subscribe-email" size="40" maxlength="100" /></p>
-						</fieldset>
-						<input type="submit" name="Submit" value="Submit" />
-						</p>';
-			} elseif ( $id == 1 ) {
-				// SHORT FORM
-				$form .= $list_select;
-				$form .= '<input type="hidden" name="action" id="subscribe" class="ggis-subscribe-form" value="subscribe">';
-				$form .= '<p><input type="text" name="ggis-subscribe-email" id="ggis-subscribe-email" maxlength="100" class="ggis-subscribe-email" value="your email"/>
-						<input type="submit" name="Subscribe" value="Subscribe" /></p>';
-			}
-			
-			// FORM FOOTERS
-			$form .= '</form>';			
-			$form .= '</div>';
-			
-			$this->processing_unit_tag = null;
-			return $form;
-		}
-				
-		// ADMIN MENUS
-		var $adminform = '';
-		function ggis_admin_add_pages() {
-			add_options_page('ggisSubscribe', 'ggisSubscribe', 'manage_options', basename(__FILE__), array(&$this, 'ggissubscribe_options'));
-		}
-		
-		function form_ggissubscribe_options(){
-			$form = '';
-			$options = unserialize( get_option( 'ggis-Subscribe'));
-			
-			$list_select .= 'Which list manager?<br>
-							<select name="ggissubscribe_managertype">';
-			foreach( $this->managertypes as $manager ){
-				$list_select .= '<option value="' . $manager . '"';
-				if ( isset( $options['managertype']) ){
-					if ( $manager == $options['managertype'] ){
-						$list_select .= ' SELECTED';
-					}
-				}elseif ( $manager == $managerdefault ){
-					$list_select .= ' SELECTED';
-				}
-				$list_select .= ">$manager</option>";
-			}
-			$list_select .= '</select>';
-		
-			
-			$form .= '<form method="post">';
-			$form .= wp_nonce_field('ggis-subscribe-update-options_base');
-			$form .= '<fieldset><legend>Mailing List Options</legend>
-						<p>All fields are required.</p>
-						<p>';
-			$form .= $list_select;
-			$form .= '</p>
-						<p>
-						Mailing List Address (comma separated)<br />
-						example: maillist@npexchange.org,list2@npexchange.org<br />';
-			$form .= '<textarea cols="60" rows="4" name="ggissubscribe_maillists">'. $options['maillists'] .'</textarea>';
-			$form .= '</p>
-						<p>
-						URL of page to go to upon success<br />
-						example: http://your.blog/name/thank_you/<br />';
-			$form .= '<input type="text"  size="60" name="ggissubscribe_nextpage" value="'. $options['nextpage'] . '" />';
-			$form .= '</p>
-						<p>
-						URL of page containing the full subscription management form<br />
-						example: http://your.blog/name/manage_subscriptions/<br />';
-			$form .= '<input type="text"  size="60" name="ggissubscribe_formurl" value="' . $options['formurl'] . '">';
-			$form .= '</p>
-						<input type="hidden" name="action" value="update" />
-						<input type="hidden" name="page_options" value="ggissubscribe_maillists,ggissubscribe_nextpage,ggissubscribe_formurl" />
-						<p class="submit">';
-			$form .= '<input type="submit" name="submit" value="Save Changes" /></p>
-						</fieldset>';
-						
-			return $form;
-		}
-
-		
-		function ggissubscribe_options() {
-			$this->adminform .= '<div class="wrap"><h2>ggis Subscribe</h2>';
-			if ( $_POST['submit'] ){
-				$this->adminform .= $this->update_ggissubscribe_options();
-			}
-			$this->adminform .= $this->form_ggissubscribe_options();
-			$this->adminform .= '</div>';
-			echo $this->adminform;
-		}
-		
-		function update_ggissubscribe_options(){
-			$maillists = NULL;
-			$msg = '';
-			$options = NULL;
-			
-			check_admin_referer('ggis-subscribe-update-options_base');
-			
-			if ( $_POST['ggissubscribe_managertype'] ) {
-				$options['managertype'] = $_POST['ggissubscribe_managertype'];
-			} else {
-				$msg .= '<p>Manager type is required.</p>';
-			}
-			
-			if ( $_POST['ggissubscribe_maillists'] ) {
-				$maillists = explode(',', $_POST['ggissubscribe_maillists']);
-				foreach ( $maillists as $key => $val ){
-					$val = trim( strtolower( $val));
-					$maillists[$key] = $val;
-					if ( !is_email( $val) ){
-						$msg .= "<p>Please enter a valid email address for the mailing list. Your invalid entry was $val</p>";
-						unset( $maillists[$key]);
-					}
-				}
-				$options['maillists'] = implode( ',', $maillists);
-			} else {
-				$msg .= '<p>Mailing list entries are required.</p>';
-			}
-			
-			if ( $_POST['ggissubscribe_nextpage'] ) {
-				if ( !$this->is_url_valid( $_POST['ggissubscribe_nextpage'])){
-					$msg .= '<p>Please enter a valid next page. Your invalid entry was ' . $_POST['ggissubscribe_nextpage'] .'</p>';
-					unset( $_POST['ggissubscribe_nextpage']);
-				}
-				$options['nextpage'] = $_POST['ggissubscribe_nextpage'];
-			} else {
-				$msg .= '<p>Next page is required.</p>';
-			}
-			
-			if ( $_POST['ggissubscribe_formurl'] ) {
-				if ( !$this->is_url_valid( $_POST['ggissubscribe_formurl'])){
-					$msg .= '<p>Please enter a valid form URL. Your invalid entry was ' . $_POST['ggissubscribe_formurl'] .'</p>';
-					unset( $_POST['ggissubscribe_formurl']);
-				}
-				$options['formurl'] = $_POST['ggissubscribe_formurl'];
-			} else {
-				$msg .= '<p>Form URL is required.</p>';
-			}
-			if ( $msg <> '' ){
-				$msg = '<div id="message" class="error fade">'. $msg . '</div>';
-			}
-			if ( !is_null( $options) ){
-				update_option( 'ggis-Subscribe', serialize( $options));
-				$msg .= '<div id="message" class="updated fade"><p>Options saved.</p></div>';
-			}
-			return $msg;
-		}
-		
-		
-		// Verify string for valid URL format
-		function is_url_valid($url){			
-		    $url = @parse_url($url);
-		    if (!$url) {
-		        return false;
-		    }
-		
-		    $url = array_map('trim', $url);
-		    $url['port'] = (!isset($url['port'])) ? 80 : (int)$url['port'];
-		
-		    $path = (isset($url['path'])) ? $url['path'] : '/';
-		    $path .= (isset($url['query'])) ? "?$url[query]" : '';
-		
-		    if (isset($url['host']) AND $url['host'] != gethostbyname($url['host'])) {
-		        if (PHP_VERSION >= 5) {
-		            $headers = implode('', get_headers("$url[scheme]://$url[host]:$url[port]$path"));
-		        }
-		        else {
-		            $fp = fsockopen($url['host'], $url['port'], $errno, $errstr, 30);
-		
-		            if (!$fp)
-		            {
-		                return false;
-		            }
-		            fputs($fp, "HEAD $path HTTP/1.1\r\nHost: $url[host]\r\n\r\n");
-		            $headers = fread($fp, 4096);
-		            fclose($fp);
-		        }
-		        return (bool)preg_match('#^HTTP/.*\s+[(200)]+\s#i', $headers);
-		    }
-		    return false;
-		}
-		
-	/*
-	*	START formSubmitProcess FUNCTION
-	*/
-		function formSubmitProcess(){
-		/*
-		*	Handles form subscription submissions to ezmlm-idx.
-		*	These are sent via email.
-		*		formtype - indicates that form is for this plugin [validated]
-		*			ggis-subscribe-form
-		*		maillist - Which mailing list the subscription is for. [validated]
-		*			listname@npexchange.org
-		*		action - Subscribe or unsubscribe [validated]
-		*		email - Email address to manage [validated
-		*		name - Subscriber's name [optional] [validated]
-		*		nextpage - Go to this URL after processing subscription.[validated]
-		*			http://example.com
-		*		formurl - URL with full subscribe/unsubscribe form[validated]
-		*			http://example.com
-		*		message - Any error messages plus comments to be output for visitor. [internal]
-		*		mailto - Fully formatted email address to process request. [internal]
-		*		errmsg - Message array for the user when some of the input valuse are invalid. [internal]
-		*/
-				
-			if ( !isset($_POST['formtype']) ){
-				return;
-			}
-						
-			// SET INITIAL VALUES
-			$_GET = array();	//flush GET
-			$formtype = 'ggis-subscribe-form';
-			$maillist = NULL;
-			$action = NULL;
-			$email = NULL;
-			$name = NULL;
-			$nextpage = NULL;
-			$formurl = NULL;
-			$message = '';
-			$mailto = NULL;
-			$errmsg = array(
-				'action'	=> '<p>That action does not exist. Please contact the site owner.</p>',
-				'email'	=> '<p>The email address you entered is not valid.</p>',
-				'name'	=> '<p>The name you entered is not valid.</p>',
-				'nexturl'	=> '<p>The Next URL is not valid. Please contact the site owner.</p>',
-				'formurl'	=> '<p>The Form URL is not valid. Please contact the site owner.</p>'
-				);
-			$ar_mailing = NULL;
-			$options = unserialize( get_option( 'ggis-Subscribe'));
-			
-			if ( $_POST['formtype'] != $formtype ) return;
-			
-			// POPULATE VALUES FROM POST
-			if( isset( $_POST['maillist'] ) )	$maillist = strtolower($_POST['maillist']);
-			if( isset( $_POST['action'] ) )	$action	=	strtolower($_POST['action']);
-			if( isset( $_POST['ggis-subscribe-email'] ) )	$email	=	strtolower($_POST['ggis-subscribe-email']);
-			if( isset( $_POST['name'] ) )	$name	=	$_POST['name'];
-			if( isset( $_POST['nextpage'] ) )	$nextpage	=	$_POST['nextpage'];
-			if( isset( $_POST['formurl'] ) )	$formurl	=	$_POST['formurl'];
-			
-			$_POST = array();	// flush POST
-			
-			// VALIDATION
-			if (!(in_array($action, array('subscribe', 'unsubscribe')))){
-				$message .= $errmsg['action'];
-			}
-			if (!(is_email($email))){
-				$message .= $errmsg['email'];
-			}
-			if (!(empty($name) || is_name_valid($name))){
-				$message .= $errmsg['name'];	
-			}
-			if (!($this->is_url_valid($nextpage))){
-				$message .= $errmsg['nexturl'];
-			}
-			if (!($this->is_url_valid($formurl))){
-				$message .= $errmsg['formurl'];
-			}
-			
-			// PROCESS SUBSCRIPTION
-			if ( $message === '' ){	// no errors
-				$ar_mailing = serialize( array(
-								'maillist'		=>	$maillist,
-								'action'		=>	$action,
-								'email'			=>	$email,
-								'name'			=>	$name
-							) );
-							
-				if ( $options['managertype'] == 'ezmlm' ) {
-					$ar_mailing = $this->formatEzmlm($ar_mailing);
-				}else if ( $options['managertype'] == 'mailman' ) {
-					$ar_mailing = $this->formatMailman($ar_mailing);
-				}else{
-					print_r ($options);
-					exit;
-				}
-			
-				// BUILD LIST ACTION EMAIL
-				$ar_mailing = unserialize($ar_mailing);
-			
-				// Do it
-				mail($ar_mailing['to'], $ar_mailing['subject'], $ar_mailing['message']);
-				
-				// Go to next page
-				header("Location: $nextpage");
-				exit;
-			}
-			
-			// ERRORS ON FORM
-			// Doctype setup
-			$doctype = '<?xml version="1.0" encoding="utf-8"?>';
-			$doctype .= "\n";
-			$doctype .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
-			$doctype .= "\n";
-			$doctype .= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
-			$doctype .= "\n";
-				
-			?>
-			<?php echo $doctype; ?>
-			
-			<head>
-				<title>Subscription Management Errors - Please Correct</title>
-				<meta http-equiv="content-type" content="text/html;charset=utf-8" />
-				<meta http-equiv="Content-Style-Type" content="text/css" />
-			</head>
-			
-			<body>
-				<h1>There were some errors with your subscription management.</h1>
-				<?php echo $message; ?>
-				<p>To try again, please visit this page</p>
-				<blockquote><a id="subscription" name="subscription" title="Subscription Form" href="<?php echo $formurl; ?>"><?php echo $formurl; ?></a></blockquote>
-			
-			</body>
-			</html>
-			
-			<?php exit; ?>
-			<?php			
-			
-		}
-		/*
-		*	END formSubmitProcess FUNCTION
-		*/
-		
-		/*
-		*	START formatMailman FUNCTION
-		*/
-		function formatMailman($serialized_string){
-			$body = NULL;
-			$ar_mailing = unserialize( $serialized_string );
-			
-			// Properly format email
-			$mailto = str_replace('@', '-request@', $ar_mailing['maillist']);
-			// Format body
-			$body = $ar_mailing['action'] . ' address=' . $ar_mailing['email'];
-			$ar_mailing = serialize( array(
-								'to'		=>	$mailto,
-								'subject'		=>	$ar_mailing['action'],
-								'message'			=>	$body
-							) );
-			return $ar_mailing;
-		}
-		/*
-		*	END formatMailman FUNCTION
-		*/
-		
-		/*
-		*	START formatEzmlm FUNCTION
-		*/
-		function formatEzmlm($serialized_string){
-			$body = NULL;
-			$ar_mailing = unserialize( $serialized_string );
-			
-			// Properly format email
-			$email = str_replace('@', '=', $ar_mailing['email']);
-			// Create mailto
-			$mailto = str_replace('@', '-'. $ar_mailing['action'] .'-'. $email . '@', $ar_mailing['maillist']);
-			$ar_mailing = serialize( array(
-								'to'		=>	$mailto,
-								'subject'		=>	$ar_mailing['action'],
-								'message'			=>	$body
-							) );
-			return $ar_mailing;
-		}
-		/*
-		*	END formatEzmlm FUNCTION
-		*/
-		
-		// Verify string for valid name format
-		function is_name_valid($strname) { 
-		  if(preg_match('/^[a-zA-Z][a-zA-Z\',\.\- \s]*$/', $strname)) return TRUE; 
-		  else return FALSE; 
-		}
-
-	}	//End Class ggisSubscribe
-	
-	// SUBSTANTIATE AND ACT USING CLASS	
-	if (class_exists("ggisSubscribe")) {
-		$ggisSubscribe = new ggisSubscribe();
-	}
-	
-	//Actions and Filters   
-	if (isset($ggisSubscribe)) {
-		//Actions
-		add_action('init', array(&$ggisSubscribe, 'formSubmitProcess'));
-		add_action('wp_head', array(&$ggisSubscribe, 'addHeaderCode'));
-		add_action('admin_menu', array(&$ggisSubscribe, 'ggis_admin_add_pages'));
-		//Filters
-		add_filter('the_content', array(&$ggisSubscribe, 'the_content_filter')); 
-		add_filter('widget_text', array(&$ggisSubscribe, 'widget_text_filter'));
-	}
-
-}	// End ggis Subscribe
-
-?>
\ No newline at end of file
--- a/web/wp-content/plugins/ggis-subscribe/readme.txt	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-=== ggis-Subscribe ===
-Contributors: bujanga
-Donate link: http://dvector.com/oracle/2008/11/04/donate-to-ggis-plugins-and-modules/
-Tags: email, subscription, list, form
-Requires at least: 2.5
-Tested up to: 2.7
-Stable tag: 0.9
-
-Manages subscriptions to email lists. Simply add [-ggis-subscribe-] to your post.
-
-== Description ==
-
-ggis-Subscribe gives authors an easy way to insert a form that performs emailing list subscription management. Simply add [-ggis-subscribe-] to your post and it will create an email list subscription management form. Depending on the settings and parameters you choose, it will insert either a short form, just an email address box with submit button or a full management form.
-
-### Features and Requirements ###
-
-+ Wordpress 2.5 or greater
-+ Designation of success page
-+ An email list to subscribe to. Currently supports:
-1. ezmlm lists - subscribe by sending email to listname-subscribe-your=address.com@domain.com
-2. mailman lists - subscribe by sending email to listname-request@domain.com
-
-== Installation ==
-
-1. Download and unzip the plugin
-2. Upload the ggis-subscribe to the '/wp-content/plugins/' directory
-3. Activate the plugin through the 'Plugins' menu in WordPress
-4. Edit the ggis Subscibe options from the Settings menu.
-* Add the email address of your mailing list. If you have more than one list, use commas between each address.
-* Enter the URL of your thank you page (next page)
-* Enter the URL of you main subscription management page.
-+ Yes. Create and publish your subscription management first and then finish with your ggisSubscribe options.	
-5. Place `[-ggis-subscribe-]` in your posts.
-
-
-== Frequently Asked Questions ==
-
-= Does ggis Subscibe support XXX mailing list server? =
-
-At this time, it only supports;
-
-1. ezmlm lists - subscribe by sending email to listname-subscribe-your=address.com@domain.com
-2. mailman lists - subscribe by sending email to listname-request@domain.com
-
-If you would like additional email server support, please submit a comment to that effect.
-
-= Can this be used to unsubscribe? =
-
-Yes, that is part of the full subscription management form.
-
-= How can I adjust the form's appearance =
-
-You should be able to fully control your form's appearance using CSS. The HTML output is fully embedded with CSS tags to make personalization easy. As an example:
->	`input.ggis-subscribe-email { width:90%; }`
-
-== Screenshots ==
-
-1. A screenshot of the subscription management form, screen1.png.
-2. A screenshot of the ggis Subscribe Settings page, screen2.png
-
-== Usage ==
-
-A subscription form may be inserted on a post, page, or text widget by including the following code in your text.
-
->	`[-ggis-subscribe %formtype "%listname"-]`
-
-Here is an explanation of the fields:
-
-1. ggis-subscribe - identifies the code (required)
-2. formtype - identifies the form type
-* 0, default - full subscription management form
-* 1 - subscribe only form , requires "listname"
-3. listname - identifies the list to include in a subscription only form
-
-### In a Widget? ###
-
-A subscription form may be placed into the standard text widget using the methods above. For widget use, I suggest using only formtype=1, the short form.
Binary file web/wp-content/plugins/ggis-subscribe/screen1.png has changed
Binary file web/wp-content/plugins/ggis-subscribe/screen2.png has changed
--- a/web/wp-content/plugins/gigs-calendar/ajaxSetup.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-<?php
-
-// If it cannot locate the wp-config file, you may have to hard code the full path here.
-if ( file_exists('../../../wp-load.php') ) {
-	require_once('../../../wp-load.php');
-} else {
-	require_once('../../../wp-config.php');
-}
-
-$gcd = 'gigs-calendar'; // Domain for Internationalization
-load_plugin_textdomain($gcd, 'wp-content/plugins/gigs-calendar/i18n');
-
-require_once 'gigs-classes.php';
-if ( !defined('WP_CONTENT_URL') ) define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
-if ( !defined('WP_CONTENT_DIR') ) define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
-
-
-if ( !defined('GIGS_RSS') )
-	header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
-
-if ( !defined('GIGS_PUBLIC') ) {
-	if ( !is_user_logged_in() ) die("not logged in");
-	if ( !wp_verify_nonce($_POST['nonce'], 'gigs-calendar') ) {
-		if ( in_array($_POST['action'], array('delete')) ) {
-			die('{"success":false,"error":"nonce","action":"' . $_POST['action'] . '"}');
-		} else {
-			die(__('Your authentication token seems to have timed out.  Try refreshing this page before continuing.', $gcd));
-		}
-	}
-}
-
-$folder = dtc_gigs::get_url();
-
-		
-$options = get_option('gigs-calendar');
-
-$gcd = 'gigs-calendar'; // Domain for Internationalization
-load_plugin_textdomain($gcd, 'wp-content/plugins/gigs-calendar/i18n');
-
-?>
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/archive.ajax.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,556 +0,0 @@
-<?php
-
-require_once 'ajaxSetup.php';
-$pageTarget = $folder . 'archive.ajax.php';
-
-switch ($_POST['action']) {
-	case 'load':
-		$v = new venue();
-		$g = new gig();
-		$p = new performance();
-		$g->search("date <= CURDATE()", 'date DESC');
-		?>
-			<table id="gig-list" class="gigs widefat">
-				<thead>
-					<tr>
-						<th style="text-align: center;" scope="col"><?php _e('ID', $gcd) ?></th>
-						<th scope="col"><?php _e('Venue', $gcd) ?></th>
-						<th scope="col"><?php _e('City', $gcd) ?></th>
-						<th scope="col"><?php _e('Date', $gcd) ?></th>
-						<th scope="col"><?php _e('Time', $gcd) ?></th>
-						<th style="text-align: center" scope="col"><?php _e('Actions', $gcd) ?></th>
-					</tr>
-				</thead>
-				<tbody>
-					<?php while ( $g->fetch() ) : $v = $g->getVenue(); $p = $g->getPerformances(); $post = get_post($g->postID);?>
-						<tr id="gig-<?php echo $g->id; ?>" class="gig gig-<?php echo $g->id; ?> <?php echo ++$count % 2 ? "alternate" : "";?>">
-							<th style="text-align: center;" scope="row"><?php echo $g->id; ?></th>
-							<td class="venue"><?php echo $v->name; ?></td>
-							<td class="city"><?php echo $v->city . (!empty($v->state) ? ', ' . $v->state :  '') ?></td>
-							<td class="date"><?php echo $g->date ?></td>
-							<td class="time">
-								<?php if ( $p ) : while ( $p->fetch() ) : ?>
-									<span class="time"><?php echo dtcGigs::timeFormat($p->time) ?></span>
-								<?php endwhile; endif; ?>
-							</td>
-							<td class="actions" style="text-align: center; position: relative;">
-								<div style="position: relative">
-									<a target="_blank" class="guid" href="<?php echo $g->getPermalink(); ?>"><img alt="<?php _e('View Gig', $gcd) ?>" title="<?php _e('View Gig', $gcd) ?>" class="clickable view" src="<?php echo $folder; ?>images/page_white_magnify.png" /></a>
-									<img alt="<?php _e('Edit', $gcd) ?>" title="<?php _e('Edit', $gcd) ?>" class="clickable edit" src="<?php echo $folder; ?>images/page_white_edit.png" />
-									<?php if ( $v ) : ?>
-										<a target="_blank" href="<?php echo $v->getMapLink(); ?>"><img alt="<?php _e('Map', $gcd) ?>" title="<?php _e('Map', $gcd) ?>" class="clickable map" src="<?php echo $folder; ?>images/world.png" /></a>
-									<?php endif ?>
-									<a target="_blank" href="<?php echo get_option('siteurl') ?>/wp-admin/post.php?action=edit&post=<?php echo $post->ID; ?>">
-										<img alt="<?php _e('Edit WordPress Post', $gcd) ?>" title="<?php _e('Edit WordPress Post', $gcd) ?>" class="clickable edit-post" src="<?php echo $folder; ?>images/page_edit.png" />
-									</a>
-									<img alt="<?php _e('Delete', $gcd) ?>" title="<?php _e('Delete', $gcd) ?>" class="clickable delete" src="<?php echo $folder; ?>images/delete.png" />
-								</div>
-							</td>
-						</tr>
-						<tr id="gig-panel-<?php echo $g->id; ?>" class="gig gig-<?php echo $g->id; ?> panel <?php echo $count % 2 ? "alternate" : "";?>">
-							<td style="background-color: white"></td>
-							<td class="panel" colspan="5"></td>
-						</tr>
-					<?php endwhile; ?>
-				</tbody>
-			</table>
-				
-			<script type="text/javascript">
-			
-				(function($){
-					$("#add-venue").click(function(){
-						gigs_page_load("venues", "new=1");
-					});
-					
-					$("#gig-add-trigger").click(function(){
-						$("#gig-add-form:hidden").slideDown(300, function(){
-							$("#new-name").focus();
-						});
-					});
-					
-					$("#new-gig-reset").click(function(){
-						$("#gig-add-form table.performance[id!=performance-c1]").parents("tr").remove();
-						$("#gig-add-form").slideUp(300);
-					});
-					
-					$("#new-date").datepicker({dateFormat:"yy-mm-dd"});
-					$(".date-field").datepicker({dateFormat:"yy-mm-dd"});
-					
-					
-					$("#new-gig").ajaxForm({
-						url:pageTarget,
-						dataType: "json",
-						success:function(json){
-							gigs = $("table#gig-list tbody tr:not(.panel) td.date");
-							inserted = false;
-							for ( i = 0; i < gigs.length; i++ ) {
-								if ( json.gig.date < gigs.eq(i).html() ) {
-									g = gigs.eq(i);
-									$.post(pageTarget, {
-										nonce:nonce,
-										action:'getRow',
-										id:json.gig.id
-									}, function(rsp){
-										g.parents("tr").before(rsp);
-										resetTableColors("table#gig-list");
-									});
-									inserted = true;
-									break;
-								}
-							}
-							if ( !inserted ) {
-								$.post(pageTarget, {
-									nonce:nonce,
-									action:'getRow',
-									id:json.gig.id
-								}, function(rsp){
-									$("table#gig-list tbody").append(rsp);
-									resetTableColors("table#gig-list");
-								});
-							}
-							$("#new-gig-reset").click();
-						}
-
-					});
-					
-					setupPerformanceRemoval = function() {
-						$("div.delete-performance img").unbind("click");
-						$("div.delete-performance img").click(function(){
-							id = $(this).parents("tr").eq(0).find("input.performanceID").val();
-							if ( id == "" ) {
-								$(this).parents("tr").eq(1).remove();
-							} else {
-								if ( confirm("<?php _e('Are you sure you want to remove this performance?', $gcd) ?>") ) {
-									$(this).parents("form").children(".extra-inputs").append('<input type="hidden" name="delete[]" value="' + id + '" />');
-									$(this).parents("tr").eq(1).remove();
-								}
-							}
-						});
-					}
-					
-					setupPerformances = function() {
-						$(".add-performance").unbind("click");
-						$(".add-performance").click(function(){
-							td = $(this).parents("tr").eq(0).before("<tr><td colspan='2'><div class='loading'><img src='<?php echo $folder; ?>images/ajax-loader.gif' alt='' /></div></td></tr>").prev().children("td").load(pageTarget,{
-								nonce:nonce,
-								action:"performance-form",
-								count:$(this).parents("table").eq(0).find("table.performance").length + 1
-							}, setupPerformanceRemoval);
-						});
-						setupPerformanceRemoval();
-
-					}
-					
-					setupEvents = function() {
-						$("img.delete").unbind("click");
-						$("img.delete").click(function(){
-							id = $(this).parents("tr").attr("id").split("-")[1];
-							$.post(pageTarget, {
-								nonce:nonce,
-								action:'delete',
-								id:id
-							});
-							$(this).parents("tr").next().remove();
-							$(this).parents("tr").remove();
-							resetTableColors("table#gig-list");
-						});
-						
-						$("img.edit").unbind("click");
-						$("img.edit").click(function(){
-							row = $(this).parents("tr");
-							id = row.attr("id").split("-")[1];
-							row.next().children("td.panel").load(pageTarget, {
-								nonce:nonce,
-								action:"edit",
-								id:id
-							}, function(){
-								row.next().css("display", "table-row");
-							});
-						});
-						
-						setupPerformances();
-					}
-					
-					setupEvents();
-
-				}(jQuery));
-				
-			
-			
-			</script>
-		<?php
-		break;
-	case 'delete':
-		$g = new gig($_POST['id']);
-		$result = $g->delete();
-		echo '{"success": ' . ($result ? 'true' : 'false') . ',"action":"delete"' . ($result ? '' : ',"error":"db"') . '}';
-		break;
-	case 'edit':
-		$g = new gig($_POST['id']);
-		$p = $g->getPerformances();
-		$v = $g->getVenue();
-		?>
-			<form id="edit-gig-<?php echo $g->id ?>" class="edit-item" method="post" action="<?php echo $pageTarget; ?>">
-				<table>
-					<tbody>
-						<tr><td colspan="2">
-							<h3 class="no-margin"><?php _e('Gig Information', $gcd) ?></h3>
-							<div class="instructions"><?php _e('A "gig" is unique to a date at a venue.', $gcd) ?></div>
-						</td></tr>
-						<tr class="venue">
-							<td><label for="new-venue"><?php _e('Venue:', $gcd) ?></label></td>
-							<td>
-								<?php echo $v->name . ' - ' . $v->getCity() ?>
-							</td>
-						</tr>
-						<tr class="date">
-							<td><label for="new-date"><?php _e('Date:', $gcd) ?></label></td>
-							<td><input type="text" class="date wide" name="date" id="edit-date-<?php echo $g->id ?>" value="<?php echo $g->date ?>" /></td>
-						</tr>
-						<tr class="eventName">
-							<td><label for="edit-eventName-<?php echo $g->id ?>"><?php _e('Event Name:', $gcd) ?></label></td>
-							<td><input type="text" class="eventName wide" name="eventName" id="edit-eventName-<?php echo $g->id ?>" value="<?php echo $g->eventName ?>" /></td>
-						</tr>
-						<tr class="tour">
-							<td><label for="edit-tour_id-<?php echo $g->id ?>"><?php _e('Tour:', $gcd) ?></label></td>
-							<td class="tour">
-								<select class="tour_id" name="tour_id" id="edit-tour_id-<?php echo $g->id ?>">
-									<option value="-1"><?php _e("--None--", $gcd); ?></option>
-									<?php $t = new tour(); $t->search(null, '`name`'); ?>
-									<?php while ( $t->fetch() ) : ?>
-										<option value="<?php echo $t->id; ?>" <?php if ( $g->tour_id == $t->id ) echo 'selected="selected"'; ?>><?php echo $t->name; ?></option>
-									<?php endwhile; ?>
-								</select>
-							</td>
-						</tr>
-						<?php if ( function_exists('wp_set_post_tags') ) : ?>
-							<tr class="tags">
-								<td><label for="edit-tags-<?php echo $g->id ?>"><?php _e('Post Tags:', $gcd) ?></label></td>
-								<td><input type="text" class="tags wide" name="tags" id="edit-tags-<?php echo $g->id ?>" value="<?php echo dtcGigs::escapeForInput(implode(', ', $g->getTags())) ?>" /></td>
-							</tr>
-						<?php endif; ?>
-						<tr class="notes"><td colspan="2">
-							<?php _e('Description/Other notes:', $gcd) ?><br />
-							<textarea class="notes" name="notes" rows="8" cols="80"><?php echo $g->notes ?></textarea>
-						</td></tr>
-						
-						<?php if ( $wp_version >= 2.5 ) : ?>
-							<?php 
-								$metadata = get_post_custom($g->postID);
-								dtcGigs::extraFields(apply_filters('gigCal_gigs_extraFields', array()), $metadata, $g->id);
-							?>
-							<tr><td colspan="2">
-								<div id="postcustom-<?php echo $g->id ?>" class="postcustom">
-									<h3 title="<?php _e('Click to expand', $gcd); ?>" class="clickable"><?php _e('Custom Fields') ?> <img class="inline-icon" src="<?php echo $folder ?>images/plus.gif" alt="<?php _e('Expand', $gcd); ?>"> <img class="inline-icon" style="display:none;" src="<?php echo $folder ?>images/minus.gif" alt="<?php _e('Collapse', $gcd); ?>"></h3>
-									<div class="inside">
-										<div id="postcustomstuff-<?php echo $g->id ?>">
-										<table cellpadding="3">
-											<thead>
-												<tr>
-													<th><?php _e('Key', $gcd) ?></th>
-													<th><?php _e('Value', $gcd) ?></th>
-													<th></th>
-												</tr>
-											</thead>
-											<tbody>
-												<?php
-													$metadata = get_post_custom($g->postID);
-													foreach ( $metadata as $key => $values ) {
-														foreach ( $values as $index => $value ) {
-															if ( substr($key, 0, 1) != '_' ) {
-																?><tr>
-																	<td><input value="<?php echo addslashes($key) ?>" name="custom-key[]" /></td>
-																	<td>
-																		<textarea rows="1" name="custom-value[]"><?php echo htmlspecialchars($value) ?></textarea>
-																		<textarea style="display:none;" rows="1" name="old-custom-value[]"><?php echo htmlspecialchars($value) ?></textarea>
-																		<input class="delete" type="hidden" name="deletecustom[]" value="0" />
-																	</td>
-																	<td><img alt="<?php _e('Remove Custom Field', $gcd) ?>" title="<?php _e('Remove Custom Field', $gcd) ?>" class="clickable delete-custom" src="<?php echo $folder; ?>images/delete.png" /></td>
-																</tr><?php
-															}
-														}
-													}
-												?>
-											</tbody>
-										</table>
-										<div class="custom-ajax-response"></div>
-										</div>
-										<p>
-											<span class="clickable add-custom-field">
-												<img class="inline-icon" src="<?php echo $folder ?>images/add.png" alt="" />
-												<?php _e('Add a new custom field'); ?>
-											</span>
-										</p>
-										<p><?php _e('Custom fields can be used to add extra metadata to a gig that you can use in a special template.'); ?></p>
-									</div>
-								</div>
-							</td></tr>
-						<?php endif; ?>
-						
-						<tr><td colspan="2">
-							<h3 class="no-margin"><?php _e('Performances', $gcd) ?></h3>
-							<div class="instructions"><?php _e('You can add as many performances as<br />you are giving at a venue on the given date.', $gcd) ?></div>
-						</td></tr>
-						<?php while ( $p->fetch() ) : ?>
-							<tr><td colspan="2">
-								<?php pForm($p->id, false) ?>
-							</td></tr>
-						<?php endwhile ?>
-						<tr><td colspan="2">
-							<div class="clickable add-performance"><img class="icon" src="<?php echo $folder; ?>images/add.png" /> <?php _e('Add another performance', $gcd) ?></div>
-						</td></tr>
-
-					</tbody>
-				</table>
-				<div class="extra-inputs">
-					<input type="submit" class="button" name="" value="<?php _e('Save Gig', $gcd); ?>" />
-					<input type="reset" class="button cancel" name="" value="<?php _e('Cancel', $gcd); ?>" id="edit-gig-reset-<?php echo $g->id ?>" />
-					<input type="hidden" name="action" value="save" />
-					<input type="hidden" name="id" value="<?php echo $g->id ?>" />
-					<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-				</div>
-			</form>
-			
-			<script type="text/javascript">
-				(function($){
-					(function(form) { // Function to let a plugin add extra JS code to process the form.
-						<?php do_action('gigCal_gigs_formExtraJS'); ?>
-					}($("#edit-gig-<?php echo $g->id ?>")));
-
-					$("#edit-gig-<?php echo $g->id ?> .add-custom-field").click(function(){
-						$("#edit-gig-<?php echo $g->id ?> .postcustom table").append('<tr><td><input value="" name="custom-key[]" /></td><td><textarea rows="1" name="custom-value[]"></textarea><textarea style="display:none;" rows="1" name="old-custom-value[]"></textarea><input class="delete" type="hidden" name="deletecustom[]" value="0" /></td><td><img class="delete-custom" alt="<?php _e('Remove Custom Field', $gcd) ?>" title="<?php _e('Remove Custom Field', $gcd) ?>" class="clickable" src="<?php echo $folder; ?>images/delete.png" /></td></tr>');
-						
-						$("#edit-gig-<?php echo $g->id ?> .delete-custom").unbind("click");
-						$("#edit-gig-<?php echo $g->id ?> .delete-custom").click(function(){
-							$(this).parents("tr").eq(0).remove();
-						});
-					});
-					
-					$("#edit-gig-<?php echo $g->id ?> .delete-custom").click(function(){
-						$(this).parents("td").eq(0).siblings().children("input.delete").val(1);
-						$(this).parents("tr").eq(0).hide();
-					});
-					
-					$("#postcustom-<?php echo $g->id ?> h3.clickable").click(function(){
-						$(this).next().toggle();
-						$(this).children(".inline-icon").toggle();
-					});
-
-
-				
-					$("#edit-gig-<?php echo $g->id ?> .date").datepicker({dateFormat:"yy-mm-dd"});
-					$(".date-field").datepicker({dateFormat:"yy-mm-dd"});
-					setupPerformances();
-					
-					$("#edit-gig-reset-<?php echo $g->id ?>").click(function(){
-						$(this).parents("tr.panel").hide();
-					});
-					
-					$("#edit-gig-<?php echo $g->id ?>").ajaxForm({
-						url:pageTarget,
-						dataType: "json",
-						success:function(json){
-							row = $("#gig-panel-" + json.gig.id).hide().prev();
-							row.children("td.date").html(json.gig.date);
-							row.find("a.guid").attr("href", json.gig.permalink);
-							times = row.children("td.time");
-							times.html("");
-							for ( i = 0; i < json.gig.performances.length; i++ ) {
-								time = json.gig.performances[i].time.split(":");
-								<?php if ( $options['time-12h'] ) : ?>
-									if ( time[0] == 0 ) {
-										time[0] = 12;
-										time[2] = 'am';
-									} else if ( time[0] == 12 ) {
-										time[2] = 'pm';
-									} else if ( time[0] < 12 ) {
-										time[2] = 'am';
-									} else if ( time[0] > 12 ) {
-										time[0] = time[0] - 12;
-										time[2] = 'pm';
-									}
-									times.append('<span class="time">' + time[0] + ':' + time[1] + time[2] + '</span> ');
-								<?php else : ?>
-									times.append('<span class="time">' + time[0] + ':' + time[1] + '</span> ');
-								<?php endif; ?>
-							}
-							
-						}
-					});
-				}(jQuery));
-			</script>
-		<?php
-		break;
-		
-	case 'save':
-		$g = new gig($_POST['id']);
-		$g->date = $_POST['date'];
-		$g->notes = $_POST['notes'];
-		$g->setTags($_POST['tags']);
-		$g->eventName = $_POST['eventName'];
-
-		if ( isset($_POST['performanceID']) ) {
-			foreach ( $_POST['performanceID'] as $key => $pid ) {
-				$p = new performance((empty($pid) ? null : $pid));
-				$p->gigID = $g->id;
-				$p->link = $_POST['link'][$key];
-				$p->shortNotes = $_POST['shortNotes'][$key];
-				$p->ages = (empty($_POST['ages-custom'][$key]) ? $_POST['ages'][$key] : $_POST['ages-custom'][$key]);
-				$p->time = date("H:i:s", strtotime($_POST['hour'][$key] . ':' . $_POST['minute'][$key] . ' ' . $_POST['meridiem'][$key]));
-				$p->save();
-			}
-		}
-		
-		$p = new performance();
-		if ( isset($_POST['delete']) ) {
-			foreach ( $_POST['delete'] as $pid ) {
-				$p->get($pid);
-				$p->delete();
-			}
-		}
-		
-		$g->save();
-		
-		foreach ( $_POST['deletecustom'] as $key => $delete ) {
-			if ( $delete ) {
-				delete_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['old-custom-value'][$key]);
-			}
-		}
-		
-		foreach ( $_POST['custom-key'] as $key => $field ) {
-				if ( is_array($_POST['custom-value'][$key]) ) {
-					foreach ( $_POST['custom-value'][$key] as $k => $v ) {
-						if ( $v === "" ) {
-							unset($_POST['custom-value'][$key][$k]);
-						}
-					}
-				}
-				if ( empty($_POST['custom-value'][$key]) && empty($_POST['old-custom-value'][$key]) ) {
-					// If both value fields are empty, just ignore this field.
-					continue;
-				} elseif ( $_POST['custom-value'][$key] === "" ) {
-					// If the old value is not empty, but the new one is, delete this sucker.
-					delete_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['old-custom-value'][$key]);
-				} elseif ( $_POST['old-custom-value'][$key] === "" ) {
-					// If the old value is empty, but the new one is not, create a new custom field.
-					add_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key]);
-				} elseif ( $_POST['old-custom-value'][$key] != $_POST['custom-value'][$key] && $_POST['old-custom-value'][$key] != serialize($_POST['custom-value'][$key]) ) {
-					// If the old and new values are not equal, update the custom field.
-					update_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key], unserialize($_POST['old-custom-value'][$key]));
-				}
-		}
-
-		echo '{success:true, gig:' . $g->toJSON() . '}';
-		break;
-		
-	case 'performance-form':
-		if ( isset($_POST['id']) ) {
-			pForm($_POST['id'], false);
-		} else {
-			pForm((int) $_POST['count'], true);
-		}
-		break;
-}
-
-
-function pForm($id, $new = true, $remove = true) {
-	global $folder, $gcd, $options;
-	$p = new performance();
-	if ( $new ) {
-		$count = 'c' . $id;
-	} else {
-		$p->get($id);
-		$count = 'id' . $id;
-	}
-	
-	$ages = $options['ages-list'];
-	
-	$time = explode(":", $p->time);
-	$minutes = $time[1];
-	
-	if ( $options['time-12h'] ) {
-		if ( $time[0] == 0 ) {
-			$hour = "12";
-			$meridiem = "AM";
-		} elseif ( $time[0] == 12 ) {
-			$hour = "12";
-			$meridiem = "PM";
-		} elseif ( $time[0] < 12 ) {
-			$hour = $time[0];
-			$meridiem = "AM";
-		} else {
-			$hour = $time[0] - 12;
-			$meridiem = "PM";
-		}
-	} else { 
-		$hour = $time[0];
-	}
-	?>
-		<table id="performance-<?php echo $count ?>" class="performance performance-<?php echo $count ?> <?php if ( $new ) echo 'new' ?>"><tbody>
-			<tr>
-				<td>
-					<label>
-						<input type="hidden" class="performanceID" name="performanceID[]" value="<?php echo $p->id; ?>" />
-						<?php _e('Performance Time:', $gcd) ?>
-					</label>
-				</td><td>
-					<div>
-						<select name="hour[]">
-							<?php for ( $i = 1; $i <= ($options['time-12h'] ? 12 : 23); $i++ ) : ?>
-								<option <?php if ( $i == $hour ) echo 'selected="selected"' ?>><?php echo $i ?></option>
-							<?php endfor; ?>
-						</select>
-						<select name="minute[]">
-							<option <?php if ( "00" == $minutes ) echo 'selected="selected"' ?>>00</option>
-							<option <?php if ( "15" == $minutes ) echo 'selected="selected"' ?>>15</option>
-							<option <?php if ( "30" == $minutes ) echo 'selected="selected"' ?>>30</option>
-							<option <?php if ( "45" == $minutes ) echo 'selected="selected"' ?>>45</option>
-							<option value="00">--</option>
-							<?php for ( $i = 0; $i <= 59; $i++ ) : ?>
-								<option <?php if ( !in_array($i, array("00", "15", "30", "45")) && $i == $minutes ) echo 'selected="selected"' ?>><?php echo str_pad($i, 2, STR_PAD_LEFT, '0') ?></option>
-							<?php endfor; ?>
-						</select>
-						<?php if ( $options['time-12h'] ) : ?>
-							<select name="meridiem[]">
-								<option <?php if ( 'AM' == $meridiem ) echo 'selected="selected"' ?>><?php _e('AM', $gcd) ?></option>
-								<option <?php if ( 'PM' == $meridiem ) echo 'selected="selected"' ?>><?php _e('PM', $gcd) ?></option>
-							</select>
-						<?php else : ?>
-							<input type="hidden" name="meridiem[]" value="" />
-						<?php endif; ?>
-						<?php if ( $remove ) : ?>
-							<div class="delete-performance"><img alt="<?php _e('Remove Performance', $gcd) ?>" title="<?php _e('Remove Performance', $gcd) ?>" class="clickable" src="<?php echo $folder; ?>images/delete.png" /></div>
-						<?php endif ?>
-					</div>
-				</td>
-			</tr><tr>
-				<td>
-					<label for="performance-link[]"><?php _e('External Link (for tickets):', $gcd) ?></label>
-				</td><td>
-					<input type="text" class="link wide" name="link[]" id="performance-link[]" value="<?php echo $p->link ?>" />
-				</td>
-			</tr><tr>
-				<td>
-					<label for="performance-shortNotes-<?php echo $count; ?>"><?php _e('Short Notes:', $gcd) ?></label>
-				</td><td>
-					<input type="text" class="shortNotes wide" name="shortNotes[]" id="performance-shortNotes-<?php echo $count; ?>" value="<?php echo $p->shortNotes ?>" />
-				</td>
-			</tr><tr>
-				<td>
-					<label for="performance-ages-<?php echo $count; ?>"><?php _e('Ages:', $gcd) ?></label>
-				</td><td>
-					<select name="ages[]" id="performance-ages-<?php echo $count; ?>">
-						<?php $found = false; foreach ( $ages as $age ) : ?>
-							<option <?php if ( $p->ages == $age ) {echo 'selected="selected"'; $found = true;} ?>><?php echo $age ?></option>
-						<?php endforeach; ?>
-					</select>
-					<?php _e('Or...', $gcd) ?>
-					<input type="text" class="ages" name="ages-custom[]" id="performance-ages-custom[]" value="<?php if ( !$found ) echo $p->ages; ?>" />
-				</td>
-			</tr>
-		</tbody></table>
-		<script type="text/javascript">
-		</script>
-	<?php
-}
-?>
--- a/web/wp-content/plugins/gigs-calendar/credits.ajax.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?php require_once 'ajaxSetup.php'; ?>
-
-<p>
-	<?php _e('The Gigs Calendar plugin for WordPress was developed by me, <a href="http://dancoulter.com">Dan Coulter</a>. If you need some custom PHP development (for WordPress or not), I am available for hire (you can get in touch with me through this plugin).  To find other free plugins and useful tips for bands and musicians, visit my new site, <a href="http://blogsforbands.com">Blogs for Bands</a>.', $gcd) ?>
-</p>
-<p>
-	<?php _e('You can help <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=dancoulter%40gmail%2ecom&item_name=Blogs%20for%20Bands&item_number=Gigs%20Calendar%20Plugin&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">support the development</a> of this free plugin through Paypal.  If you have specific features that you need, you can request them through the feedback form or hire me to develop them for you.', $gcd) ?>
-</p>
-<p>
-	<?php _e('The lovely <a href="http://www.famfamfam.com/lab/icons/silk/" target="_blank">Silk icons</a> were created by Mark James.  They are licensed under the <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons</a>.', $gcd) ?>
-</p>
-
-<?php do_action('gigCal_credits_extra'); ?>
--- a/web/wp-content/plugins/gigs-calendar/feedback.ajax.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-<?php
-
-require_once 'ajaxSetup.php';
-
-if ( 'load' == $_POST['action'] ) {
-	$userinfo = wp_get_current_user();
-	//print_r($userinfo);
-	?>
-		<h3 class="no-margin"><?php _e('Want to tell me what a great/horrible job I did?', $gcd) ?></h3>
-		<form id="submit-feedback" class="feedback" action="<?php echo $folder;?>feedback.ajax.php" method="post">
-			<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-			<input type="hidden" name="action" value="feedback" />
-			<div>
-				<label><?php _e('Your name:', $gcd) ?> <input type="text" name="name" value="<?php echo $userinfo->display_name; ?>" /></label>
-				<select id="nameOptions">
-					<option><?php echo $userinfo->display_name; ?></option>
-					<option><?php echo $userinfo->nickname; ?></option>
-					<?php if ( isset($userinfo->user_firstname) ) : ?>
-						<option><?php echo $userinfo->user_firstname; ?></option>
-						<?php if ( isset($userinfo->user_lastname) ) : ?>
-							<option><?php echo $userinfo->user_firstname; ?> <?php echo $userinfo->user_lastname; ?></option>
-						<?php endif; ?>
-					<?php endif; ?>
-				</select>
-			</div>
-			<div><label><?php _e('Email Address:', $gcd) ?> <input type="text" name="email" value="<?php echo $userinfo->user_email; ?>" /></label></div>
-			<div><label>
-				<?php _e('Type of feedback:', $gcd) ?> 
-				<select name="type">
-					<option value='Bug Report'><?php _e('Bug Report', $gcd) ?></option>
-					<option value='Feedback/Comments'><?php _e('Feedback/Comments', $gcd) ?></option>
-					<option value='Feature Request'><?php _e('Feature Request', $gcd) ?></option>
-				</select>
-			</label></div>
-			<div><?php _e("If you're reporting a bug, please be as specific as possible.  Also, please use English if you can.", $gcd) ?><br /><textarea name="message"></textarea></div>
-			<h4 class="no-margin"><?php _e("Additional information that might help (deselect anything you don't want to send, but I might ask you for it anyway)", $gcd) ?></h4>
-			<div id="additional-info">
-				<div><label><input type="checkbox" value="blogurl" checked="checked" /> <?php _e('Blog URL', $gcd) ?></label> <input type="text" readonly="readonly" value="<?php bloginfo('wpurl'); ?>" name="blogurl" id="blogurl" /></div>
-				<div><label><input type="checkbox" value="wpversion" checked="checked" /> <?php _e('WordPress Version', $gcd) ?></label> <input type="text" readonly="readonly" value="<?php echo $wp_version; ?>" name="wpversion" id="wpversion" /></div>
-				<div><label><input type="checkbox" value="phpversion" checked="checked" /> <?php _e('PHP Version', $gcd) ?></label> <input type="text" readonly="readonly" value="<?php echo phpversion(); ?>" name="phpversion" id="phpversion" /></div>
-				<div><label><input type="checkbox" value="mysql" checked="checked" /> <?php _e('MySQL Info', $gcd) ?></label> <input type="text" readonly="readonly" value="<?php echo mysql_get_server_info() ?>" name="mysql" id="mysql" /></div>
-				<div><label><input type="checkbox" value="browser" checked="checked" /> <?php _e('Browser Info', $gcd) ?></label> <input type="text" readonly="readonly" value="<?php echo $_SERVER['HTTP_USER_AGENT'] ?>" name="browser" id="browser" /></div>
-			</div>
-			<div><label><input type="checkbox" value="1" name="settings" checked="checked" /> <?php _e('Include your plugin settings', $gcd) ?></label></div>
-			<input type="submit" class="button" value="<?php dtcGigs::escapeForInput(_e('Send Feedback', $gcd)) ?>" />
-			<input type="reset" class="button cancel" id="feedback-reset" value="<?php dtcGigs::escapeForInput(_e('Cancel', $gcd)) ?>" />
-		</form>
-		<script type="text/javascript">
-			
-			target = ajaxTarget + "categories.ajax.php";
-			jQuery("#additional-info input:checkbox").change(function(){
-				jQuery("#" + this.value).attr("disabled", !this.checked);
-			});
-			
-			jQuery("form#submit-feedback").ajaxForm({
-				url:pageTarget,
-				dataType: "json",
-				success:function(json){
-					if ( json.success ) {
-						jQuery("#feedback").html('<div style="text-align: center"><?php _e("Thanks for your feedback!  I&rsquo;ll try to get back to you as soon as I can.", $gcd) ?></div>');
-					}
-				}
-			});
-			
-			(function($){
-				$("input[name=name]").focus();
-				
-				$("#nameOptions").change(function(){
-					$("input[name=name]").val(($(this).val()));
-				});
-			}(jQuery));
-		</script>
-	<?php
-} elseif ( 'feedback' == $_POST['action'] ) {
-	$feedbackEmail = 'feedback.music' . (true?'@':'blah') . 'ssdn.us';  // Take that, spambots reading my repository!
-	$msg = '';
-	foreach ( $_POST as $key => $value ) {
-		if ( $key != 'nonce' && $key != 'message' && $key != 'action' ) {
-			$msg .= $key . ': ' . $value . "\n";
-		}
-	}
-
-	$msg .= 'Plugin Version: ' . DTC_GIGS_PLUGIN_VERSION . "\n";
-	$msg .= 'Database Version: ' . DTC_GIGS_DB_VERSION . "\n";
-	
-	$msg .= "\nMessage:\n" . $_POST['message'];
-	
-	if ( $_POST['settings'] == '1' ) {
-		$msg .= "\n\n\nSettings:\n" . print_r($options, true);
-	}
-	if ( wp_mail($feedbackEmail, 'Gigs Calendar - ' . $_POST['type'], $msg, 'Reply-To: ' . str_replace(array("\r", "\n"), '', $_POST['email'])) ) {
-		echo '{success: true}';
-	} else {
-		echo '{success: false}';
-	}
-}
-
-?>
--- a/web/wp-content/plugins/gigs-calendar/gigs-calendar-admin-wp2.5.css	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-ul#gigs-menu {
-	margin: .5em 0px;
-}
-
-div.instructions { 
-	background-color: #E4F2FD;
-}
-
-table#gig-list.widefat table td {
-	border: 0px;
-}
-
-div#postcustomstuff-new table td {
-	vertical-align: top;
-}
-
-div#postcustomstuff-new table th {
-	line-height:1.3em;
-	padding:9px 15px 6px 10px;
-	text-align:left;
-	color:#D7D7D7;
-	background-color: #464646;
-}
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/gigs-calendar-admin.css	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-.todo {
-	display: none;
-}
-
-a img {
-	border: 0px;
-}
-
-#loading, .loading {text-align: center}
-
-ul#gigs-menu {
-	margin: 0px 5%;
-	padding: 0px;
-}
-
-li.selected {font-weight: bold}
-
-img.inline-icon {
-	position: relative;
-	top: 3px;
-}
-
-.inside { 
-	display: none;
-}
-
-ul#gigs-menu li {
-	display:inline;
-	list-style-image:none;
-	list-style-position:outside;
-	list-style-type:none;
-	text-align:center;
-	white-space:nowrap;
-	padding-right: 1em;
-	cursor: pointer;
-}
-
-div#gigs-wrapper.wrap {
-	margin-top: 0px;
-}
-
-div.gigs-page {
-	display: none;
-}
-
-.drag {
-	cursor: move;
-}
-
-.icon {
-	position: relative;
-	top: 3px;
-}
-
-.clickable {
-	cursor: pointer;
-}
-
-.no-margin {
-	margin: 0px;
-}
-
-.done {
-	text-decoration: line-through;
-}
-
-input.price {
-	width: 50px;
-}
-
-form table, form td {
-	border: 0px;
-	border-collapse: collapse;
-	padding: 0px;
-}
-
-form .wide {
-	width: 300px;
-}
-
-form.new-item div, form.new-item td {
-	padding-bottom: 7px;
-}
-
-tr.panel {
-	display: none;
-}
-
-a img, td.actions a {
-	text-decoration: none;
-	border: 0px;
-}
-
-span.link {
-	text-decoration: underline;
-	color: #6699CC;
-	cursor: pointer;
-}
-
-div.instructions {
-	border: 1px solid #AAAAAA;
-	padding: 4px;
-	text-align: center;
-	font-size: .9em;
-}
-
-.alternate input, .alternate select, .alternate textarea {
-	background-color: #fff;
-}
-
-/**** Styles for Feedback page ****/
-	#feedback form {
-		padding-left: 2em;
-	}
-	
-	#feedback textarea {
-		width: 500px;
-		height: 300px;
-	}
-	
-	#feedback form div {
-		margin-bottom: 7px;
-	}
-
-/**** Styles for Gigs page ****/
-	table.performance {
-		border: 1px dotted #777777;
-		border-collapse: collapse;
-	}
-
-	table.performance td {
-		padding: 3px;
-	}
-	
-	table.performance td div {
-		position: relative;
-	}
-	
-	table.performance div.delete-performance {
-		position: absolute;
-		top: 0px;
-		right: 0px;
-	}
-	
-/**** Styles for Settings page ****/
-	ul#gigs-table, ul#gig-title, ul.sortable {
-		list-style-image:none;
-		list-style-position:outside;
-		list-style-type:none;
-		padding-left: 1em;
-	}
-	
-	form div {
-		line-height: 2em;
-	}
-
-	.sortable .handle {
-		cursor: move;
-	}
-	
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/gigs-calendar.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,917 +0,0 @@
-<?php
-/**
- * Plugin Name: Gigs Calendar
- * Plugin URI: http://blogsforbands.com
- * Description: A calendar to let musicians and other performing artists share their performance dates with their adoring public.
- * Author: Dan Coulter
- * Version: 0.4.7
- * Author URI: http://dancoulter.com
- */
-
-/** 
- * Copyright 2008  Dan Coulter (dan@blogsforbands.com)
- * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You can get a copy of this license here: http://www.gnu.org/licenses/
- * And a human readable copy here: http://creativecommons.org/licenses/GPL/2.0/
- */
-
-$include_folder = dirname(__FILE__);
-require_once $include_folder . '/version.php';
-require_once $include_folder . '/gigs-classes.php';
-$gcd = 'gigs-calendar'; // Domain for Internationalization
-
-if ( defined('ABSPATH') ) :
-	class dtc_gigs {
-		var $cache = array();
-	
-		function add_admin_page() {
-			global $gcd, $wp_version;
-			$options = get_option('gigs-calendar');
-			$admin_location = 'add_object_page';
-			if ( $wp_version < 2.7 ) $admin_location = 'add_management_page';
-			else $admin_location = 'add_object_page';
-			$admin_location(
-				__('Gigs Calendar', $gcd),
-				__('Gigs Calendar', $gcd),
-				(isset($options['user_level']) ? $options['user_level'] : 'level_7'), 
-				'gigs', 
-				array("dtc_gigs", "generate_admin_page")
-			);
-		}
-		
-		function admin_css() {
-			global $wp_version;
-			$options = get_option('gigs-calendar');
-			$folder = dtc_gigs::get_url();
-			?>
-				<link type="text/css" rel="stylesheet" href="<?php echo $folder; ?>js/jquery.tooltip.css" />
-				<link type="text/css" rel="stylesheet" href="<?php echo $folder; ?>js/ui.datepicker.css" />
-				<link type="text/css" rel="stylesheet" href="<?php echo $folder; ?>gigs-calendar-admin.css" />
-			<?php
-			if ( (float) $wp_version >= 2.5 ) {
-				?><link type="text/css" rel="stylesheet" href="<?php echo $folder; ?>gigs-calendar-admin-wp2.5.css" /><?php
-			}
-		}
-		
-		function display_css() {
-			$options = get_option('gigs-calendar');
-			$folder = dtc_gigs::get_url() . 'templates/';
-			
-			if ( is_file(dirname(__FILE__) . '/templates/' . $options['template'] . '/style.css') ) {
-				?>
-					<link type="text/css" rel="stylesheet" href="<?php echo $folder . $options['template']; ?>/style.css" />
-				<?php
-			} elseif ( is_file(ABSPATH . 'wp-content/gigs-templates/' . $options['template'] . '/style.css') ) {
-				?>
-					<link type="text/css" rel="stylesheet" href="<?php echo get_bloginfo('wpurl') . '/wp-content/gigs-templates/' . $options['template']; ?>/style.css" />
-				<?php
-			} else {
-				?>
-					<link type="text/css" rel="stylesheet" href="<?php echo $folder; ?>basic/style.css" />
-				<?php
-			}
-		}
-
-		function generate_admin_page() {
-			global $gcd;
-			$options = get_option('gigs-calendar');
-			if ( $options !== false && !current_user_can($options['user_level']) ) {
-				//exit; // Stupid non-fix.
-			}
-			get_currentuserinfo();
-			global $userdata;
-			
-			if ( isset($_GET['ladyhawke']) ) {
-				update_option("gig_db_version", $_GET['ladyhawke']);
-				dtc_gigs::upgrade();
-			}
-			
-			$folder = dtc_gigs::get_url();
-			$pages = array(
-				'gigs' => __('Gigs', $gcd),
-				'archive' => __('Archive', $gcd),
-				'venues' => __('Venues', $gcd),
-				'tours' => __('Tours', $gcd),
-				'settings' => __('Settings', $gcd),
-				'feedback' => __('Feedback/Bugs', $gcd),
-				'credits' => __('Credits', $gcd),
-			);
-			
-			foreach ( $pages as $key => $name ) {
-				$pages[$key] = array('name'=>$name, 'key'=>$key, 'url'=>$folder . $key . '.ajax.php');
-			}
-			
-			if ( $options['admin-only-settings'] && !current_user_can('administrator') ) {
-				unset($pages['settings']);
-			}
-			
-			$pages = apply_filters('gigCal_pages', $pages); 
-			?>
-				<script type="text/javascript">
-					var pages = {
-						<?php
-							$first = true;
-							foreach ( $pages as $page ) {
-								echo ( $first ? '' : ',' ) . $page['key'] . ' : {key:"' . $page['key'] . '", name:"' . $page['name'] . '", url:"' . $page['url'] . '"}';
-								$first = false;
-							}
-						?>
-					};
-					var ajaxTarget = "<?php echo $folder; ?>";
-					var nonce = "<?php echo wp_create_nonce('gigs-calendar'); ?>";
-					var pageTarget = "";
-				</script>
-				<div class="wrap">
-					<h2><?php _e('Gigs Calendar', $gcd) ?></h2>
-					<ul id="gigs-menu">
-						<?php if ( !$options || (empty($options['parent']) && $options['calendar-position'] != 'custom') ) : ?>
-							<li id="settings-tab"><?php _e('Settings', $gcd) ?></li>
-							<li id="feedback-tab"><?php _e('Feedback/Bugs', $gcd) ?></li>
-							<li id="credits-tab"><?php _e('Credits', $gcd) ?></li>
-						<?php else: ?>
-							<?php foreach ( $pages as $page ) : ?>
-								<li id="<?php echo $page['key']; ?>-tab"><?php echo $page['name']; ?></li>
-							<?php endforeach; ?>
-						<?php endif; ?>
-					</ul>
-					<div id="gigs-wrapper" class="wrap">
-						<div id="loading">
-							<?php _e('Loading...', $gcd) ?><br />
-							<img src="<?php echo $folder; ?>images/ajax-loader.gif" alt="" />
-						</div>
-						<?php foreach ( $pages as $page ) : ?>
-							<div id="<?php echo $page['key']; ?>" class="gigs-page"></div>
-						<?php endforeach; ?>
-					</div>
-				</div>
-				<script type="text/javascript">
-					jQuery(document).ready(function(){
-						gigs_page_load(jQuery("#gigs-menu li").eq(0).attr("id").split("-")[0]);
-					});
-					
-					jQuery("#gigs-menu li").click(function(){
-						gigs_page_load(this.id.split("-")[0]);
-					});
-					
-					gigs_page_load = function(page, query) {
-						if ( query == undefined ) query = "";
-						else query = "?" + query;
-						
-						try{pageDestroy();}catch(e){};
-						jQuery("#loading").show();
-						jQuery(".gigs-page:visible").hide();
-						jQuery("#gigs-menu li.selected").removeClass("selected");
-						jQuery("#" + page + "-tab").addClass("selected");
-						pageTarget = pages[page].url;
-						jQuery("#" + page).load(pageTarget + query, {
-							action:"load", 
-							"page":page,
-							"nonce":nonce
-						}, function(rsp1,rsp2,rsp3){
-							jQuery("#loading").hide();
-							jQuery(".gigs-page:visible").hide();
-							jQuery("#" + page).show();
-						});
-					}
-					
-					resetTableColors = function(table) {
-						rows = jQuery(table).find("tbody tr");
-						for ( i = 0; i < rows.length; i++ ) {
-							if ( Math.floor(i/2) % 2 ) {
-								rows.eq(i).removeClass("alternate");
-							} else {
-								rows.eq(i).addClass("alternate");
-							}
-						}
-					}
-					
-				</script>
-			<?php
-		}
-		
-		function get_url() {
-			return ( defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN ? str_replace("http://", "https://", get_bloginfo('wpurl')) : get_bloginfo('wpurl')) . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/';
-		}
-		
-		function get_path() {
-			return dirname(__FILE__);
-		}
-		
-		function display($in){
-			global $wpdb, $post, $include_folder, $gcd;
-			$options = get_option("gigs-calendar");
-			require_once 'gigs-classes.php';
-			$out = '';
-			$is_archive = false;
-			$tpath = dirname(__FILE__) . '/templates/'. $options['template'];
-			
-			$is_parent = !empty($options['parent']) && is_page($options['parent']);
-			$is_archive = !empty($options['archive']) && is_page($options['archive']);
-			
-			if ( ($is_parent || $is_archive) && $options['calendar-position'] != 'custom' ) {
-				ob_start();
-				if ( $is_parent ) {
-					if ( $options['tours-display'] ) {
-						$t = new tour();
-						$tours = $t->sortTours();
-						foreach ( $tours as $tour ) {
-							dtc_gigs::generateList(array(
-								'caption'=> $is_archive ? __('Upcoming shows', $gcd) : '',
-								'dateFormat' => 'short',
-								'tour' => $tour,
-							));
-						}
-						dtc_gigs::generateList(array(
-							'caption'=> '<div class="title">' . __('Other shows', $gcd) . '</div>',
-							'dateFormat' => 'short',
-							'tour' => -1,
-						));
-					} else {
-						dtc_gigs::generateList(array(
-							'caption'=> $is_archive ? __('Upcoming shows', $gcd) : '',
-							'dateFormat' => 'short',
-						));
-					}
-				}
-				if ( !empty($options['archive']) && is_page($options['archive']) ) {
-					if ( $options['tours-display'] ) {
-						$t = new tour();
-						$tours = $t->sortTours();
-						foreach ( $tours as $tour ) {
-							dtc_gigs::generateList(array(
-								'upcoming'=>false, 
-								'caption'=> $is_archive ? __('Upcoming shows', $gcd) : '',
-								'dateFormat' => 'short',
-								'tour' => $tour,
-							));
-						}
-						dtc_gigs::generateList(array(
-							'upcoming'=>false, 
-							'caption'=> '<div class="title">' . __('Other shows', $gcd) . '</div>',
-							'dateFormat' => 'short',
-							'tour' => -1,
-						));
-					} else {
-						dtc_gigs::generateList(array(
-							'upcoming'=>false, 
-							'caption'=> $is_parent ? __('Past show archive', $gcd) : '',
-							'dateFormat' => 'archive',
-						));
-					}
-				}
-				
-				dtcGigs::loadTemplate('rss');
-				dtcGigs::loadTemplate('attribution');
-				$out = ob_get_clean();
-				if ( $options['calendar-position'] == 'bottom' ) {
-					$out = '<div>' . $in . '</div>' . $out;
-				} else {
-					$out .= '<div>' . $in . '</div>';
-				}
-			} else {
-				$g = new gig();
-				if ( $g->getByPostID($post->ID) ) {
-					$data = array(
-						'g' => $g,
-						'v' => $g->getVenue(),
-						'p' => $g->getPerformances(),
-						'image_folder' => dtc_gigs::get_url() . 'images/',
-						'tags' => $g->getTags(),
-						'tags_slugs' => $g->getTags(true),
-						'custom' => $g->getCustom(),
-					);
-					ob_start();
-					dtcGigs::loadTemplate('gig-post', null, $data);
-					$out = ob_get_clean();
-								
-					$out = '<div>' . $in . '</div>' . $out;
-				} else {
-					$out = $in;
-				}
-			}
-			if ( preg_match_all('~\[gig-cal ?(.*?)\]~', $out, $matches) ) {
-				$matches[0] = array_unique($matches[0]);
-				foreach ( $matches[0] as $key => $match ) {
-					$args = array();
-					parse_str(str_replace(' ', '&', $matches[1][$key]), $args);
-					$args['upcoming'] = (strpos($matches[1][$key], 'archive') !== FALSE) ? false : true;
-					$args['return'] = true;
-					$out = str_replace($match, dtc_gigs::generateList($args), $out);
-				}
-			}
-			return $out;
-		}
-
-		function upgrade() {
-			global $wpdb;
-			
-			if ( isset($wpdb->charset) && !empty($wpdb->charset) ) {
-				$charset = ' DEFAULT CHARSET=' . $wpdb->charset;
-			} elseif ( defined(DB_CHARSET) && DB_CHARSET != '' ) {
-				$charset = ' DEFAULT CHARSET=' . DB_CHARSET;
-			} else {
-				$charset = '';
-			}
-			
-			$queries = array(
-				array( // 1
-					'
-						CREATE TABLE IF NOT EXISTS `' . TABLE_VENUES . '` (
-							`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-							`name` VARCHAR( 255 ) NOT NULL ,
-							`address` TEXT NOT NULL ,
-							`city` VARCHAR( 255 ) NOT NULL ,
-							`state` VARCHAR( 255 ) NOT NULL ,
-							`country` VARCHAR( 255 ) NOT NULL ,
-							`postalCode` VARCHAR( 255 ) NOT NULL ,
-							`contact` VARCHAR( 255 ) NOT NULL ,
-							`phone` VARCHAR( 255 ) NOT NULL ,
-							`email` VARCHAR( 255 ) NOT NULL ,
-							`link` VARCHAR( 255 ) NOT NULL ,
-							`notes` TEXT NOT NULL ,
-							`private` TINYINT NOT NULL ,
-							`apiID` INT UNSIGNED NOT NULL ,
-							`deleted` TINYINT NOT NULL
-						) ' . $charset . '
-					', '
-						CREATE TABLE IF NOT EXISTS `' . TABLE_GIGS . '` (
-							`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-							`venueID` INT UNSIGNED NOT NULL ,
-							`date` DATE NOT NULL ,
-							`notes` TEXT NOT NULL,
-							`postID` BIGINT UNSIGNED NOT NULL
-						) ' . $charset . '
-					', '
-						CREATE TABLE IF NOT EXISTS `' . TABLE_PERFORMANCES . '` (
-							`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-							`gigID` INT UNSIGNED NOT NULL ,
-							`time` TIME NULL ,
-							`link` VARCHAR( 255 ) NOT NULL ,
-							`shortNotes` VARCHAR( 255 ) NOT NULL ,
-							`ages` VARCHAR( 255 ) NOT NULL
-						) ' . $charset . '
-					'
-				), array( // 2
-					'ALTER TABLE `' . TABLE_VENUES . '` ADD `customMap` VARCHAR( 255 ) NOT NULL',
-					'ALTER TABLE `' . TABLE_GIGS . '` ADD `eventName` VARCHAR( 255 ) NOT NULL',
-				), array( // 3
-					'
-						CREATE TABLE `' . TABLE_TOURS . '` (
-							`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-							`name` VARCHAR( 255 ) NOT NULL ,
-							`notes` MEDIUMTEXT NOT NULL ,
-							`pos` INT UNSIGNED NOT NULL
-						)  ' . $charset . '
-					', '
-						ALTER TABLE `' . TABLE_GIGS . '` ADD `tour_id` INT UNSIGNED NULL
-					',
-				),
-				
-				
-				
-			);
-			for ( $i = (int) get_option('gig_db_version'); $i < (int) DTC_GIGS_DB_VERSION; $i++) {
-				if ( isset($queries[$i]) ) {
-					foreach ( $queries[$i] as $q ) {
-						$wpdb->query($q);
-					}
-				}
-			}
-			
-			if ( count($wpdb->get_results('show tables like "' . GIGS_DB_PREFIX . 'gigs_%"')) != 4 ) {
-				update_option("gig_db_version", -1);
-			} else {
-				update_option("gig_db_version", (int) DTC_GIGS_DB_VERSION);
-			}
-		}
-		
-		
-		function hide_posts($where) {
-			$o = get_option('gigs-calendar');
-			if ( 0 < (int) get_option('gig_db_version') && $o['post-filtering'] ) {
-				global $wp_the_query;
-				global $wp_query;
-				global $wp_actions;
-				global $wpdb;
-				if ( in_array('get_sidebar', $wp_actions) ) {
-					$where .= ' AND ID NOT IN (SELECT postID FROM ' . TABLE_GIGS . ')';
-				} elseif ( (is_single() || (function_exists('is_tag') && is_tag())) ) {
-					return $where;
-				} elseif ( (!is_category() || $wp_the_query->query_vars['cat'] != $o['category']) || defined('gigs-query-mod')) {
-					$where .= ' AND ID NOT IN (SELECT postID FROM ' . TABLE_GIGS . ')';
-				}
-			}
-			return $where;
-		}
-		
-		function hide_archives($where) {
-			$o = get_option('gigs-calendar');
-			if ( $o['post-filtering'] ) {
-				global $wpdb;
-				return $where . ' AND ID NOT IN (SELECT postID FROM ' . TABLE_GIGS . ')';
-			}
-		}
-		
-		
-		function post_nav($where) {
-			$o = get_option('gigs-calendar');
-			if ( 0 < (int) get_option('gig_db_version') && $o['post-filtering'] ) {
-				global $wp_the_query, $include_folder, $wpdb, $wp_version;
-				
-				include_once 'gigs-classes.php';
-				
-				$wtq = $wp_the_query;
-				$g = new gig();
-				
-				$table = ''; // This will let me support versions < 2.3
-				if ( (float) $wp_version >= 2.3 ) {
-					$table = 'p.';
-				}
-				
-				if ( $wtq->is_single && $wpdb->get_var('SELECT COUNT(*) FROM ' . TABLE_GIGS . ' WHERE postID = ' . $wtq->post->ID) ) { // Is a gig
-					$where .= ' AND ' . $table . 'ID IN (SELECT postID FROM ' . TABLE_GIGS . ')';
-				} else {
-					$where .= ' AND ' . $table . 'ID NOT IN (SELECT postID FROM ' . TABLE_GIGS . ')';
-				}			
-			}
-			return $where;
-		}
-		
-		function widget_upcoming($args) {
-			extract($args);
-			$o = get_option('gigs-calendar');
-			if ( !isset($o['widget']['upcoming']) ) $o['widget']['upcoming'] = array();
-			?>
-				<?php echo $before_widget; ?>
-				<?php echo $before_title . $o['widget']['upcoming']['title'] . $after_title; ?>
-					<?php 
-						dtc_gigs::generateList(array_merge(
-							array(
-								'upcoming'=>true, 
-								'limit'=>$o['widget']['upcoming']['length'],
-								'template'=>'upcoming-widget',
-							),
-							$o['widget']['upcoming']
-						)); 
-					?>
-				<?php echo $after_widget; ?>
-			<?php
-		}
-		
-		function widget_upcoming_control() {
-			global $gcd;
-			$o = get_option('gigs-calendar');
-			if ( !isset($o['widget']['upcoming']) ) {
-				$o['widget']['upcoming'] = array();
-				$o['widget']['upcoming']['title'] = __('Upcoming Gigs', $gcd);
-				$o['widget']['upcoming']['length'] = 5;
-				$o['widget']['upcoming']['dateFormat'] = 'M j';
-				$o['widget']['upcoming']['dateFormatYear'] = 'M j, Y';
-				$o['widget']['upcoming']['link'] = array();
-				$o['widget']['upcoming']['link'][] = 'city';
-				$o['widget']['upcoming']['link'][] = 'none';
-			}
-			
-			if ( isset($_POST['gigs_length']) ) {
-				$o['widget']['upcoming']['title'] = isset($_POST['gigs_title']) ? $_POST['gigs_title'] : $o['widget']['upcoming']['title'];
-				$o['widget']['upcoming']['length'] = !empty($_POST['gigs_length']) ? $_POST['gigs_length'] : 5;
-				$o['widget']['upcoming']['dateFormat'] = !empty($_POST['gigs_dateFormat']) ? $_POST['gigs_dateFormat'] : 'M j';
-				$o['widget']['upcoming']['dateFormatYear'] = !empty($_POST['gigs_dateFormatYear']) ? $_POST['gigs_dateFormatYear'] : 'M j, Y';
-				$o['widget']['upcoming']['link'] = array();
-				$o['widget']['upcoming']['link'][] = $_POST['gig-firstLinkField'];
-				$o['widget']['upcoming']['link'][] = $_POST['gig-secondLinkField'];
-				update_option('gigs-calendar', $o);
-			}
-			
-			$linkFields = array(
-				'city' => 'City',
-				'country' => 'Country',
-				'venue' => 'Venue',
-				'eventName' => 'Event Name',
-			);
-			
-			?>
-				<p>
-					<label>
-						<?php _e('Widget title:', $gcd) ?>
-						<input type="text" size="20" name="gigs_title" value="<?php echo $o['widget']['upcoming']['title']; ?>" />
-					</label>
-				</p>
-				<p>
-					<label>
-						<?php _e('Number of gigs to show on the sidebar:', $gcd) ?>
-						<input type="text" size="5" name="gigs_length" value="<?php echo $o['widget']['upcoming']['length']; ?>" />
-					</label>
-				</p>
-				<p>
-					<?php _e('Note: All date formats use the PHP <a href="http://php.net/date">date()</a> function syntax', $gcd) ?>
-				</p>
-				<p>
-					<label>
-						<?php _e('Date format for dates in the current year:', $gcd) ?>
-						<input type="text" size="5" name="gigs_dateFormat" value="<?php echo $o['widget']['upcoming']['dateFormat']; ?>" />
-					</label>
-				</p>
-				<p>
-					<label>
-						<?php _e('Date format for dates in a future year:', $gcd) ?>
-						<input type="text" size="5" name="gigs_dateFormatYear" value="<?php echo $o['widget']['upcoming']['dateFormatYear']; ?>" />
-					</label>
-				</p>
-				<p>
-					<label>
-						<?php _e('First piece of data in the link:', $gcd) ?>
-						<select name="gig-firstLinkField">
-							<?php foreach ( $linkFields as $key => $value ) : ?>
-								<option value="<?php echo $key ?>" <?php if ($key == $o['widget']['upcoming']['link'][0]) echo 'selected="selected"' ?>><?php echo $value ?></option>
-							<?php endforeach; ?>
-						</select>
-					</label>
-				</p>				
-				<p>
-					<label>
-						<?php _e('Second piece of data in the link:', $gcd) ?>
-						<select name="gig-secondLinkField">
-							<option value="none"><?php _e('None', $gcd) ?></option>
-							<?php foreach ( $linkFields as $key => $value ) : ?>
-								<option value="<?php echo $key ?>" <?php if ($key == $o['widget']['upcoming']['link'][1]) echo 'selected="selected"' ?>><?php echo $value ?></option>
-							<?php endforeach; ?>
-						</select>
-					</label>
-				</p>				
-			<?php
-		}
-		
-		function widget_next($args) {
-			extract($args);
-			$o = get_option('gigs-calendar');
-			if ( !isset($o['widget']['next']) ) $o['widget']['next'] = array('title'=>__('Next Gig', $gcd));
-			?>
-				<?php echo $before_widget; ?>
-				<?php echo $before_title . $o['widget']['next']['title'] . $after_title; ?>
-					<?php 
-						dtc_gigs::generateList(array(
-							'upcoming'=>true, 
-							'limit'=>1,
-							'template'=>'next-widget',
-						)); 
-					?>
-				<?php echo $after_widget; ?>
-			<?php
-		}
-		
-		function widget_next_control() {
-			global $gcd;
-			$o = get_option('gigs-calendar');
-			
-			$defaults = array(
-				'title' => __('Next Gig', $gcd),
-			);
-			
-			if ( !isset($o['widget']['next']) ) {
-				$o['widget']['next'] = array();
-			}
-			
-			$o['widget']['next'] = array_merge($defaults, $o['widget']['next']);
-			
-			if ( isset($_POST['gigs_next_title']) ) {
-				$o['widget']['next']['title'] = !empty($_POST['gigs_next_title']) ? $_POST['gigs_next_title'] : $defaults['title'];
-				print_r($o['widget']);
-				update_option('gigs-calendar', $o);
-			}
-			
-			?>
-				<p>
-					<label>
-						<?php _e('Widget title:', $gcd) ?>
-						<input type="text" size="20" name="gigs_next_title" value="<?php echo $o['widget']['next']['title']; ?>" />
-					</label>
-				</p>
-			<?php
-		}
-		
-		function init() {
-			global $gcd;
-			load_plugin_textdomain($gcd, 'wp-content/plugins/gigs-calendar/i18n');
-			if ( function_exists('register_sidebar_widget') ) {
-				register_sidebar_widget('Upcoming Gigs', array('dtc_gigs', 'widget_upcoming'));
-				register_widget_control('Upcoming Gigs', array('dtc_gigs', 'widget_upcoming_control'), 360, 273);
-				
-				register_sidebar_widget('Next Gig', array('dtc_gigs', 'widget_next'));
-				register_widget_control('Next Gig', array('dtc_gigs', 'widget_next_control'), 360, 273);
-			}
-		}
-		
-		function generateList($args = false) {
-			ob_start();
-			global $wpdb, $post, $include_folder, $gcd;
-			$options = get_option("gigs-calendar");
-			require_once 'gigs-classes.php';
-			$tpath = dirname(__FILE__) . '/templates/';
-			
-			$folder = dtc_gigs::get_url();
-			
-			$defaults = array(
-				'upcoming' => true,
-				'limit' => false, 
-				'tour' => false, 
-				'template' => 'gigs-list',
-				'dateFormat' => ($args['upcoming'] === false ? 'archive' : 'short'),
-				'force' => false,
-				'year' => null,
-				'month' => null,
-				'caption' => null,
-			);
-			
-			
-			$args = is_array($args) ? array_merge($defaults, $args) : $defaults;
-			extract($args);
-
-			$listFields = array(
-				'city' => __('City', $gcd),
-				'country' => __('Country', $gcd),
-				'venue' => __('Venue', $gcd),
-				'eventName' => __('Event', $gcd),
-				'date' => __('Date', $gcd),
-				'time' => __('Time', $gcd),
-				'shortNotes' => __('Notes', $gcd),
-				'tickets' => __('Tickets', $gcd),
-				'map' => __('Map', $gcd),
-			);
-			
-			$show_fields = $options['gigs-table-show'];
-			if ( !$upcoming && in_array( 'tickets', $show_fields ) ) {
-				unset( $show_fields[array_search('tickets', $show_fields)] );
-			}
-			
-			$gig_ids = array();
-			if ( is_null($year) && is_null($month) ) {
-				$gigs = $wpdb->get_results('
-					SELECT 
-						*,
-						g.notes as gigNotes,
-						v.notes as venueNotes,
-						g.id as gigID, 
-						v.link as venueLink
-					FROM 
-						`' . TABLE_GIGS . '` AS g
-					LEFT JOIN
-						`' . TABLE_VENUES . '` AS v ON ( g.venueID = v.id )
-					WHERE
-						`date` ' . ($upcoming ? '>=' : '<=') . ' CURDATE()
-						' . (($tour && $tour != -1) ? ' AND tour_id = ' . (int) $tour : '') . '
-						' . ($tour == -1 ? ' AND tour_id is null' : '') . '
-					ORDER BY 
-						`date` ' . ($upcoming ? 'ASC' : 'DESC') . '
-					' . ( !empty($limit) ? ' LIMIT ' . $limit : '' ) . '
-					
-				');
-			} else {
-				$gigs = $wpdb->get_results('
-					SELECT 
-						*,
-						g.notes as gigNotes,
-						v.notes as venueNotes,
-						g.id as gigID, 
-						v.link as venueLink
-					FROM 
-						`' . TABLE_GIGS . '` AS g
-					LEFT JOIN
-						`' . TABLE_VENUES . '` AS v ON ( g.venueID = v.id )
-					WHERE
-						1=1 
-						' . ( !is_null($year) ? 'AND YEAR(`date`) = ' . (int) $year : '' ) . '
-						' . ( !is_null($month) ? 'AND MONTH(`date`) = ' . (int) $month : '' ) . '
-						' . (($tour && $tour != -1) ? ' AND tour_id = ' . (int) $tour : '') . '
-						' . ($tour == -1 ? ' AND tour_id is null' : '') . '
-					ORDER BY 
-						`date` ' . ($upcoming ? 'ASC' : 'DESC') . '
-					' . ( !empty($limit) ? ' LIMIT ' . $limit : '' ) . '
-					
-				');
-			}
-			
-			if ( $tour !== false && $tour !== "false" ) {
-				if ( !count($gigs) && !$options['tours-empty'] && !$force ) {
-					return '';
-				}
-				if ( $t != -1 && empty($caption) ) {
-					$t = new tour($tour);
-					$caption = '<div class="name">' . $t->name . '</div><div class="notes">' . $t->notes . '</div>';
-				}
-			}
-
-			
-			$performances = $wpdb->get_results('
-				SELECT 
-					p.*
-				FROM 
-					`' . TABLE_GIGS . '` AS g
-				LEFT JOIN
-					`' . TABLE_PERFORMANCES . '` AS p ON ( g.id = p.gigID )
-				ORDER BY 
-					`time` ASC
-			');
-			
-			foreach ( $gigs as $key => $g ) {
-				if ( empty($g->venueID) ) {
-					$g->mapLink = false;
-				} else {
-					$g->mapLink = dtcGigs::mapLink($g);
-				}
-				$g->cityState = $g->city . ( empty($g->state) ? '' : ', ' . $g->state );
-				$g->cityStateCountry = $g->city . ( empty($g->state) ? '' : ', ' . $g->state ) . ( empty($g->country) ? '' : ', ' . $g->country );
-				$g->cityCountry = $g->city . ( empty($g->country) ? '' : ', ' . $g->country );
-				$g->permalink = get_permalink($g->postID);
-				$g->shortDate = dtcGigs::dateFormat($g->date, 'short');
-				$g->longDate = dtcGigs::dateFormat($g->date, 'long');
-				$g->archiveDate = dtcGigs::dateFormat($g->date, 'archive');
-				$g->mysqlDate = $g->date;
-				$g->date = dtcGigs::dateFormat($g->date, $dateFormat);
-				$g->id = $g->gigID;
-				$g->id = $g->gigID;
-				$g->performances = array();
-				$g->tags_slugs = array();
-				$g->tags = function_exists('wp_get_post_tags') ? wp_get_post_tags($g->postID) : array();
-				$gig_ids[$g->gigID] = $key;
-				foreach ( $g->tags as $tagkey => $tag ) {
-					$g->tags[$tagkey] = $tag->name;
-					$g->tags_slugs[$tagkey] = 'gc-' . $tag->slug;
-				}
-				$g->custom = get_post_custom($g->postID);
-				$gigs[$key] = $g;
-			}
-			
-			foreach ( $performances as $p ) {
-				$p->time_12h = dtcGigs::timeFormat($p->time, '12h');
-				$p->time_24h = dtcGigs::timeFormat($p->time, '24h');
-				$p->time = dtcGigs::timeFormat($p->time);
-
-				if ( isset($gigs[$gig_ids[$p->gigID]]) ) {
-					$gigs[$gig_ids[$p->gigID]]->performances[] = $p;
-				}
-			}
-				
-			if ( is_file(dirname(__FILE__) . '/templates/' . $options['template'] . '/' . $template . '.php') ) {
-				include(dirname(__FILE__) . '/templates/' . $options['template'] . '/' . $template . '.php');
-			} elseif ( is_file(ABSPATH . 'wp-content/gigs-templates/' . $options['template'] . '/' . $template . '.php') ) {
-				include(ABSPATH . 'wp-content/gigs-templates/' . $options['template'] . '/' . $template . '.php');
-			} else {
-				include(dirname(__FILE__) . '/templates/' . 'basic/' . $template . '.php');				
-			}
-			$result = ob_get_clean();
-			if ( $return ) return $result;
-			else echo $result;
-		}
-		
-		function upcomingList($args = array()) {
-			// This method has been depriciated.  Stop using it!
-			global $include_folder;
-			$o = get_option('gigs-calendar');
-			$defaults = array(
-				"length" => 5,
-				"dateFormat" => 'M j',
-				'dateFormatYear' => 'M j, Y',
-				'link' => array('city'),
-				'return' => false,
-			);
-			
-			
-			$args = array_merge($defaults, $args);
-			
-			include_once 'gigs-classes.php';
-			$g = new gig();
-			$g->search('`date` >= CURDATE()', '`date` ASC');
-
-			$count = 0;
-			if ( $g->_count ) : 
-
-				?>
-					<ul class="gigs">
-						<?php while ( $g->fetch() ) : 
-							$v = $g->getVenue(); 
-							$p = $g->getPerformances(); 
-							$link = array();
-							foreach ( $args['link'] as $f ) {
-								switch ( $f ) {
-									case 'city': 
-										$link[] = $v->getCity();
-										break;
-									case 'venue':
-										$link[] = $v->name;
-										break;
-									case 'eventName':
-										$link[] = $g->eventName;
-										break;
-								}
-							}
-							$link = array_unique($link);
-							foreach ( $link  as $key => $value ) {
-								if ( empty($value) ) unset($link[$key]);
-							}
-							?>
-							
-							<li class="<?php echo implode(' ', $g->getTags(true)); ?>"><?php echo date((date('Y') == date('Y', strtotime($g->date))) ? $args['dateFormat'] : $args['dateFormatYear'], strtotime($g->date . ' ' . $p->time)) ?>: <a href="<?php echo $g->getPermalink(); ?>">
-								<?php echo implode(' - ', $link) ?>
-							</a></li>
-						<?php if ( ++$count >= $args['length'] ) break; endwhile; ?>
-					</ul>
-				<?php
-			else :
-				?>
-					<div class="no-gigs"><?php echo $o['no-upcoming']; ?></div>
-				<?php
-			endif;
-		}
-		
-		function test($posts) {
-			global $wp_query;
-			
-			//print_r($wp_query);
-				
-			return $posts;
-		}
-		
-		function setup_future_hook() {
-			$o = get_option('gigs-calendar');
-			if ( $o['post-filtering'] ) {
-				remove_action('future_post', '_future_post_hook');
-				add_action('future_post', array('dtc_gigs', 'publish_future_post_now'));
-			}
-		}
-
-		function publish_future_post_now($id, $post = null) {
-			global $wpdb;
-			if ( $wpdb->get_var('SELECT COUNT(*) FROM ' . TABLE_GIGS . ' WHERE postID = ' . (int) $id ) ) {
-				wp_publish_post($id);
-			} else {
-				_future_post_hook($id, $post);
-			}
-		}
-	}
-	
-	
-
-	add_action('init', array('dtc_gigs', 'setup_future_hook'));
-	add_action('admin_menu', array('dtc_gigs', 'add_admin_page'));
-
-	//add_filter('the_posts', array('dtc_gigs', 'test'));
-
-	if ( 4.1 <= mysql_get_server_info() ) {
-		add_filter('posts_where', array('dtc_gigs', 'hide_posts'));
-		add_filter('get_next_post_where', array('dtc_gigs', 'post_nav'));
-		add_filter('get_previous_post_where', array('dtc_gigs', 'post_nav'));
-		add_filter('getarchives_where', array('dtc_gigs', 'hide_archives'));
-	} else {
-		
-	}
-	
-	add_filter('the_content', array('dtc_gigs', 'display'));
-	
-	add_action('plugins_loaded', array('dtc_gigs', 'init'));
-
-	
-	if ( $_GET['page'] == 'gigs' ) :
-		// If not WP > 2.6, we'll need to include some custom scripts.
-		$folder = dtc_gigs::get_url();
-		if ( (float) $wp_version < 2.6 ) {
-			wp_deregister_script('jquery');
-			wp_deregister_script('interface');
-			wp_deregister_script('jquery-form');
-			wp_enqueue_script('jquery', $folder . 'js/jquery.js', array(), '1.2.6');
-			wp_enqueue_script('jquery-form', $folder . 'js/jquery.form.js', array(), '2.02');
-			wp_enqueue_script('jquery-ui-core', $folder . 'js/ui.core.js', array(), '1.5');
-			wp_enqueue_script('jquery-ui-sortable', $folder . 'js/ui.sortable.js', array(), '1.5');
-		} else {
-			wp_enqueue_script('jquery');
-			wp_enqueue_script('jquery-form');
-			wp_enqueue_script('jquery-ui-core');
-			wp_enqueue_script('jquery-ui-sortable');
-		}
-		wp_enqueue_script('jquery-ui-datepicker', $folder . 'js/ui.datepicker.min.js', array(), '1.5');
-		wp_enqueue_script('jquery-tooltip', $folder . 'js/jquery.tooltip.min.js', array(), '1.2');
-
-		add_action('admin_head', array('dtc_gigs', 'admin_css'));
-		
-		if ( get_option('gig_db_version') != DTC_GIGS_DB_VERSION ) {
-			dtc_gigs::upgrade();
-		}
-
-	endif;
-	
-	add_action('wp_head', array('dtc_gigs', 'display_css'));	
-else:
-	require_once $include_folder . '/ajaxSetup.php';
-endif;
-
-?>
--- a/web/wp-content/plugins/gigs-calendar/gigs-calendar.pot	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,987 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: Gigs Calendar\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-07-08 16:10-0600\n"
-"PO-Revision-Date: 2008-07-08 16:10-0600\n"
-"Last-Translator: Dan Coulter <dan@dancoulter.com>\n"
-"Language-Team: Blogs for Bands <dan@blogsforbands.com>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Language: English\n"
-"X-Poedit-Country: UNITED STATES\n"
-"X-Poedit-SourceCharset: utf-8\n"
-"X-Poedit-KeywordsList: __;_e\n"
-"X-Poedit-Basepath: .\n"
-"X-Poedit-SearchPath-0: .\n"
-
-#: archive.ajax.php:16
-#: gigs.ajax.php:140
-#: tours.ajax.php:45
-#: venues.ajax.php:51
-msgid "ID"
-msgstr ""
-
-#: archive.ajax.php:17
-#: gigs-calendar.php:620
-#: gigs.ajax.php:142
-#: settings.ajax.php:16
-#: settings.ajax.php:27
-msgid "Venue"
-msgstr ""
-
-#: archive.ajax.php:18
-#: gigs-calendar.php:618
-#: gigs.ajax.php:143
-#: settings.ajax.php:14
-#: settings.ajax.php:26
-#: venues.ajax.php:53
-msgid "City"
-msgstr ""
-
-#: archive.ajax.php:19
-#: gigs-calendar.php:622
-#: gigs.ajax.php:144
-#: settings.ajax.php:18
-#: settings.ajax.php:30
-msgid "Date"
-msgstr ""
-
-#: archive.ajax.php:20
-#: gigs-calendar.php:623
-#: gigs.ajax.php:145
-#: settings.ajax.php:19
-msgid "Time"
-msgstr ""
-
-#: archive.ajax.php:21
-#: gigs.ajax.php:146
-#: tours.ajax.php:48
-#: venues.ajax.php:56
-msgid "Actions"
-msgstr ""
-
-#: archive.ajax.php:38
-#: gigs.ajax.php:164
-#: gigs.ajax.php:409
-msgid "View Gig"
-msgstr ""
-
-#: archive.ajax.php:39
-#: gigs.ajax.php:165
-#: gigs.ajax.php:410
-#: tours.ajax.php:65
-#: tours.ajax.php:219
-#: venues.ajax.php:69
-#: venues.ajax.php:199
-msgid "Edit"
-msgstr ""
-
-#: archive.ajax.php:41
-#: gigs-calendar.php:626
-#: gigs.ajax.php:167
-#: gigs.ajax.php:412
-#: tours.ajax.php:67
-#: tours.ajax.php:221
-#: venues.ajax.php:70
-#: venues.ajax.php:200
-#: templates/basic/gigs-list.php:28
-msgid "Map"
-msgstr ""
-
-#: archive.ajax.php:44
-#: gigs.ajax.php:170
-#: gigs.ajax.php:415
-msgid "Edit WordPress Post"
-msgstr ""
-
-#: archive.ajax.php:46
-#: gigs.ajax.php:172
-#: gigs.ajax.php:417
-#: settings.ajax.php:177
-#: tours.ajax.php:69
-#: tours.ajax.php:223
-#: venues.ajax.php:74
-#: venues.ajax.php:204
-msgid "Delete"
-msgstr ""
-
-#: archive.ajax.php:122
-#: gigs.ajax.php:278
-msgid "Are you sure you want to remove this performance?"
-msgstr ""
-
-#: archive.ajax.php:195
-#: gigs.ajax.php:22
-#: gigs.ajax.php:441
-msgid "Gig Information"
-msgstr ""
-
-#: archive.ajax.php:196
-#: gigs.ajax.php:23
-#: gigs.ajax.php:442
-msgid "A \"gig\" is unique to a date at a venue."
-msgstr ""
-
-#: archive.ajax.php:199
-#: gigs.ajax.php:26
-#: gigs.ajax.php:445
-msgid "Venue:"
-msgstr ""
-
-#: archive.ajax.php:205
-#: gigs.ajax.php:41
-#: gigs.ajax.php:451
-msgid "Date:"
-msgstr ""
-
-#: archive.ajax.php:209
-#: gigs.ajax.php:45
-#: gigs.ajax.php:455
-msgid "Event Name:"
-msgstr ""
-
-#: archive.ajax.php:213
-#: gigs.ajax.php:49
-#: gigs.ajax.php:459
-msgid "Tour:"
-msgstr ""
-
-#: archive.ajax.php:216
-#: gigs.ajax.php:52
-#: gigs.ajax.php:462
-#: settings.ajax.php:109
-#: settings.ajax.php:114
-msgid "--None--"
-msgstr ""
-
-#: archive.ajax.php:226
-#: gigs.ajax.php:62
-#: gigs.ajax.php:472
-msgid "Post Tags:"
-msgstr ""
-
-#: archive.ajax.php:231
-#: gigs.ajax.php:69
-#: gigs.ajax.php:478
-#: tours.ajax.php:28
-#: tours.ajax.php:252
-#: venues.ajax.php:36
-#: venues.ajax.php:243
-msgid "Description/Other notes:"
-msgstr ""
-
-#: archive.ajax.php:242
-#: gigs.ajax.php:80
-#: gigs.ajax.php:489
-msgid "Click to expand"
-msgstr ""
-
-#: archive.ajax.php:242
-#: gigs.ajax.php:80
-#: gigs.ajax.php:489
-msgid "Custom Fields"
-msgstr ""
-
-#: archive.ajax.php:242
-#: gigs.ajax.php:80
-#: gigs.ajax.php:489
-msgid "Expand"
-msgstr ""
-
-#: archive.ajax.php:242
-#: gigs.ajax.php:80
-#: gigs.ajax.php:489
-msgid "Collapse"
-msgstr ""
-
-#: archive.ajax.php:248
-#: gigs.ajax.php:86
-#: gigs.ajax.php:495
-msgid "Key"
-msgstr ""
-
-#: archive.ajax.php:249
-#: gigs.ajax.php:87
-#: gigs.ajax.php:496
-msgid "Value"
-msgstr ""
-
-#: archive.ajax.php:266
-#: archive.ajax.php:315
-#: gigs.ajax.php:97
-#: gigs.ajax.php:189
-#: gigs.ajax.php:513
-#: gigs.ajax.php:562
-msgid "Remove Custom Field"
-msgstr ""
-
-#: archive.ajax.php:279
-#: gigs.ajax.php:106
-#: gigs.ajax.php:526
-msgid "Add a new custom field"
-msgstr ""
-
-#: archive.ajax.php:282
-#: gigs.ajax.php:109
-#: gigs.ajax.php:529
-msgid "Custom fields can be used to add extra metadata to a gig that you can use in a special template."
-msgstr ""
-
-#: archive.ajax.php:289
-#: gigs.ajax.php:116
-#: gigs.ajax.php:536
-#: settings.ajax.php:171
-msgid "Performances"
-msgstr ""
-
-#: archive.ajax.php:290
-#: gigs.ajax.php:117
-#: gigs.ajax.php:537
-msgid "You can add as many performances as<br />you are giving at a venue on the given date."
-msgstr ""
-
-#: archive.ajax.php:298
-#: gigs.ajax.php:123
-#: gigs.ajax.php:545
-msgid "Add another performance"
-msgstr ""
-
-#: archive.ajax.php:304
-#: gigs.ajax.php:551
-msgid "Save Gig"
-msgstr ""
-
-#: archive.ajax.php:305
-#: feedback.ajax.php:46
-#: gigs.ajax.php:130
-#: gigs.ajax.php:552
-#: tours.ajax.php:35
-#: venues.ajax.php:41
-#: venues.ajax.php:248
-msgid "Cancel"
-msgstr ""
-
-#: archive.ajax.php:487
-#: gigs.ajax.php:745
-msgid "Performance Time:"
-msgstr ""
-
-#: archive.ajax.php:508
-#: gigs.ajax.php:766
-msgid "AM"
-msgstr ""
-
-#: archive.ajax.php:509
-#: gigs.ajax.php:767
-msgid "PM"
-msgstr ""
-
-#: archive.ajax.php:515
-#: gigs.ajax.php:774
-msgid "Remove Performance"
-msgstr ""
-
-#: archive.ajax.php:521
-#: gigs.ajax.php:780
-msgid "External Link (for tickets):"
-msgstr ""
-
-#: archive.ajax.php:527
-#: gigs.ajax.php:786
-msgid "Short Notes:"
-msgstr ""
-
-#: archive.ajax.php:533
-#: gigs.ajax.php:792
-msgid "Ages:"
-msgstr ""
-
-#: archive.ajax.php:540
-#: gigs.ajax.php:799
-msgid "Or..."
-msgstr ""
-
-#: credits.ajax.php:4
-msgid "The Gigs Calendar plugin for WordPress was developed by me, <a href=\"http://dancoulter.com\">Dan Coulter</a>. If you need some custom PHP development (for WordPress or not), I am available for hire (you can get in touch with me through this plugin).  To find other free plugins and useful tips for bands and musicians, visit my new site, <a href=\"http://blogsforbands.com\">Blogs for Bands</a>."
-msgstr ""
-
-#: credits.ajax.php:7
-msgid "You can help <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=dancoulter%40gmail%2ecom&item_name=Blogs%20for%20Bands&item_number=Gigs%20Calendar%20Plugin&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8\">support the development</a> of this free plugin through Paypal.  If you have specific features that you need, you can request them through the feedback form or hire me to develop them for you."
-msgstr ""
-
-#: credits.ajax.php:10
-msgid "The lovely <a href=\"http://www.famfamfam.com/lab/icons/silk/\" target=\"_blank\">Silk icons</a> were created by Mark James.  They are licensed under the <a href=\"http://creativecommons.org/licenses/by/2.5/\">Creative Commons</a>."
-msgstr ""
-
-#: feedback.ajax.php:9
-msgid "Want to tell me what a great/horrible job I did?"
-msgstr ""
-
-#: feedback.ajax.php:14
-msgid "Your name:"
-msgstr ""
-
-#: feedback.ajax.php:26
-msgid "Email Address:"
-msgstr ""
-
-#: feedback.ajax.php:28
-msgid "Type of feedback:"
-msgstr ""
-
-#: feedback.ajax.php:30
-msgid "Bug Report"
-msgstr ""
-
-#: feedback.ajax.php:31
-msgid "Feedback/Comments"
-msgstr ""
-
-#: feedback.ajax.php:32
-msgid "Feature Request"
-msgstr ""
-
-#: feedback.ajax.php:35
-msgid "If you're reporting a bug, please be as specific as possible.  Also, please use English if you can."
-msgstr ""
-
-#: feedback.ajax.php:36
-msgid "Additional information that might help (deselect anything you don't want to send, but I might ask you for it anyway)"
-msgstr ""
-
-#: feedback.ajax.php:38
-msgid "Blog URL"
-msgstr ""
-
-#: feedback.ajax.php:39
-msgid "WordPress Version"
-msgstr ""
-
-#: feedback.ajax.php:40
-msgid "PHP Version"
-msgstr ""
-
-#: feedback.ajax.php:41
-msgid "MySQL Info"
-msgstr ""
-
-#: feedback.ajax.php:42
-msgid "Broswer Info"
-msgstr ""
-
-#: feedback.ajax.php:44
-msgid "Include your plugin settings"
-msgstr ""
-
-#: feedback.ajax.php:45
-msgid "Send Feedback"
-msgstr ""
-
-#: feedback.ajax.php:60
-msgid "Thanks for your feedback!  I&rsquo;ll try to get back to you as soon as I can."
-msgstr ""
-
-#: gigs-calendar.php:39
-#: gigs-calendar.php:122
-msgid "Gigs Calendar"
-msgstr ""
-
-#: gigs-calendar.php:88
-msgid "Gigs"
-msgstr ""
-
-#: gigs-calendar.php:89
-msgid "Archive"
-msgstr ""
-
-#: gigs-calendar.php:90
-msgid "Venues"
-msgstr ""
-
-#: gigs-calendar.php:91
-msgid "Tours"
-msgstr ""
-
-#: gigs-calendar.php:92
-#: gigs-calendar.php:125
-msgid "Settings"
-msgstr ""
-
-#: gigs-calendar.php:93
-#: gigs-calendar.php:126
-msgid "Feedback/Bugs"
-msgstr ""
-
-#: gigs-calendar.php:94
-#: gigs-calendar.php:127
-#: settings.ajax.php:351
-msgid "Credits"
-msgstr ""
-
-#: gigs-calendar.php:136
-msgid "Loading..."
-msgstr ""
-
-#: gigs-calendar.php:208
-#: gigs-calendar.php:220
-#: gigs-calendar.php:232
-msgid "Upcoming shows"
-msgstr ""
-
-#: gigs-calendar.php:214
-#: gigs-calendar.php:239
-msgid "Other shows"
-msgstr ""
-
-#: gigs-calendar.php:246
-msgid "Past show archive"
-msgstr ""
-
-#: gigs-calendar.php:455
-msgid "Upcoming Gigs"
-msgstr ""
-
-#: gigs-calendar.php:485
-#: gigs-calendar.php:575
-msgid "Widget title:"
-msgstr ""
-
-#: gigs-calendar.php:491
-msgid "Number of gigs to show on the sidebar:"
-msgstr ""
-
-#: gigs-calendar.php:496
-msgid "Note: All date formats use the PHP <a href=\"http://php.net/date\">date()</a> function syntax"
-msgstr ""
-
-#: gigs-calendar.php:500
-msgid "Date format for dates in the current year:"
-msgstr ""
-
-#: gigs-calendar.php:506
-msgid "Date format for dates in a future year:"
-msgstr ""
-
-#: gigs-calendar.php:512
-msgid "First piece of data in the link:"
-msgstr ""
-
-#: gigs-calendar.php:522
-msgid "Second piece of data in the link:"
-msgstr ""
-
-#: gigs-calendar.php:524
-msgid "None"
-msgstr ""
-
-#: gigs-calendar.php:537
-#: gigs-calendar.php:557
-msgid "Next Gig"
-msgstr ""
-
-#: gigs-calendar.php:619
-#: settings.ajax.php:15
-#: settings.ajax.php:28
-msgid "Country"
-msgstr ""
-
-#: gigs-calendar.php:621
-msgid "Event"
-msgstr ""
-
-#: gigs-calendar.php:624
-#: tours.ajax.php:47
-msgid "Notes"
-msgstr ""
-
-#: gigs-calendar.php:625
-msgid "Tickets"
-msgstr ""
-
-#: gigs.ajax.php:15
-msgid "Add a new gig"
-msgstr ""
-
-#: gigs.ajax.php:30
-msgid "Select a venue"
-msgstr ""
-
-#: gigs.ajax.php:36
-msgid "No venues found.  You&rsquo;ll need to <span class=\"link\" id=\"add-venue\">add one</span>"
-msgstr ""
-
-#: gigs.ajax.php:45
-#: gigs.ajax.php:455
-msgid "Some artists perform under several names.  Ignore the event name field if you don&rsquo;t need to specify what this event is called or what band name you are playing under."
-msgstr ""
-
-#: gigs.ajax.php:129
-msgid "Add Gig"
-msgstr ""
-
-#: gigs.ajax.php:141
-#: settings.ajax.php:17
-#: settings.ajax.php:29
-msgid "Event Name"
-msgstr ""
-
-#: rss.php:25
-msgid "Upcoming Gigs feed"
-msgstr ""
-
-#: settings.ajax.php:20
-msgid "Short Notes"
-msgstr ""
-
-#: settings.ajax.php:21
-msgid "Ticket Link"
-msgstr ""
-
-#: settings.ajax.php:22
-msgid "Map Link"
-msgstr ""
-
-#: settings.ajax.php:36
-msgid "Sorry, there aren&rsquo;t any upcoming gigs right now.  Check back soon!"
-msgstr ""
-
-#: settings.ajax.php:37
-msgid "There aren&rsquo;t any gigs here right now.  Check back soon!"
-msgstr ""
-
-#: settings.ajax.php:43
-msgid "Who"
-msgstr ""
-
-#: settings.ajax.php:44
-msgid "All Ages"
-msgstr ""
-
-#: settings.ajax.php:44
-msgid "21+"
-msgstr ""
-
-#: settings.ajax.php:44
-msgid "16+"
-msgstr ""
-
-#: settings.ajax.php:50
-msgid "TBD"
-msgstr ""
-
-#: settings.ajax.php:74
-msgid "Oops! It looks like you&rsquo;re missing some or all of the tables required for this plugin.  They should have been created automatically, but you can create them with the tables.sql file in the same folder as this plugin.  If you have any questions, you can use the feedback form in the next tab."
-msgstr ""
-
-#: settings.ajax.php:78
-msgid "You need to select a page to list your calendar.  You may need to go create a <a href=\"page-new.php\">new page</a> first."
-msgstr ""
-
-#: settings.ajax.php:82
-msgid "<span style=\"font-weight: bold\">Warning:</span> You are running MySQL server version <?php echo mysql_get_server_info(); ?>.  This plugin requires version 4.1 or higher to hide the future gig posts from your homepage.  Your best option is to use a plugin like <a href=\"http://wordpress.org/extend/plugins/advanced-category-excluder/\">Advanced Category Excluder</a> to hide the gigs using the category option below."
-msgstr ""
-
-#: settings.ajax.php:88
-msgid "General Options"
-msgstr ""
-
-#: settings.ajax.php:90
-msgid "Select a location for the calendars on the page:"
-msgstr ""
-
-#: settings.ajax.php:92
-msgid "Top"
-msgstr ""
-
-#: settings.ajax.php:93
-msgid "Bottom"
-msgstr ""
-
-#: settings.ajax.php:94
-#: settings.ajax.php:346
-msgid "Custom"
-msgstr ""
-
-#: settings.ajax.php:99
-msgid "Display gigs as normal blog posts (turns off filtering):"
-msgstr ""
-
-#: settings.ajax.php:101
-#: settings.ajax.php:165
-#: settings.ajax.php:276
-#: settings.ajax.php:284
-#: settings.ajax.php:292
-#: settings.ajax.php:328
-#: settings.ajax.php:336
-#: settings.ajax.php:355
-#: settings.ajax.php:366
-msgid "Yes"
-msgstr ""
-
-#: settings.ajax.php:102
-#: settings.ajax.php:166
-#: settings.ajax.php:277
-#: settings.ajax.php:285
-#: settings.ajax.php:293
-#: settings.ajax.php:329
-#: settings.ajax.php:337
-#: settings.ajax.php:356
-#: settings.ajax.php:367
-#: settings.ajax.php:378
-msgid "No"
-msgstr ""
-
-#: settings.ajax.php:106
-msgid "Note: If you select the custom location option, you don&rsquo;t have to select a page, but you won&rsquo;t get a link back to the calendar"
-msgstr ""
-
-#: settings.ajax.php:108
-msgid "Select a page to house your calendar:"
-msgstr ""
-
-#: settings.ajax.php:113
-msgid "Select a page to house your gigs archive:"
-msgstr ""
-
-#: settings.ajax.php:118
-msgid "Select a category that gigs should be created under:"
-msgstr ""
-
-#: settings.ajax.php:131
-msgid "Display this message if there are no upcoming gigs:"
-msgstr ""
-
-#: settings.ajax.php:136
-msgid "Display this message if there are no past gigs:"
-msgstr ""
-
-#: settings.ajax.php:140
-msgid "Administration Options"
-msgstr ""
-
-#: settings.ajax.php:143
-msgid "Minimum permission level to administer the calendar: "
-msgstr ""
-
-#: settings.ajax.php:147
-msgid "Subscriber"
-msgstr ""
-
-#: settings.ajax.php:148
-msgid "Contributor"
-msgstr ""
-
-#: settings.ajax.php:149
-msgid "Author"
-msgstr ""
-
-#: settings.ajax.php:150
-msgid "Editor"
-msgstr ""
-
-#: settings.ajax.php:151
-msgid "Administrator"
-msgstr ""
-
-#: settings.ajax.php:163
-msgid "Only allow blog administrators to change calendar settings:"
-msgstr ""
-
-#: settings.ajax.php:172
-msgid "Options you want in the \"ages\" dropdown."
-msgstr ""
-
-#: settings.ajax.php:182
-msgid "Add"
-msgstr ""
-
-#: settings.ajax.php:184
-msgid "Display Options"
-msgstr ""
-
-#: settings.ajax.php:186
-msgid "Display template: "
-msgstr ""
-
-#: settings.ajax.php:215
-msgid "Short date format:"
-msgstr ""
-
-#: settings.ajax.php:217
-#: settings.ajax.php:221
-#: settings.ajax.php:226
-msgid "(uses PHP&rsquo;s <a href=\"http://php.net/date\">date()</a> function format)"
-msgstr ""
-
-#: settings.ajax.php:219
-msgid "Archives date format:"
-msgstr ""
-
-#: settings.ajax.php:224
-msgid "Long date format:"
-msgstr ""
-
-#: settings.ajax.php:229
-msgid "Time format:"
-msgstr ""
-
-#: settings.ajax.php:231
-msgid "12 Hour"
-msgstr ""
-
-#: settings.ajax.php:232
-msgid "24 Hour"
-msgstr ""
-
-#: settings.ajax.php:237
-msgid "Text to display when the time is \"To be determined\":"
-msgstr ""
-
-#: settings.ajax.php:242
-msgid "Gigs page table"
-msgstr ""
-
-#: settings.ajax.php:243
-msgid "You can sort the fields by clicking on the names and dragging."
-msgstr ""
-
-#: settings.ajax.php:263
-msgid "Field to use for the link to the gig:"
-msgstr ""
-
-#: settings.ajax.php:274
-msgid "Link to the venue&rsquo;s website from the gig list?"
-msgstr ""
-
-#: settings.ajax.php:282
-msgid "Display column headers?"
-msgstr ""
-
-#: settings.ajax.php:290
-msgid "Link to Gigs RSS feed?"
-msgstr ""
-
-#: settings.ajax.php:297
-msgid "Single Gig Page"
-msgstr ""
-
-#: settings.ajax.php:299
-msgid "Select and drag the fields for the gig post title."
-msgstr ""
-
-#: settings.ajax.php:320
-msgid "Label next to the event name:"
-msgstr ""
-
-#: settings.ajax.php:324
-msgid "Tours Options"
-msgstr ""
-
-#: settings.ajax.php:326
-msgid "Do you want to split gigs by tour on your calendar page?"
-msgstr ""
-
-#: settings.ajax.php:334
-msgid "Do you want to display empty tours?"
-msgstr ""
-
-#: settings.ajax.php:342
-msgid "How should the tours be ordered?"
-msgstr ""
-
-#: settings.ajax.php:344
-msgid "Date of the earliest gig"
-msgstr ""
-
-#: settings.ajax.php:345
-msgid "Alphabetical"
-msgstr ""
-
-#: settings.ajax.php:353
-msgid "Do you want to link back to me for building this plugin?"
-msgstr ""
-
-#: settings.ajax.php:360
-msgid "<b>Note</b>: It&rsquo;s ok to say \"no\".  I&rsquo;ve offered this freely with no expectations, but I&rsquo;d be very grateful if you said \"yes\""
-msgstr ""
-
-#: settings.ajax.php:364
-msgid "Do you want to link back to <a target=\"_blank\" href=\"http://www.famfamfam.com/lab/icons/silk/\">Mark James</a> for the Silk icons?"
-msgstr ""
-
-#: settings.ajax.php:371
-msgid "<b>Note</b>: The Silk Icons that I used in this plugin are licensed under the <a target=\"_blank\" href=\"http://creativecommons.org/licenses/by/2.5/\">Creative Commons</a>. You must link back to him somewhere on your site.  If you link to him on another page, giving him credit, or you have replaced the icons, or you do not display any of them publicly on your site, you may turn off this link."
-msgstr ""
-
-#: settings.ajax.php:375
-msgid "Save Options"
-msgstr ""
-
-#: settings.ajax.php:376
-msgid "If you made changes that would affect posts, do you want changes applied to existing gigs (possibly breaking existing links)?"
-msgstr ""
-
-#: settings.ajax.php:379
-msgid "Yes, future gigs only"
-msgstr ""
-
-#: settings.ajax.php:380
-msgid "Yes, all gigs, please"
-msgstr ""
-
-#: tours.ajax.php:12
-msgid "Add a new tour"
-msgstr ""
-
-#: tours.ajax.php:20
-#: tours.ajax.php:245
-msgid "Tour Information"
-msgstr ""
-
-#: tours.ajax.php:24
-#: tours.ajax.php:248
-msgid "Tour Name:"
-msgstr ""
-
-#: tours.ajax.php:34
-msgid "Add tour"
-msgstr ""
-
-#: tours.ajax.php:46
-#: venues.ajax.php:52
-msgid "Name"
-msgstr ""
-
-#: venues.ajax.php:13
-msgid "Add a new venue"
-msgstr ""
-
-#: venues.ajax.php:19
-#: venues.ajax.php:226
-msgid "Name:"
-msgstr ""
-
-#: venues.ajax.php:20
-#: venues.ajax.php:227
-msgid "Address:"
-msgstr ""
-
-#: venues.ajax.php:21
-#: venues.ajax.php:228
-msgid "City:"
-msgstr ""
-
-#: venues.ajax.php:22
-#: venues.ajax.php:229
-msgid "State/Province:"
-msgstr ""
-
-#: venues.ajax.php:23
-#: venues.ajax.php:230
-msgid "Country:"
-msgstr ""
-
-#: venues.ajax.php:24
-#: venues.ajax.php:231
-msgid "Postal Code:"
-msgstr ""
-
-#: venues.ajax.php:25
-#: venues.ajax.php:232
-msgid "Custom location for Google Maps <abbr title=\"Will override the automatic address unless you leave it blank.\">(?)</abbr>"
-msgstr ""
-
-#: venues.ajax.php:26
-#: venues.ajax.php:233
-msgid "Primary Contact:"
-msgstr ""
-
-#: venues.ajax.php:27
-#: venues.ajax.php:234
-msgid "Phone:"
-msgstr ""
-
-#: venues.ajax.php:28
-#: venues.ajax.php:235
-msgid "Email:"
-msgstr ""
-
-#: venues.ajax.php:29
-#: venues.ajax.php:236
-msgid "Homepage:"
-msgstr ""
-
-#: venues.ajax.php:33
-#: venues.ajax.php:240
-msgid "Hide information about this venue from the public:"
-msgstr ""
-
-#: venues.ajax.php:40
-msgid "Add Venue"
-msgstr ""
-
-#: venues.ajax.php:54
-msgid "Phone"
-msgstr ""
-
-#: venues.ajax.php:55
-msgid "Email"
-msgstr ""
-
-#: venues.ajax.php:72
-#: venues.ajax.php:202
-msgid "Homepage"
-msgstr ""
-
-#: venues.ajax.php:247
-msgid "Save Changes"
-msgstr ""
-
-#: templates/basic/attribution.php:4
-msgid "Powered by <a target=\"_blank\" href=\"http://blogsforbands.com\">Blogs for Bands</a>"
-msgstr ""
-
-#: templates/basic/attribution.php:7
-msgid "Silk icons by <a target=\"_blank\" href=\"http://www.famfamfam.com/lab/icons/silk/\">Mark James</a>"
-msgstr ""
-
-#: templates/basic/gig-post.php:11
-msgid "When"
-msgstr ""
-
-#: templates/basic/gig-post.php:24
-#: templates/basic/gigs-list.php:27
-#: templates/basic/gigs-list.php:39
-msgid "Buy Tickets"
-msgstr ""
-
-#: templates/basic/gig-post.php:31
-msgid "Where"
-msgstr ""
-
-#: templates/basic/gig-post.php:34
-msgid "Private Venue"
-msgstr ""
-
-#: templates/basic/gig-post.php:42
-msgid "map"
-msgstr ""
-
-#: templates/basic/gig-post.php:52
-msgid "Other Info"
-msgstr ""
-
-#: templates/basic/gig-post.php:57
-msgid "Back to the calendar"
-msgstr ""
-
-#: templates/basic/next-widget.php:11
-msgid "More Info..."
-msgstr ""
-
-#: templates/basic/rss.php:2
-msgid "Subscribe to RSS calendar feed"
-msgstr ""
-
--- a/web/wp-content/plugins/gigs-calendar/gigs-classes.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,794 +0,0 @@
-<?php
-global $wpdb;
-define('GIGS_DB_PREFIX', apply_filters('gigCal_db_prefix', $wpdb->prefix));
-define('TABLE_VENUES', GIGS_DB_PREFIX . 'gigs_venue');
-define('TABLE_GIGS', GIGS_DB_PREFIX . 'gigs_gig');
-define('TABLE_PERFORMANCES', GIGS_DB_PREFIX . 'gigs_performance');
-define('TABLE_TOURS', GIGS_DB_PREFIX . 'gigs_tour');
-
-class dtcGigs {
-	
-	function generateSlug($x) {
-		$x = strtolower($x);
-		$x = str_replace(' ', '-', $x);
-		$x = preg_replace('#[^a-z\-0-9]#', '', $x);
-		return $x;
-	}
-		
-	function escapeForInput($x) {
-		if ( '0000-00-00' == $x ) {
-			$x = '';
-		}
-		echo htmlspecialchars($x);
-	}
-	
-	function dateFormat($date, $type = 'short') {
-		if ( is_null($date) || $date == '0000-00-00' ) return null;
-		$options = get_option('gigs-calendar');
-		if ( isset($options['date'][$type]) ) {
-			return mysql2date($options['date'][$type], $date);
-		} else {
-			return mysql2date($type, $date);
-		}
-	}
-	
-	function selectFields($fields, $g) {
-		$options = get_option('gigs-calendar');
-		
-		$result = '';
-		foreach ( $options['gigs-table-show'] as $f ) {
-			if ( isset($fields[$f]) ) {
-				$tmp = $fields[$f];
-				if ( $f == 'venue' && $options['list-venue-link'] && !empty($g->venueLink) ) {
-					$tmp = preg_replace("~\{(.*?)\}~", '<a href="' . $g->venueLink . '">\1</a>', $tmp);
-				} elseif ( $f == $options['gig-link-field'] ) {
-					$tmp = preg_replace("~\{(.*?)\}~", '<a href="' . $g->permalink . '">\1</a>', $tmp);
-				} else {
-					$tmp = preg_replace("~\{(.*?)\}~", '\1', $tmp);
-				}
-					
-				$result .= $tmp;
-			}
-		}
-		
-		return $result;
-	}
-	
-	function timeFormat($time, $format = false) {
-		$options = get_option('gigs-calendar');
-		if ( is_null($time) ) {
-			return $options['tbd-text'];
-		}
-		if ( $options['time-12h'] || $format === "12h" ) {
-			return mysql2date("g:ia", '2008-01-01 ' . $time);
-		} else {
-			return mysql2date("H:i", '2000-01-01 ' . $time);
-		}
-	}
-
-	function mapLink($gig) {
-		global $options;
-		if ( empty($gig->customMap) ) {
-			$a = array();
-			
-			if ( empty($gig->address) ) 
-				$a[] = $gig->name . ' near:';
-			else {}
-				$a[] = str_replace("\n", ", ", $gig->address);
-			if ( !empty($gig->city) ) $a[] = $gig->city;
-			if ( !empty($gig->state) ) $a[] = $gig->state;
-			if ( !empty($gig->country) ) $a[] = $gig->country;
-			if ( !empty($gig->postalCode) ) $a[] = $gig->postalCode;
-			return 'http://maps.google.com/?q=' . urlencode(str_replace('near:,', 'near:', implode(', ', $a)));
-		} else {
-			if ( preg_match("/^https?:\/\//", $gig->customMap) ) {
-				return $gig->customMap;
-			} else {
-				return 'http://maps.google.com/?q=' . urlencode($gig->customMap);
-			}
-		}
-	}
-	
-	function getAttribution() {
-		$options = get_option('gigs-calendar');
-		?>
-			<div class="attribution">
-				<?php if ( $options['b4b-link'] ) : ?>
-					<span class="b4b">Powered by <a target="_blank" href="http://blogsforbands.com">Blogs for Bands</a></span>
-				<?php endif; ?>
-				<?php if ( $options['silk-link'] ) : ?>
-					<span class="silk">Silk icons by <a target="_blank" href="http://www.famfamfam.com/lab/icons/silk/">Mark James</a></span>
-				<?php endif; ?>
-			</div>
-		<?php
-	}
-	
-	function loadTemplate($file, $template = null, $data = array()) {
-		$options = get_option('gigs-calendar');
-		global $gcd;
-		if ( is_null($template) ) {
-			$template = $options['template'];
-		}
-		
-		$folder = dtc_gigs::get_url();
-		
-		extract($data);
-		if ( is_file(dirname(__FILE__) . '/templates/' . $template . '/' . $file . '.php') ) {
-			include(dirname(__FILE__) . '/templates/' . $template . '/' . $file . '.php');
-		} elseif ( is_file(ABSPATH . 'wp-content/gigs-templates/' . $template . '/' . $file . '.php') ) {
-			include(ABSPATH . 'wp-content/gigs-templates/' . $template . '/' . $file . '.php');
-		} else {
-			include(dirname(__FILE__) . '/templates/basic/' . $file . '.php');				
-		}
-	}
-	
-	function extraFields($fields, &$data, $gig = "new") {
-		foreach ( $fields as $key => $field ) {
-			if ( isset($data[$field['name']]) ) {
-				$value = array_pop($data[$field['name']]);
-				if ( empty($data[$field['name']]) ) unset($data[$field['name']]);
-			} else {
-				$value = $field['default'];
-			}
-			?>
-				<tr class="<?php echo addslashes($field['name']) ?>">
-					<td valign="top" class="<?php echo addslashes($field['name']) ?>">
-						<input type="hidden" value="<?php echo addslashes($field['name']) ?>" name="custom-key[<?php echo $key ?>]" />
-						<label for="custom-<?php echo $gig ?>-<?php echo $key ?>"><?php echo $field['label'] ?></label>
-						<textarea style="display:none;" rows="1" name="old-custom-value[<?php echo $key ?>]"><?php echo htmlspecialchars((is_array($value) ? serialize($value) : $value)) ?></textarea>
-						<input class="delete" type="hidden" name="deletecustom[<?php echo $key ?>]" value="0" />
-					</td>
-					<td>
-						<?php if ( $field['type'] == 'text' ) : ?>
-							<input name="custom-value[<?php echo $key ?>]" type="text" id="custom-<?php echo $gig ?>-<?php echo $key ?>" value="<?php echo addslashes($value); ?>" />
-						<?php elseif ( $field['type'] == 'date' ) : ?>
-							<input class="date-field" name="custom-value[<?php echo $key ?>]" type="text" id="custom-<?php echo $gig ?>-<?php echo $key ?>" value="<?php echo addslashes($value); ?>" />
-						<?php elseif ( $field['type'] == 'textarea' ) : ?>
-							<textarea rows="1" id="custom-<?php echo $gig ?>-<?php echo $key ?>" name="custom-value[<?php echo $key ?>]"><?php echo htmlspecialchars($value) ?></textarea>
-						<?php elseif ( $field['type'] == 'select' ) : ?>
-							<select id="custom-<?php echo $gig ?>-<?php echo $key ?>" name="custom-value[<?php echo $key ?>]">
-								<?php foreach ( $field['options'] as $oKey => $oValue ) : ?>
-									<option value="<?php echo addslashes($oKey) ?>"<?php if ( $oKey == $value ) echo ' selected="selected"' ?>><?php echo $oValue ?></option>
-								<?php endforeach; ?>
-							</select>
-						<?php elseif ( $field['type'] == 'radio' ) : ?>
-							<?php foreach ( $field['options'] as $oKey => $oValue ) : ?>
-								<input type="radio" id="custom-<?php echo $gig ?>-<?php echo $key ?>-<?php echo addslashes($oKey) ?>" name="custom-value[<?php echo $key ?>]" value="<?php echo addslashes($oKey) ?>" <?php if ( $value == $oKey ) echo 'checked="checked"' ?> /> 
-								<label for="custom-<?php echo $gig ?>-<?php echo $key ?>-<?php echo addslashes($oKey) ?>">
-									<?php echo $oValue ?>
-								</label>
-								<br />
-							<?php endforeach; ?>
-						<?php elseif ( $field['type'] == 'checkbox' ) : ?>
-							<?php $values = is_array($value) ? $value : unserialize($value); ?>
-							<?php foreach ( $field['options'] as $oKey => $oValue ) : ?>
-								<input type="checkbox" id="custom-<?php echo $gig ?>-<?php echo $key ?>-<?php echo addslashes($oKey) ?>" name="custom-value[<?php echo $key ?>][]" value="<?php echo addslashes($oKey) ?>" <?php if ( in_array($oKey, $values) ) echo 'checked="checked"' ?> /> 
-								<label for="custom-<?php echo $gig ?>-<?php echo $key ?>-<?php echo addslashes($oKey) ?>">
-									<?php echo $oValue ?>
-								</label>
-								<input type="hidden" name="custom-value[<?php echo $key ?>][]" value="" /> 
-								<br />
-							<?php endforeach; ?>
-						<?php endif; ?>
-					</td>
-				</tr>
-			<?php
-		}
-
-	}
-	
-	function get_gig_css_classes($gig) {
-		if ( is_object($gig) && isset($gig->id) ) {
-			$gig = $gig->id;
-		} elseif ( is_array($gig) && isset($gig['id']) ) {
-			$gig = $gig['id'];
-		}
-		
-		$g = new gig();
-		if ( !$g->get($gig) ) {
-			return false;
-		}
-		
-		$classes = array(
-			'gig',
-			mysql2date('\yY', $g->date),
-			mysql2date('\mm', $g->date),
-			( $g->date >= date('Y-m-d') ? 'upcoming' : 'archive' ),
-		);
-		
-		$classes = array_merge($classes, $g->getTags(true, 'gc-'));
-		
-		return implode(' ', apply_filters('gigCal_gigs_css_classes', $classes, $g));
-	}
-}
-
-class dtc_gigs_baseAR {
-	var $wpdb, $_rows, $_row, $_new = true, $_table, $_count;
-	
-	function dtc_gigs_baseAR($id = null){
-		global $wpdb;
-		$this->wpdb = $wpdb;
-		if ( $id !== null ) {
-			$this->get($id);
-		}
-	}
-	
-	function fetch() {
-		if ( count($this->_rows) ) {
-			$this->_row = each($this->_rows);
-			if ( $this->_row ) {
-				$this->load();
-				return true;
-			} else {
-				return false;
-			}
-		} else {
-			return false;
-		}
-	}
-
-	function generate_slug() {
-		if ( isset($this->slug) ) {
-			$first = true;
-			$name = $this->_name;
-			do {
-				if ( $first ) {
-					$this->slug = dtcGigs::generateSlug($this->$name);
-					$first = false;
-				} else {
-					ereg('[0-9]*$', $this->slug, $match);
-					$match = ((int) $match[0]) + 1;
-					if ( 1 == $match ) $match++;
-					$this->slug = preg_replace('/[0-9]*$/', '', $this->slug);
-					$this->slug .= $match;
-				}
-				
-			} while ( $this->wpdb->get_var('SELECT COUNT(*) FROM `' . $this->_table . '` WHERE slug = "' . $this->slug . '"') );
-		}
-	}
-
-	
-	function get($id) {
-		$this->search('`id` = ' . (int) $id);
-		return $this->fetch();
-	}
-	
-	function getRow() {
-		$row = array();
-		foreach ( $this->_fields as $f ) {
-			$row[$f]  = $this->$f;
-		}
-		return $row;
-	}
-	
-	function getTags($slugs = false, $prefix = '') {
-		if ( function_exists('wp_get_post_tags') ) {
-			$tags = wp_get_post_tags($this->postID);
-			foreach ( $tags as $key => $tag ) {
-				$tags[$key] = $prefix . ($slugs ? $tag->slug : $tag->name);
-			}
-			return $tags;
-		} else {
-			return array();
-		}
-	}
-	
-	function getCustom() {
-		if ( !empty($this->postID) ) {
-			return get_post_custom($this->postID);
-		}
-	}
-	
-	function setTags($tags) {
-		if ( function_exists('wp_set_post_tags') )
-			wp_set_post_tags($this->postID, $tags, false);
-	}
-	
-
-
-
-	
-	function load() {
-		foreach ( $this->_fields as $f ) {
-			if ( is_null($this->_row['value']->$f) ) {
-				$this->$f = null;
-			} else {
-				$this->$f = stripslashes($this->_row['value']->$f);
-			}
-		}
-	}
-	
-	function search($where = null, $order = null) {
-		$this->_new = false;
-		$this->_rows = $this->wpdb->get_results('SELECT * FROM `' . $this->_table . '` ' . ($where !== null ? 'WHERE ' . $where : '') . ($order !== null ? ' ORDER BY ' . $order : ''));
-		$this->_count = count($this->_rows);
-		return count($this->_rows);
-	}
-	
-	function save($get_after = true) {
-		$first = true;
-		$name = $this->_name;
-		$this->generate_slug();
-		if ( $this->_new ) {
-			$fields = $this->_fields;
-			$values = array();
-			unset($fields[0]);
-			
-			$this->pre_insert();
-
-			foreach ( $fields as $f ) {
-				if ( is_null($this->$f) ) {
-					$values[$f] = 'null';
-				} else {
-					$values[$f] = '"' . $this->wpdb->escape(stripslashes($this->$f)) . '"';
-				}
-			}
-			
-			if ( !$this->wpdb->query('INSERT INTO `' . $this->_table . '` (`' . implode('`, `', $fields) . '`) VALUES (' . implode(', ', $values) . ')') ) {
-				return false;
-			}
-			$this->id = $this->wpdb->insert_id;
-
-			$this->post_insert();
-			if ( $get_after ) 
-				$this->get((int) $this->id);
-
-			return true;
-		} else {
-			$fields = $this->_fields;
-			$values = array();
-			unset($fields[0]);
-			
-			$this->pre_update();
-			
-			foreach ( $fields as $f ) {
-				if ( is_null($this->$f) ) {
-					$values[$f] = '`' . $f . '` = null';
-				} else {
-					$values[$f] = '`' . $f . '` = "' . $this->wpdb->escape(stripslashes($this->$f)) . '"';
-				}
-			}
-			
-			$result = (bool) $this->wpdb->query('UPDATE `' . $this->_table . '` SET ' . implode(', ', $values) . ' WHERE `id` = ' . (int) $this->id);
-			
-			if ( $result ) $this->post_update();
-			
-			if ( $get_after ) 
-				$this->get((int) $this->id);
-			
-			return $result;
-		}
-	}
-	
-	function pre_insert(){}
-	function post_insert(){}
-	function pre_update(){}
-	function post_update(){}
-	function extraJSON() {return array();}
-	
-	function delete() {
-		if ( !empty($this->id) ) {
-			return (bool) $this->wpdb->query('DELETE FROM `' . $this->_table . '` WHERE `id` = ' . (int) $this->id);
-		}
-	}
-	
-	function toJSON($single = true) {
-		if ( $single ) {
-			$fields = array();
-			if ( function_exists("json_encode") ) {
-				foreach ( $this->_fields as $f ) {
-					$fields[$f] = $this->$f;
-				}
-				
-				$extra = $this->extraJSON();
-				$fields = array_merge($fields, $extra);
-				return json_encode($fields);
-			} else {
-				foreach ( $this->_fields as $f ) {
-					$fields[] = '"' . $f . '":"' . str_replace("\n", '\n', addslashes($this->$f)) . '"';
-				}
-			
-				$extra = $this->extraJSON();
-				$fields = array_merge($fields, $extra);
-
-				return '{' . implode(', ', $fields) . '}';
-			}
-		}
-	}
-	
-	function getError() {
-		return $this->wpdb->last_error;
-	}
-}
-
-class venue extends dtc_gigs_baseAR {
-	var $_table = TABLE_VENUES, $_name = 'name';
-	var $id, $name, $address, $city, $state, $country, $postalCode, $contact, 
-		$phone, $email, $link, $notes, $private = 0, $apiID = 0, $deleted = 0, $customMap;
-	var $_fields = array(
-		'id',
-		'name',
-		'address',
-		'city',
-		'state',
-		'country',
-		'postalCode',
-		'contact',
-		'phone',
-		'email',
-		'link',
-		'notes',
-		'private',
-		'apiID',
-		'deleted',
-		'customMap',
-	);
-	
-	function delete($forReal = false) {
-		if ( $forReal ) {
-			return parent::delete();
-		} else {
-			$this->deleted = 1;
-			return $this->save();
-
-		}
-	}
-	
-	function getAddress($oneLine = false) {
-		$a = array();
-		$city = "";
-		if ( $oneLine ) {
-			if ( !empty($this->address) ) $a[] = str_replace("\n", ', ', $this->address);
-			if ( !empty($this->city) ) $a[] = $this->city;
-			if ( !empty($this->state) ) $a[] = $this->state;
-			if ( !empty($this->postalCode) ) $a[] = $this->postalCode;
-			if ( !empty($this->country) ) $a[] = $this->country;
-			return implode(', ', $a);
-		} else {
-			if ( !empty($this->address) ) $a[] = $this->address;
-			if ( !empty($this->city) ) $temp .= $this->city;
-			if ( !empty($this->state) ) $temp .= (!empty($temp) ? ', ' : '' ) . $this->state;
-			if ( !empty($this->country) ) $temp .= (!empty($temp) ? ', ' : '' ) . $this->country;
-			if ( !empty($this->postalCode) ) $temp .= (!empty($temp) ? ' ' : '' ) . $this->postalCode;
-			if ( !empty($temp) ) $a[] = $temp;
-			return implode("\n", $a);
-		}
-	}
-	
-	function getCity() {
-		$c = array();
-		if ( !empty($this->city) ) $c[] = $this->city;
-		if ( !empty($this->state) ) $c[] = $this->state;
-		//if ( !empty($this->country) ) $c[] = $this->country;
-		return implode(', ', $c);
-	}
-	
-	function getMapLink() {
-		global $options;
-		if ( empty($this->customMap) ) {
-			$a = array();
-			
-			if ( empty($this->address) ) 
-				$a[] = $this->name . ' near:';
-			else {}
-				$a[] = str_replace("\n", ", ", $this->address);
-			if ( !empty($this->city) ) $a[] = $this->city;
-			if ( !empty($this->state) ) $a[] = $this->state;
-			if ( !empty($this->country) ) $a[] = $this->country;
-			if ( !empty($this->postalCode) ) $a[] = $this->postalCode;
-			return 'http://maps.google.com/?q=' . urlencode(str_replace('near:,', 'near:', implode(', ', $a)));
-		} else {
-			if ( preg_match("/^https?:\/\//", $this->customMap) ) {
-				return $this->customMap;
-			} else {
-				return 'http://maps.google.com/?q=' . urlencode($this->customMap);
-			}
-		}
-	}
-	
-	function extraJSON() {
-		if ( function_exists("json_encode") ) {
-			$fields['mapLink'] = $this->getMapLink();
-		} else {
-			$fields[] = '"mapLink":"' . str_replace("\n", '\n', addslashes($this->getMapLink())) . '"';
-		}
-		return $fields;
-	}
-}
-
-class gig extends dtc_gigs_baseAR {
-	var $_table = TABLE_GIGS, $_name = 'id';
-	var $id, $venueID = 0, $date, $notes, $postID = 0, $eventName, $tour_id = 0;
-	var $_fields = array(
-		'id',
-		'venueID',
-		'date',
-		'notes',
-		'postID',
-		'eventName',
-		'tour_id',
-	);
-
-	function delete() {
-		$p = $this->getPerformances();
-		while ( $p->fetch() ) {
-			$p->delete();
-		}
-		wp_delete_post($this->postID);
-		return parent::delete();
-	}
-	
-	function getByPostID($postID) {
-		$this->search("postID = " . (int) $postID);
-		return $this->fetch();
-	}
-	
-	function getPermalink() {
-		$post = get_permalink($this->postID);
-		return $post;
-	}
-	
-	function getPerformances() {
-		$p = new performance();
-		if ( $this->id ) {	
-			$p->search("`gigID` = " . (int) $this->id, "`time`");
-		}
-		return $p;
-	}
-	
-	function getVenue() {
-		$v = new venue();
-		if ( $this->venueID ) {
-			$v->get($this->venueID);
-		}
-		return $v;
-	}
-	
-	function pre_insert() {
-		global $options, $wpdb;
-		$user = wp_get_current_user();
-		$v = $this->getVenue();
-		$p = $this->getPerformances();
-		$p->fetch();
-		
-		if ( $this->tour_id == -1 ) $this->tour_id = null;
-		
-		$title = array();
-		foreach ( $options['gig-title-show'] as $f ) {
-			switch ( $f ) {
-				case 'city' :
-					$title[] = $v->getCity();
-					break;
-				case 'eventName' :
-					$title[] = $this->eventName;
-					break;
-				case 'venue' :
-					$title[] = $v->name;
-					break;
-				case 'date' :
-					$title[] = dtcGigs::dateFormat($this->date);
-					break;
-				case 'country' :
-					$title[] = $v->country;
-					break;
-			}
-		}
-		
-		foreach ( $title  as $key => $value ) {
-			if ( empty($value) ) unset($title[$key]);
-		}
-
-		$post_data = array(
-			'post_author'		=> $user->ID,
-			'post_title'		=> $wpdb->escape(implode(' - ', $title)),
-			'post_status'		=> 'publish',
-			'post_type' 		=> 'post',
-			'post_category'		=> array($options['category']),
-			'post_content' 		=> '',
-		);
-		
-		if ( $options['post-filtering'] ) {
-			$post_data = array_merge($post_data, array(
-				'post_date'			=> $wpdb->escape($this->date . ' ' . $p->time),
-				'post_modified'		=> $wpdb->escape($this->date . ' ' . $p->time),
-				'post_date_gmt'		=> date('Y-m-d H:i:s', strtotime($this->date . ' ' . $p->time) - (60 * 60 * get_option('gmt_offset'))),
-				'post_modified_gmt'	=> date('Y-m-d H:i:s', strtotime($this->date . ' ' . $p->time) - (60 * 60 * get_option('gmt_offset'))),
-			));
-		}
-		$id = wp_insert_post($post_data);
-		$this->postID = $id;
-	}
-	
-	function pre_update() {
-		global $options, $wpdb, $wp_version;
-		$v = $this->getVenue();
-		$p = $this->getPerformances();
-		$p->fetch();
-
-		if ( $this->tour_id == -1 ) $this->tour_id = null;
-		
-		$title = array();
-		foreach ( $options['gig-title-show'] as $f ) {
-			switch ( $f ) {
-				case 'city' :
-					$title[] = $v->getCity();
-					break;
-				case 'eventName' :
-					$title[] = $this->eventName;
-					break;
-				case 'venue' :
-					$title[] = $v->name;
-					break;
-				case 'date' :
-					$title[] = dtcGigs::dateFormat($this->date);
-					break;
-				case 'country' :
-					$title[] = $v->country;
-					break;
-			}
-		}
-		
-		foreach ( $title  as $key => $value ) {
-			if ( empty($value) ) unset($title[$key]);
-		}
-
-		
-		$post = get_post($this->postID);
-		
-		if ( $options['post-filtering'] ) {
-			$post->post_date = $wpdb->escape($this->date . ' ' . $p->time);
-			$post->post_modified = $wpdb->escape($this->date . ' ' . $p->time);
-			$post->post_date_gmt = date('Y-m-d H:i:s', strtotime($this->date . ' ' . $p->time) - (60 * 60 * get_option('gmt_offset')));
-			$post->post_modified_gmt = date('Y-m-d H:i:s', strtotime($this->date . ' ' . $p->time) - (60 * 60 * get_option('gmt_offset')));
-		}
-
-		$post->post_title = $wpdb->escape(implode(' - ', $title));
-		$post->post_name = "";
-		$post->post_status = "publish"; // Do this to trick WordPress into resetting the GUID.
-		$post->post_category = array($options['category']);
-
-		wp_update_post($post);
-		if ( (float) $wp_version < 2.3 ) {  // Hack to make it compatible with WP 2.2
-			global $wpdb; 
-			$wpdb->query('UPDATE ' . $wpdb->prefix . 'posts SET post_status = "publish" WHERE ID = ' . (int) $this->postID);
-		}
-	}
-	
-	function post_insert() {
-		global $wp_version;
-		if ( (float) $wp_version < 2.3 ) {  // Hack to make it compatible with WP 2.2
-			global $wpdb; 
-			$wpdb->query('UPDATE ' . $wpdb->prefix . 'posts SET post_status = "publish" WHERE ID = ' . (int) $this->postID);
-		} else {
-			$post = get_post($this->postID);
-			$post->post_status = "publish";
-			wp_update_post($post);
-		}
-	}
-
-	function extraJSON() {
-		$post = get_post($this->postID);
-		$v = $this->getVenue();
-		$p = $this->getPerformances();
-		if ( function_exists("json_encode") ) {
-			$fields['permalink'] = $this->getPermalink();
-			$fields['venue'] = $v->getRow();
-			while ( $p->fetch() ) {
-				$fields['performances'][] = $p->getRow();
-			}
-		} else {
-			$fields[] = '"permalink":"' . str_replace("\n", '\n', addslashes($this->getPermalink())) . '"';
-			$ps = array();
-			$fields[] = '"venue":' . $v->toJSON();
-			while ( $p && $p->fetch() ) {
-				$ps[] = $p->toJSON();
-			}
-			$fields[] = '"performances":[' . implode(', ', $ps) . ']';
-		}
-		return $fields;
-	}
-}
-
-class performance extends dtc_gigs_baseAR {
-	var $_table = TABLE_PERFORMANCES, $_name = 'id';
-	var $id, $gigID = 0, $time = '20:00', $link, $shortNotes, $ages;
-
-	var $_fields = array(
-		'id',
-		'gigID',
-		'time',
-		'link',
-		'shortNotes',
-		'ages',
-	);
-}
-
-class tour extends dtc_gigs_baseAR {
-	var $_table = TABLE_TOURS, $_name = 'id';
-	var $id, $name, $notes, $pos = 0;
-	var $_fields = array(
-		'id',
-		'name',
-		'notes',
-		'pos',
-	);
-	
-	function post_insert() {
-		$max = $this->wpdb->get_var('SELECT MAX(`pos`) FROM `' . $this->_table . '`') + 1;
-		$this->wpdb->query('UPDATE `' . $this->_table . '` SET `pos` = ' . $max . ' WHERE `id` = ' . (int) $this->id);
-	}
-	
-	function delete() {
-		$g = $this->getGigs();
-		while ( $g->fetch() ) {
-			$g->tour_id = null;
-			$g->save();
-		}
-		return parent::delete();
-	}
-	
-	function sortTours($type = null) {
-		$options = get_option('gigs-calendar');
-		$type = is_null($type) ? $options['tours-sort'] : $type;
-		switch ($type) {
-			case 'date' :
-				return $this->wpdb->get_col('
-					SELECT DISTINCT
-						t.id
-					FROM
-						' . TABLE_TOURS . ' t  
-					LEFT JOIN
-						' . TABLE_GIGS . ' g 
-					ON 
-						t.`id` = g.`tour_id`
-					WHERE
-						`date` is null OR `date` >= CURDATE()
-					ORDER BY 
-						g.`date`, `name`
-				');
-				break;
-			case 'alpha' :
-				return $this->wpdb->get_col('
-					SELECT DISTINCT
-						t.id
-					FROM
-						' . TABLE_TOURS . ' t  
-					ORDER BY 
-						`name`
-				');
-				break;
-		}
-	}
-	
-	function getGigs($slice = 'all') {
-		$g = new gig();
-		if ( $slice == 'past' ) {
-			$g->search('`date` <= CURDATE() AND `tour_id` = ' . (int) $this->id, '`date`');
-		} elseif ( $slice == 'future' ) {
-			$g->search('`date` >= CURDATE() AND `tour_id` = ' . (int) $this->id, '`date`');
-		} else {
-			$g->search('`tour_id` = ' . (int) $this->id, '`date`');
-		}
-		return $g;
-	}
-	
-	function extraJSON(){
-		$fields = array();
-		$g = $this->getGigs();
-		$gs = array();
-		if ( function_exists("json_encode") ) {
-			while ( $g->fetch() ) {
-				$gs[] = $g->getRow();
-			}
-			$fields['gigs'] = $gs;
-		} else {
-			while ( $g->fetch() ) {
-				$gs[] = $g->toJSON();
-			}
-			$fields[] = '"gigs":[' . implode(',', $gs) . ']';
-		}
-		return $fields;
-	}
-}
-
-?>
--- a/web/wp-content/plugins/gigs-calendar/gigs.ajax.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,845 +0,0 @@
-<?php
-
-require_once 'ajaxSetup.php';
-
-$pageTarget = $folder . 'gigs.ajax.php';
-switch ($_POST['action']) {
-	case 'load':
-		$v = new venue();
-		$g = new gig();
-		$p = new performance();
-		$g->search("date >= CURDATE()", 'date');
-		$v->search('deleted = 0', 'name');
-		?>
-			<div class="clickable" id="gig-add-trigger">
-				<img class="icon" src="<?php echo $folder; ?>images/add.png" /> <?php _e('Add a new gig', $gcd) ?>
-			</div>
-			<div id="gig-add-form" style="display: none;">
-				<form id="new-gig" class="new-item" method="post" action="<?php echo $pageTarget; ?>">
-					<table>
-						<tbody>
-							<tr><td colspan="2">
-								<h3 class="no-margin"><?php _e('Gig Information', $gcd) ?></h3>
-								<div class="instructions"><?php _e('A "gig" is unique to a date at a venue.', $gcd) ?></div>
-							</td></tr>
-							<tr class="venue">
-								<td><label for="new-venue"><?php _e('Venue:', $gcd) ?></label></td>
-								<td>
-									<?php if ( $v->_count ) : ?>
-										<select name="venueID" id="new-venue">
-											<option value="-1"><?php _e('Select a venue', $gcd) ?></option>
-											<?php while ( $v->fetch() ) : ?>
-												<option value="<?php echo $v->id ?>"><?php echo $v->name . ' - ' . $v->getCity() ?></option>
-											<?php endwhile; ?>
-										</select>
-									<?php else : ?>
-											<?php _e('No venues found.  You&rsquo;ll need to <span class="link" id="add-venue">add one</span>', $gcd) ?>.
-									<?php endif; ?>
-								</td>
-							</tr>
-							<tr class="date">
-								<td><label for="new-date"><?php _e('Date:', $gcd) ?></label></td>
-								<td><input type="text" class="date" name="date" id="new-date" /></td>
-							</tr>
-							<tr class="eventName">
-								<td><label for="new-eventName"><?php _e('Event Name:', $gcd) ?></label> <img class="inline-icon" alt="" src="<?php echo $folder; ?>images/help.png" title="<?php _e('Some artists perform under several names.  Ignore the event name field if you don&rsquo;t need to specify what this event is called or what band name you are playing under.', $gcd) ?>" /></td>
-								<td><input type="text" class="eventName wide" name="eventName" id="new-eventName" /></td>
-							</tr>
-							<tr class="tour">
-								<td><label for="new-tour"><?php _e('Tour:', $gcd) ?></label></td>
-								<td>
-									<select class="tour_id" name="tour_id" id="new-tour_id">
-										<option value="-1"><?php _e("--None--", $gcd); ?></option>
-										<?php $t = new tour(); $t->search(null, '`name`'); ?>
-										<?php while ( $t->fetch() ) : ?>
-											<option value="<?php echo $t->id; ?>"><?php echo $t->name; ?></option>
-										<?php endwhile; ?>
-									</select>
-								</td>
-							</tr>
-							<?php if ( function_exists('wp_set_post_tags') ) : ?>
-								<tr class="tags">
-									<td><label for="new-tags"><?php _e('Post Tags:', $gcd) ?></label></td>
-									<td><input type="text" class="tags wide" name="tags" id="new-tags" /></td>
-								</tr>
-							<?php endif; ?>
-
-
-							<tr class="notes"><td colspan="2">
-								<?php _e('Description/Other notes:', $gcd) ?><br />
-								<textarea class="notes" name="notes" rows="8" cols="80"></textarea>
-							</td></tr>
-							
-							<?php if ( $wp_version >= 2.5 ) : ?>
-								<?php 
-									$metadata = array();
-									dtcGigs::extraFields(apply_filters('gigCal_gigs_extraFields', array()), $metadata);
-								?>
-								<tr><td colspan="2">
-									<div id="postcustom-new" class="postcustom">
-										<h3 title="<?php _e('Click to expand', $gcd); ?>" class="clickable"><?php _e('Custom Fields') ?> <img class="inline-icon" src="<?php echo $folder ?>images/plus.gif" alt="<?php _e('Expand', $gcd); ?>"> <img class="inline-icon" style="display:none;" src="<?php echo $folder ?>images/minus.gif" alt="<?php _e('Collapse', $gcd); ?>"></h3>
-										<div class="inside">
-											<div id="postcustomstuff-new">
-											<table cellpadding="3">
-												<thead>
-													<tr>
-														<th><?php _e('Key', $gcd) ?></th>
-														<th><?php _e('Value', $gcd) ?></th>
-														<th></th>
-													</tr>
-												</thead>
-												<tbody>
-													<tr>
-														<td><input value="<?php echo addslashes($key) ?>" name="custom-key[]" /></td>
-														<td>
-															<textarea rows="1" name="custom-value[]"><?php echo htmlspecialchars($value) ?></textarea>
-														</td>
-														<td><img alt="<?php _e('Remove Custom Field', $gcd) ?>" title="<?php _e('Remove Custom Field', $gcd) ?>" class="clickable delete-custom" src="<?php echo $folder; ?>images/delete.png" /></td>
-													</tr>
-												</tbody>
-											</table>
-											<div class="custom-ajax-response"></div>
-											</div>
-											<p>
-												<span class="clickable add-custom-field">
-													<img class="inline-icon" src="<?php echo $folder ?>images/add.png" alt="" />
-													<?php _e('Add a new custom field'); ?>
-												</span>
-											</p>
-											<p><?php _e('Custom fields can be used to add extra metadata to a gig that you can use in a special template.'); ?></p>
-										</div>
-									</div>
-								</td></tr>
-							<?php endif; ?>
-							
-							<tr><td colspan="2">
-								<h3 class="no-margin"><?php _e('Performances', $gcd) ?></h3>
-								<div class="instructions"><?php _e('You can add as many performances as<br />you are giving at a venue on the given date.', $gcd) ?></div>
-							</td></tr>
-							<tr><td colspan="2">
-								<?php pForm(1, true, false) ?>
-							</td></tr>
-							<tr><td colspan="2">
-								<div class="clickable add-performance"><img class="icon" src="<?php echo $folder; ?>images/add.png" /> <?php _e('Add another performance', $gcd) ?></div>
-							</td></tr>
-
-						</tbody>
-					</table>
-					<div>
-						<input type="submit" class="button" name="" value="<?php _e('Add Gig', $gcd) ?>" />
-						<input type="reset" class="button cancel" name="" value="<?php _e('Cancel', $gcd) ?>" id="new-gig-reset" />
-						<input type="hidden" name="action" value="add" />
-						<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-					</div>
-				</form>
-			</div>
-			
-			<table id="gig-list" class="gigs widefat">
-				<thead>
-					<tr>
-						<th style="text-align: center;" scope="col"><?php _e('ID', $gcd) ?></th>
-						<th scope="col"><?php _e('Event Name', $gcd) ?></th>
-						<th scope="col"><?php _e('Venue', $gcd) ?></th>
-						<th scope="col"><?php _e('City', $gcd) ?></th>
-						<th scope="col"><?php _e('Date', $gcd) ?></th>
-						<th scope="col"><?php _e('Time', $gcd) ?></th>
-						<th style="text-align: center" scope="col"><?php _e('Actions', $gcd) ?></th>
-					</tr>
-				</thead>
-				<tbody>
-					<?php while ( $g->fetch() ) : $v = $g->getVenue(); $p = $g->getPerformances(); $post = get_post($g->postID);?>
-						<tr id="gig-<?php echo $g->id; ?>" class="gig gig-<?php echo $g->id; ?> <?php echo ++$count % 2 ? "alternate" : "";?>">
-							<th style="text-align: center;" scope="row"><?php echo $g->id; ?></th>
-							<td class="eventName"><?php echo $g->eventName; ?></td>
-							<td class="venue"><?php echo $v->name; ?></td>
-							<td class="city"><?php echo $v->city . (!empty($v->state) ? ', ' . $v->state :  '') ?></td>
-							<td class="date"><?php echo $g->date ?></td>
-							<td class="time">
-								<?php if ( $p ) : while ( $p->fetch() ) : ?>
-									<span class="time"><?php echo dtcGigs::timeFormat($p->time) ?></span>
-								<?php endwhile; endif; ?>
-							</td>
-							<td class="actions" style="text-align: center; position: relative;">
-								<div style="position: relative">
-									<a target="_blank" class="guid" href="<?php echo $g->getPermalink(); ?>"><img alt="<?php _e('View Gig', $gcd) ?>" title="<?php _e('View Gig', $gcd) ?>" class="clickable view" src="<?php echo $folder; ?>images/page_white_magnify.png" /></a>
-									<img alt="<?php _e('Edit', $gcd) ?>" title="<?php _e('Edit', $gcd) ?>" class="clickable edit" src="<?php echo $folder; ?>images/page_white_edit.png" />
-									<?php if ( $v ) : ?>
-										<a target="_blank" href="<?php echo $v->getMapLink(); ?>"><img alt="<?php _e('Map', $gcd) ?>" title="<?php _e('Map', $gcd) ?>" class="clickable map" src="<?php echo $folder; ?>images/world.png" /></a>
-									<?php endif ?>
-									<a target="_blank" href="<?php echo get_option('siteurl') ?>/wp-admin/post.php?action=edit&post=<?php echo $post->ID; ?>">
-										<img alt="<?php _e('Edit WordPress Post', $gcd) ?>" title="<?php _e('Edit WordPress Post', $gcd) ?>" class="clickable edit-post" src="<?php echo $folder; ?>images/page_edit.png" />
-									</a>
-									<img alt="<?php _e('Delete', $gcd) ?>" title="<?php _e('Delete', $gcd) ?>" class="clickable delete" src="<?php echo $folder; ?>images/delete.png" />
-									
-								</div>
-							</td>
-						</tr>
-						<tr id="gig-panel-<?php echo $g->id; ?>" class="gig gig-<?php echo $g->id; ?> panel <?php echo $count % 2 ? "alternate" : "";?>">
-							<td style="background-color: white"></td>
-							<td class="panel" colspan="6"></td>
-						</tr>
-					<?php endwhile; ?>
-				</tbody>
-			</table>
-				
-			<script type="text/javascript">
-			
-				(function($){
-					(function(form) { // Function to let a plugin add extra JS code to process the form.
-						<?php do_action('gigCal_gigs_formExtraJS'); ?>
-					}($("form#new-gig")));
-					
-					$("#gig-add-form .add-custom-field").click(function(){
-						$("#gig-add-form .postcustom table").append('<tr><td><input value="" name="custom-key[]" /></td><td><textarea rows="1" name="custom-value[]"></textarea><textarea style="display:none;" rows="1" name="old-custom-value[]"></textarea><input class="delete" type="hidden" name="deletecustom[]" value="0" /></td><td><img class="delete-custom" alt="<?php _e('Remove Custom Field', $gcd) ?>" title="<?php _e('Remove Custom Field', $gcd) ?>" class="clickable" src="<?php echo $folder; ?>images/delete.png" /></td></tr>');
-						
-						$("#gig-add-form .delete-custom").unbind("click");
-						$("#gig-add-form .delete-custom").click(function(){
-							$(this).parents("tr").eq(0).remove();
-						});
-					});
-					
-					$("#gig-add-form .delete-custom").click(function(){
-						$(this).parents("tr").eq(0).remove();
-					});
-					
-					$("#postcustom-new h3.clickable").click(function(){
-						$(this).next().toggle();
-						$(this).children(".inline-icon").toggle();
-					});
-					
-					
-				
-					$("#add-venue").click(function(){
-						gigs_page_load("venues", "new=1");
-					});
-					
-					$("#gig-add-trigger").click(function(){
-						$("#gig-add-form:hidden").slideDown(300, function(){
-							$("#new-name").focus();
-						});
-					});
-					
-					$("#new-gig-reset").click(function(){
-						$("#performance-c1 select").attr('disabled', false);
-						$("#gig-add-form table.performance[id!=performance-c1]").parents("tr").remove();
-						$("#gig-add-form").slideUp(300);
-					});
-					
-					$("#new-date").datepicker({dateFormat:"yy-mm-dd"});
-					$(".date-field").datepicker({dateFormat:"yy-mm-dd"});
-					
-					
-					$("#new-gig").ajaxForm({
-						url:pageTarget,
-						dataType: "json",
-						success:function(json){
-							if ( json.success ) {
-								gigs = $("table#gig-list tbody tr:not(.panel) td.date");
-								inserted = false;
-								for ( i = 0; i < gigs.length; i++ ) {
-									if ( json.gig.date < gigs.eq(i).html() ) {
-										g = gigs.eq(i);
-										$.post(pageTarget, {
-											nonce:nonce,
-											action:'getRow',
-											id:json.gig.id
-										}, function(rsp){
-											g.parents("tr").before(rsp);
-											resetTableColors("table#gig-list");
-											setupEvents();
-										});
-										inserted = true;
-										break;
-									}
-								}
-								if ( !inserted ) {
-									$.post(pageTarget, {
-										nonce:nonce,
-										action:'getRow',
-										id:json.gig.id
-									}, function(rsp){
-										$("table#gig-list tbody").append(rsp);
-										resetTableColors("table#gig-list");
-										setupEvents();
-									});
-								}
-								$("div#postcustomstuff-new table tbody tr:not(:first)").remove();
-								$("#new-gig-reset").click();
-							} else {
-								alert(json.error);
-							}
-						}
-
-					});
-					
-					$('.inline-icon').tooltip({
-						showURL:false
-					});
-					
-					
-					setupPerformanceRemoval = function() {
-						$("div.delete-performance img").unbind("click");
-						$("div.delete-performance img").click(function(){
-							id = $(this).parents("tr").eq(0).find("input.performanceID").val();
-							if ( id == "" ) {
-								$(this).parents("tr").eq(1).remove();
-							} else {
-								if ( confirm("<?php _e('Are you sure you want to remove this performance?', $gcd) ?>") ) {
-									$(this).parents("form").children(".extra-inputs").append('<input type="hidden" name="delete[]" value="' + id + '" />');
-									$(this).parents("tr").eq(1).remove();
-								}
-							}
-						});
-					}
-					
-					setupPerformances = function() {
-						$(".add-performance").unbind("click");
-						$(".add-performance").click(function(){
-							td = $(this).parents("tr").eq(0).before("<tr><td colspan='2'><div class='loading'><img src='<?php echo $folder; ?>images/ajax-loader.gif' alt='' /></div></td></tr>").prev().children("td").load(pageTarget,{
-								nonce:nonce,
-								action:"performance-form",
-								count:$(this).parents("table").eq(0).find("table.performance").length + 1
-							}, setupPerformanceRemoval);
-						});
-						setupPerformanceRemoval();
-
-					}
-					
-					setupEvents = function() {
-						$("img.delete").unbind("click");
-						$("img.delete").click(function(){
-							id = $(this).parents("tr").attr("id").split("-")[1];
-							var thisRow = $(this).parents("tr").hide();
-							thisRow.next().hide();
-
-							$.post(pageTarget, {
-								nonce:nonce,
-								action:'delete',
-								id:id
-							}, function (rsp){
-								if ( rsp.success ) {
-									thisRow.remove();
-									thisRow.next().remove();
-								} else {
-									thisRow.css("display", "table-row");
-								}
-								resetTableColors("table#gig-list");
-							}, "json");
-						});
-						
-						$("img.edit").unbind("click");
-						$("img.edit").click(function(){
-							row = $(this).parents("tr");
-							id = row.attr("id").split("-")[1];
-							row.next().children("td.panel").load(pageTarget, {
-								nonce:nonce,
-								action:"edit",
-								id:id
-							}, function(){
-								row.next().css("display", "table-row");
-							});
-						});
-						
-						$("postcustom h3.clickable").unbind("click");
-						$("postcustom h3.clickable").click(function(){
-							$(this).next().toggle();
-						});
-						
-						
-						setupPerformances();
-					}
-					
-					setupEvents();
-
-				}(jQuery));
-				
-			
-			
-			</script>
-		<?php
-		break;
-	case 'add':
-		$g = new gig();
-		//$p = new performance();
-		
-		$g->venueID = $_POST['venueID'];
-		$g->date = $_POST['date'];
-		$g->notes = $_POST['notes'];
-		$g->eventName = $_POST['eventName'];
-		$g->tour_id = ( $_POST['tour_id'] == -1 ? null : $_POST['tour_id'] );
-		
-		if ( $g->save() ) {
-			$g->setTags($_POST['tags']);
-			if ( isset($_POST['performanceID']) ) {
-				foreach ( $_POST['performanceID'] as $key => $pid ) {
-					$p = new performance((empty($pid) ? null : $pid));
-					$p->gigID = $g->id;
-					$p->link = ($_POST['link'][$key] == 'http://') ? '' : $_POST['link'][$key];
-					$p->shortNotes = $_POST['shortNotes'][$key];
-					$p->ages = (empty($_POST['ages-custom'][$key]) ? $_POST['ages'][$key] : $_POST['ages-custom'][$key]);
-					$p->time = ($_POST['tbd'][$key] == "1") ? null : date("H:i:s", strtotime($_POST['hour'][$key] . ':' . $_POST['minute'][$key] . ' ' . $_POST['meridiem'][$key]));
-					$p->save();
-				}
-			}
-			
-			foreach ( $_POST['custom-key'] as $key => $field ) {
-				if ( $_POST['custom-value'][$key] === "" ) {
-					// If the value is empty, just ignore this field.
-					continue;
-				} else {
-					if ( is_array($_POST['custom-value'][$key]) ) {
-						foreach ( $_POST['custom-value'][$key] as $k => $v ) {
-							if ( $v === "" ) {
-								unset($_POST['custom-value'][$key][$k]);
-							}
-						}
-					}
-					add_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key]);
-				}
-			}
-			
-			
-			echo '{success:true, gig:' . $g->toJSON() . '}';
-		} else {
-			echo '{success:false,error:"' . ($g->getError() == '' ? 'An unknown error has occurred' : 'DB Error: ' . addslashes($g->getError())) . '"}';
-		}
-		break;
-	case 'getRow':
-		$g = new gig($_POST['id']);
-		$v = $g->getVenue();
-		$p = $g->getPerformances();
-		$post = get_post($g->postID);
-		?>
-			<tr id="gig-<?php echo $g->id; ?>" class="gig gig-<?php echo $g->id; ?> <?php echo ++$count % 2 ? "alternate" : "";?>">
-				<th style="text-align: center;" scope="row"><?php echo $g->id; ?></th>
-				<td class="eventName"><?php echo $g->eventName; ?></td>
-				<td class="venue"><?php echo $v->name; ?></td>
-				<td class="city"><?php echo $v->city . (!empty($v->state) ? ', ' . $v->state :  '') ?></td>
-				<td class="date"><?php echo $g->date ?></td>
-				<td class="time">
-					<?php if ( $p ) : while ( $p->fetch() ) : ?>
-						<span class="time"><?php echo dtcGigs::timeFormat($p->time) ?></span>
-					<?php endwhile; endif; ?>
-				</td>
-				<td class="actions" style="text-align: center; position: relative;">
-					<div style="position: relative">
-						<a target="_blank" class="guid" href="<?php echo $g->getPermalink(); ?>"><img alt="<?php _e('View Gig', $gcd) ?>" title="<?php _e('View Gig', $gcd) ?>" class="clickable view" src="<?php echo $folder; ?>images/page_white_magnify.png" /></a>
-						<img alt="<?php _e('Edit', $gcd) ?>" title="<?php _e('Edit', $gcd) ?>" class="clickable edit" src="<?php echo $folder; ?>images/page_white_edit.png" />
-						<?php if ( $v ) : ?>
-							<a target="_blank" href="<?php echo $v->getMapLink(); ?>"><img alt="<?php _e('Map', $gcd) ?>" title="<?php _e('Map', $gcd) ?>" class="clickable map" src="<?php echo $folder; ?>images/world.png" /></a>
-						<?php endif ?>
-						<a target="_blank" href="<?php echo get_option('siteurl') ?>/wp-admin/post.php?action=edit&post=<?php echo $post->ID; ?>">
-							<img alt="<?php _e('Edit WordPress Post', $gcd) ?>" title="<?php _e('Edit WordPress Post', $gcd) ?>" class="clickable edit-post" src="<?php echo $folder; ?>images/page_edit.png" />
-						</a>
-						<img alt="<?php _e('Delete', $gcd) ?>" title="<?php _e('Delete', $gcd) ?>" class="clickable delete" src="<?php echo $folder; ?>images/delete.png" />
-					</div>
-				</td>
-			</tr>
-			<tr id="gig-panel-<?php echo $g->id; ?>" class="gig gig-<?php echo $g->id; ?> panel <?php echo $count % 2 ? "alternate" : "";?>">
-				<td style="background-color: white"></td>
-				<td class="panel" colspan="6"></td>
-			</tr>
-		<?php
-		break;
-	
-	case 'delete':
-		$g = new gig($_POST['id']);
-		$result = $g->delete();
-		echo '{"success": ' . ($result ? 'true' : 'false') . ',"action":"delete"' . ($result ? '' : ',"error":"db"') . '}';
-		break;
-	case 'edit':
-		$g = new gig($_POST['id']);
-		$p = $g->getPerformances();
-		$v = $g->getVenue();
-		?>
-			<form id="edit-gig-<?php echo $g->id ?>" class="edit-item" method="post" action="<?php echo $pageTarget; ?>">
-				<table>
-					<tbody>
-						<tr><td colspan="2">
-							<h3 class="no-margin"><?php _e('Gig Information', $gcd) ?></h3>
-							<div class="instructions"><?php _e('A "gig" is unique to a date at a venue.', $gcd) ?></div>
-						</td></tr>
-						<tr class="venue">
-							<td><?php _e('Venue:', $gcd) ?></td>
-							<td>
-								<?php echo $v->name . ' - ' . $v->getCity() ?>
-							</td>
-						</tr>
-						<tr class="date">
-							<td><label for="edit-date-<?php echo $g->id ?>"><?php _e('Date:', $gcd) ?></label></td>
-							<td><input type="text" class="date wide" name="date" id="edit-date-<?php echo $g->id ?>" value="<?php echo $g->date ?>" /></td>
-						</tr>
-						<tr class="eventName">
-							<td><label for="new-eventName"><?php _e('Event Name:', $gcd) ?></label> <img class="inline-icon" alt="" src="<?php echo $folder; ?>images/help.png" title="<?php _e('Some artists perform under several names.  Ignore the event name field if you don&rsquo;t need to specify what this event is called or what band name you are playing under.', $gcd) ?>" /></td>
-							<td><input type="text" class="eventName wide" name="eventName" id="edit-eventName-<?php echo $g->id ?>" value="<?php echo $g->eventName ?>" /></td>
-						</tr>
-						<tr class="tour">
-							<td><label for="edit-tour_id-<?php echo $g->id ?>"><?php _e('Tour:', $gcd) ?></label></td>
-							<td>
-								<select class="tour_id" name="tour_id" id="edit-tour_id-<?php echo $g->id ?>">
-									<option value="-1"><?php _e('--None--', $gcd) ?></option>
-									<?php $t = new tour(); $t->search(null, '`name`'); ?>
-									<?php while ( $t->fetch() ) : ?>
-										<option value="<?php echo $t->id; ?>" <?php if ( $g->tour_id == $t->id ) echo 'selected="selected"'; ?>><?php echo $t->name; ?></option>
-									<?php endwhile; ?>
-								</select>
-							</td>
-						</tr>
-						<?php if ( function_exists('wp_set_post_tags') ) : ?>
-							<tr class="tags">
-								<td><label for="edit-tags-<?php echo $g->id ?>"><?php _e('Post Tags:', $gcd) ?></label></td>
-								<td><input type="text" class="tags wide" name="tags" id="edit-tags-<?php echo $g->id ?>" value="<?php echo dtcGigs::escapeForInput(implode(', ', $g->getTags())) ?>" /></td>
-							</tr>
-						<?php endif; ?>
-						
-						<tr class="notes"><td colspan="2">
-							<?php _e('Description/Other notes:', $gcd) ?><br />
-							<textarea class="notes" name="notes" rows="8" cols="80"><?php echo dtcGigs::escapeForInput($g->notes) ?></textarea>
-						</td></tr>
-						
-						<?php if ( $wp_version >= 2.5 ) : ?>
-							<?php 
-								$metadata = get_post_custom($g->postID);
-								dtcGigs::extraFields(apply_filters('gigCal_gigs_extraFields', array()), $metadata, $g->id);
-							?>
-							<tr><td colspan="2">
-								<div id="postcustom-<?php echo $g->id ?>" class="postcustom">
-									<h3 title="<?php _e('Click to expand', $gcd); ?>" class="clickable"><?php _e('Custom Fields') ?> <img class="inline-icon" src="<?php echo $folder ?>images/plus.gif" alt="<?php _e('Expand', $gcd); ?>"> <img class="inline-icon" style="display:none;" src="<?php echo $folder ?>images/minus.gif" alt="<?php _e('Collapse', $gcd); ?>"></h3>
-									<div class="inside">
-										<div id="postcustomstuff-<?php echo $g->id ?>">
-										<table cellpadding="3">
-											<thead>
-												<tr>
-													<th><?php _e('Key', $gcd) ?></th>
-													<th><?php _e('Value', $gcd) ?></th>
-													<th></th>
-												</tr>
-											</thead>
-											<tbody>
-												<?php
-													
-													foreach ( $metadata as $key => $values ) {
-														foreach ( $values as $index => $value ) {
-															if ( substr($key, 0, 1) != '_' ) {
-																?><tr>
-																	<td><input value="<?php echo addslashes($key) ?>" name="custom-key[]" /></td>
-																	<td>
-																		<textarea rows="1" name="custom-value[]"><?php echo htmlspecialchars($value) ?></textarea>
-																		<textarea style="display:none;" rows="1" name="old-custom-value[]"><?php echo htmlspecialchars($value) ?></textarea>
-																		<input class="delete" type="hidden" name="deletecustom[]" value="0" />
-																	</td>
-																	<td><img alt="<?php _e('Remove Custom Field', $gcd) ?>" title="<?php _e('Remove Custom Field', $gcd) ?>" class="clickable delete-custom" src="<?php echo $folder; ?>images/delete.png" /></td>
-																</tr><?php
-															}
-														}
-													}
-												?>
-											</tbody>
-										</table>
-										<div class="custom-ajax-response"></div>
-										</div>
-										<p>
-											<span class="clickable add-custom-field">
-												<img class="inline-icon" src="<?php echo $folder ?>images/add.png" alt="" />
-												<?php _e('Add a new custom field'); ?>
-											</span>
-										</p>
-										<p><?php _e('Custom fields can be used to add extra metadata to a gig that you can use in a special template.'); ?></p>
-									</div>
-								</div>
-							</td></tr>
-						<?php endif; ?>
-
-						<tr><td colspan="2">
-							<h3 class="no-margin"><?php _e('Performances', $gcd) ?></h3>
-							<div class="instructions"><?php _e('You can add as many performances as<br />you are giving at a venue on the given date.', $gcd) ?></div>
-						</td></tr>
-						<?php while ( $p->fetch() ) : ?>
-							<tr><td colspan="2">
-								<?php pForm($p->id, false) ?>
-							</td></tr>
-						<?php endwhile ?>
-						<tr><td colspan="2">
-							<div class="clickable add-performance"><img class="icon" src="<?php echo $folder; ?>images/add.png" /> <?php _e('Add another performance', $gcd) ?></div>
-						</td></tr>
-
-					</tbody>
-				</table>
-				<div class="extra-inputs">
-					<input type="submit" class="button" name="" value="<?php _e('Save Gig', $gcd); ?>" />
-					<input type="reset" class="button cancel" name="" value="<?php _e('Cancel', $gcd); ?>" id="edit-gig-reset-<?php echo $g->id ?>" />
-					<input type="hidden" name="action" value="save" />
-					<input type="hidden" name="id" value="<?php echo $g->id ?>" />
-					<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-				</div>
-			</form>
-			
-			<script type="text/javascript">
-				(function($){					
-
-					(function(form) { // Function to let a plugin add extra JS code to process the form.
-						<?php do_action('gigCal_gigs_formExtraJS'); ?>
-					}($("#edit-gig-<?php echo $g->id ?>")));
-
-					$("#edit-gig-<?php echo $g->id ?> .add-custom-field").click(function(){
-						$("#edit-gig-<?php echo $g->id ?> .postcustom table").append('<tr><td><input value="" name="custom-key[]" /></td><td><textarea rows="1" name="custom-value[]"></textarea><textarea style="display:none;" rows="1" name="old-custom-value[]"></textarea><input class="delete" type="hidden" name="deletecustom[]" value="0" /></td><td><img class="delete-custom" alt="<?php _e('Remove Custom Field', $gcd) ?>" title="<?php _e('Remove Custom Field', $gcd) ?>" class="clickable" src="<?php echo $folder; ?>images/delete.png" /></td></tr>');
-						
-						$("#edit-gig-<?php echo $g->id ?> .delete-custom").unbind("click");
-						$("#edit-gig-<?php echo $g->id ?> .delete-custom").click(function(){
-							$(this).parents("tr").eq(0).remove();
-						});
-					});
-					
-					$("#edit-gig-<?php echo $g->id ?> .delete-custom").click(function(){
-						$(this).parents("td").eq(0).siblings().children("input.delete").val(1);
-						$(this).parents("tr").eq(0).hide();
-					});
-					
-					$("#postcustom-<?php echo $g->id ?> h3.clickable").click(function(){
-						$(this).next().toggle();
-						$(this).children(".inline-icon").toggle();
-					});
-					
-					$("#edit-gig-<?php echo $g->id ?> .date").datepicker({dateFormat:"yy-mm-dd"});
-					$(".date-field").datepicker({dateFormat:"yy-mm-dd"});
-
-					setupPerformances();
-					
-					$("#edit-gig-reset-<?php echo $g->id ?>").click(function(){
-						$(this).parents("tr.panel").hide();
-					});
-					
-					$('.inline-icon').tooltip({
-						showURL:false
-					});
-					
-					$("#edit-gig-<?php echo $g->id ?>").ajaxForm({
-						url:pageTarget,
-						dataType: "json",
-						success:function(json){
-							row = $("#gig-panel-" + json.gig.id).hide().prev();
-							row.children("td.eventName").html(json.gig.eventName);
-							row.children("td.date").html(json.gig.date);
-							row.find("a.guid").attr("href", json.gig.permalink);
-							times = row.children("td.time");
-							times.html("");
-							for ( i = 0; i < json.gig.performances.length; i++ ) {
-								time = json.gig.performances[i].time.split(":");
-								<?php if ( $options['time-12h'] ) : ?>
-									if ( time[0] == 0 ) {
-										time[0] = 12;
-										time[2] = 'am';
-									} else if ( time[0] == 12 ) {
-										time[2] = 'pm';
-									} else if ( time[0] < 12 ) {
-										time[2] = 'am';
-									} else if ( time[0] > 12 ) {
-										time[0] = time[0] - 12;
-										time[2] = 'pm';
-									}
-									times.append('<span class="time">' + time[0] + ':' + time[1] + time[2] + '</span> ');
-								<?php else : ?>
-									times.append('<span class="time">' + time[0] + ':' + time[1] + '</span> ');
-								<?php endif; ?>
-							}
-							
-						}
-					});
-				}(jQuery));
-			</script>
-		<?php
-		break;
-		
-	case 'save':
-		$g = new gig($_POST['id']);
-
-		$g->setTags($_POST['tags']);
-
-		$g->date = $_POST['date'];
-		$g->notes = $_POST['notes'];
-		$g->eventName = $_POST['eventName'];
-		$g->tour_id = ( $_POST['tour_id'] == -1 ? null : $_POST['tour_id'] );
-
-		if ( isset($_POST['performanceID']) ) {
-			foreach ( $_POST['performanceID'] as $key => $pid ) {
-				$p = new performance((empty($pid) ? null : $pid));
-				$p->gigID = $g->id;
-				$p->link = ($_POST['link'][$key] == 'http://') ? '' : $_POST['link'][$key];
-				$p->shortNotes = $_POST['shortNotes'][$key];
-				$p->ages = (empty($_POST['ages-custom'][$key]) ? $_POST['ages'][$key] : $_POST['ages-custom'][$key]);
-				$p->time = ($_POST['tbd'][$key] == "1") ? null : date("H:i:s", strtotime($_POST['hour'][$key] . ':' . $_POST['minute'][$key] . ' ' . $_POST['meridiem'][$key]));
-				$p->save();
-			}
-		}
-		
-		$p = new performance();
-		if ( isset($_POST['delete']) ) {
-			foreach ( $_POST['delete'] as $pid ) {
-				$p->get($pid);
-				$p->delete();
-			}
-		}
-		
-		$g->save();
-		
-		if ( isset($_POST['deletecustom']) && is_array($_POST['deletecustom']) ) {
-			foreach ( $_POST['deletecustom'] as $key => $delete ) {
-				if ( $delete ) {
-					delete_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['old-custom-value'][$key]);
-				}
-			}
-		}
-		
-		if ( isset($_POST['custom-key']) && is_array($_POST['custom-key']) ) {
-
-			foreach ( $_POST['custom-key'] as $key => $field ) {
-				if ( is_array($_POST['custom-value'][$key]) ) {
-					foreach ( $_POST['custom-value'][$key] as $k => $v ) {
-						if ( $v === "" ) {
-							unset($_POST['custom-value'][$key][$k]);
-						}
-					}
-				}
-				if ( empty($_POST['custom-value'][$key]) && empty($_POST['old-custom-value'][$key]) ) {
-					// If both value fields are empty, just ignore this field.
-					continue;
-				} elseif ( $_POST['custom-value'][$key] === "" ) {
-					// If the old value is not empty, but the new one is, delete this sucker.
-					delete_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['old-custom-value'][$key]);
-				} elseif ( $_POST['old-custom-value'][$key] === "" ) {
-					// If the old value is empty, but the new one is not, create a new custom field.
-					add_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key]);
-				} elseif ( $_POST['old-custom-value'][$key] != $_POST['custom-value'][$key] && $_POST['old-custom-value'][$key] != serialize($_POST['custom-value'][$key]) ) {
-					// If the old and new values are not equal, update the custom field.
-					update_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key], unserialize($_POST['old-custom-value'][$key]));
-				}
-			}
-		}
-		
-		echo '{success:true, gig:' . $g->toJSON() . '}';
-		break;
-		
-	case 'performance-form':
-		if ( isset($_POST['id']) ) {
-			pForm($_POST['id'], false);
-		} else {
-			pForm((int) $_POST['count'], true);
-		}
-		break;
-}
-
-
-function pForm($id, $new = true, $remove = true) {
-	global $folder, $gcd, $options;
-	$p = new performance();
-	if ( $new ) {
-		$count = 'c' . $id;
-	} else {
-		$p->get($id);
-		$count = 'id' . $id;
-	}
-	
-	$ages = $options['ages-list'];
-	
-	$time = explode(":", $p->time);
-	$minutes = $time[1];
-	
-	if ( $options['time-12h'] ) {
-		if ( $time[0] == 0 ) {
-			$hour = "12";
-			$meridiem = "AM";
-		} elseif ( $time[0] == 12 ) {
-			$hour = "12";
-			$meridiem = "PM";
-		} elseif ( $time[0] < 12 ) {
-			$hour = $time[0];
-			$meridiem = "AM";
-		} else {
-			$hour = $time[0] - 12;
-			$meridiem = "PM";
-		}
-	} else { 
-		$hour = $time[0];
-	}
-	?>
-		<table id="performance-<?php echo $count ?>" class="performance performance-<?php echo $count ?> <?php if ( $new ) echo 'new' ?>"><tbody>
-			<tr>
-				<td>
-					<label>
-						<input type="hidden" class="performanceID" name="performanceID[]" value="<?php echo $p->id; ?>" />
-						<?php _e('Performance Time:', $gcd) ?>
-					</label>
-				</td><td>
-					<div>
-						<select <?php if ( is_null($p->time) ) echo 'disabled="disabled"'; ?> name="hour[]">
-							<?php for ( $i = ($options['time-12h'] ? 1 : 0); $i <= ($options['time-12h'] ? 12 : 23); $i++ ) : ?>
-								<option <?php if ( $i == $hour ) echo 'selected="selected"' ?>><?php echo $i ?></option>
-							<?php endfor; ?>
-						</select>
-						<select <?php if ( is_null($p->time) ) echo 'disabled="disabled"'; ?> name="minute[]">
-							<option <?php if ( "00" == $minutes ) echo 'selected="selected"' ?>>00</option>
-							<option <?php if ( "15" == $minutes ) echo 'selected="selected"' ?>>15</option>
-							<option <?php if ( "30" == $minutes ) echo 'selected="selected"' ?>>30</option>
-							<option <?php if ( "45" == $minutes ) echo 'selected="selected"' ?>>45</option>
-							<option value="00">--</option>
-							<?php for ( $i = 0; $i <= 59; $i++ ) : ?>
-								<option <?php if ( !in_array($i, array("00", "15", "30", "45")) && $i == $minutes ) echo 'selected="selected"' ?>><?php echo str_pad($i, 2, STR_PAD_LEFT, '0') ?></option>
-							<?php endfor; ?>
-						</select>
-						<?php if ( $options['time-12h'] ) : ?>
-							<select <?php if ( is_null($p->time) ) echo 'disabled="disabled"'; ?> name="meridiem[]">
-								<option <?php if ( 'AM' == $meridiem ) echo 'selected="selected"' ?>><?php _e('AM', $gcd) ?></option>
-								<option <?php if ( 'PM' == $meridiem ) echo 'selected="selected"' ?>><?php _e('PM', $gcd) ?></option>
-							</select>
-						<?php else : ?>
-							<input type="hidden" name="meridiem[]" value="" />
-						<?php endif; ?>
-						<input <?php if ( is_null($p->time) ) echo 'checked="checked"'; ?> type="checkbox" value="1" class="tbd" name="tbd[]" id="performance-tbd-<?php echo $count; ?>"> <label for="performance-tbd-<?php echo $count; ?>"><?php echo $options['tbd-text']; ?></label>
-						<?php if ( $remove ) : ?>
-							<div class="delete-performance"><img alt="<?php _e('Remove Performance', $gcd) ?>" title="<?php _e('Remove Performance', $gcd) ?>" class="clickable" src="<?php echo $folder; ?>images/delete.png" /></div>
-						<?php endif ?>
-					</div>
-				</td>
-			</tr><tr>
-				<td>
-					<label for="performance-link[]"><?php _e('External Link (for tickets):', $gcd) ?></label>
-				</td><td>
-					<input type="text" class="link wide" name="link[]" id="performance-link[]" value="<?php echo empty($p->link) ? 'http://' : dtcGigs::escapeForInput($p->link) ?>" />
-				</td>
-			</tr><tr>
-				<td>
-					<label for="performance-shortNotes-<?php echo $count; ?>"><?php _e('Short Notes:', $gcd) ?></label>
-				</td><td>
-					<input type="text" class="shortNotes wide" name="shortNotes[]" id="performance-shortNotes-<?php echo $count; ?>" value="<?php echo dtcGigs::escapeForInput($p->shortNotes) ?>" />
-				</td>
-			</tr><tr>
-				<td>
-					<label for="performance-ages-<?php echo $count; ?>"><?php _e('Ages:', $gcd) ?></label>
-				</td><td>
-					<select name="ages[]" id="performance-ages-<?php echo $count; ?>">
-						<?php $found = false; foreach ( $ages as $age ) : ?>
-							<option <?php if ( $p->ages == $age ) {echo 'selected="selected"'; $found = true;} ?>><?php echo dtcGigs::escapeForInput($age) ?></option>
-						<?php endforeach; ?>
-					</select>
-					<?php _e('Or...', $gcd) ?>
-					<input type="text" class="ages" name="ages-custom[]" id="performance-ages-custom[]" value="<?php if ( !$found ) echo $p->ages; ?>" />
-				</td>
-			</tr>
-		</tbody></table>
-		<script type="text/javascript">
-			(function($){
-				
-				$("input.tbd").unbind("click");
-				$("input.tbd").click(function(){
-					el = $(this);
-					if ( $(this).attr("checked") ) {
-						$(this).prevAll("select").attr("disabled", true);
-					} else {
-						$(this).prevAll("select").attr("disabled", false);
-					}
-				});
-			})(jQuery);
-		</script>
-	<?php
-}
-?>
Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-de_DE.mo has changed
Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-es_ES.mo has changed
Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-fi_FI.mo has changed
Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-fr_FR.mo has changed
Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-it_IT.mo has changed
Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-nl_NL.mo has changed
Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-zh_CN.mo has changed
Binary file web/wp-content/plugins/gigs-calendar/images/add.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/ajax-loader.gif has changed
Binary file web/wp-content/plugins/gigs-calendar/images/cancel.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/delete.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/disk.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/feed-icon.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/help.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/link.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/minus.gif has changed
Binary file web/wp-content/plugins/gigs-calendar/images/money_dollar.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/page_edit.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/page_white_edit.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/page_white_magnify.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/plus.gif has changed
Binary file web/wp-content/plugins/gigs-calendar/images/shape_square.png has changed
Binary file web/wp-content/plugins/gigs-calendar/images/world.png has changed
--- a/web/wp-content/plugins/gigs-calendar/js/jquery.form.js	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,872 +0,0 @@
-/*
- * jQuery Form Plugin
- * version: 2.02 (12/16/2007)
- * @requires jQuery v1.1 or later
- *
- * Examples at: http://malsup.com/jquery/form/
- * Dual licensed under the MIT and GPL licenses:
- *   http://www.opensource.org/licenses/mit-license.php
- *   http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id$
- */
- (function($) {
-/**
- * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX.
- *
- * ajaxSubmit accepts a single argument which can be either a success callback function
- * or an options Object.  If a function is provided it will be invoked upon successful
- * completion of the submit and will be passed the response from the server.
- * If an options Object is provided, the following attributes are supported:
- *
- *  target:   Identifies the element(s) in the page to be updated with the server response.
- *            This value may be specified as a jQuery selection string, a jQuery object,
- *            or a DOM element.
- *            default value: null
- *
- *  url:      URL to which the form data will be submitted.
- *            default value: value of form's 'action' attribute
- *
- *  type:     The method in which the form data should be submitted, 'GET' or 'POST'.
- *            default value: value of form's 'method' attribute (or 'GET' if none found)
- *
- *  data:     Additional data to add to the request, specified as key/value pairs (see $.ajax).
- *
- *  beforeSubmit:  Callback method to be invoked before the form is submitted.
- *            default value: null
- *
- *  success:  Callback method to be invoked after the form has been successfully submitted
- *            and the response has been returned from the server
- *            default value: null
- *
- *  dataType: Expected dataType of the response.  One of: null, 'xml', 'script', or 'json'
- *            default value: null
- *
- *  semantic: Boolean flag indicating whether data must be submitted in semantic order (slower).
- *            default value: false
- *
- *  resetForm: Boolean flag indicating whether the form should be reset if the submit is successful
- *
- *  clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful
- *
- *
- * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for
- * validating the form data.  If the 'beforeSubmit' callback returns false then the form will
- * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data
- * in array format, the jQuery object, and the options object passed into ajaxSubmit.
- * The form data array takes the following form:
- *
- *     [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
- *
- * If a 'success' callback method is provided it is invoked after the response has been returned
- * from the server.  It is passed the responseText or responseXML value (depending on dataType).
- * See jQuery.ajax for further details.
- *
- *
- * The dataType option provides a means for specifying how the server response should be handled.
- * This maps directly to the jQuery.httpData method.  The following values are supported:
- *
- *      'xml':    if dataType == 'xml' the server response is treated as XML and the 'success'
- *                   callback method, if specified, will be passed the responseXML value
- *      'json':   if dataType == 'json' the server response will be evaluted and passed to
- *                   the 'success' callback, if specified
- *      'script': if dataType == 'script' the server response is evaluated in the global context
- *
- *
- * Note that it does not make sense to use both the 'target' and 'dataType' options.  If both
- * are provided the target will be ignored.
- *
- * The semantic argument can be used to force form serialization in semantic order.
- * This is normally true anyway, unless the form contains input elements of type='image'.
- * If your form must be submitted with name/value pairs in semantic order and your form
- * contains an input of type='image" then pass true for this arg, otherwise pass false
- * (or nothing) to avoid the overhead for this logic.
- *
- *
- * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this:
- *
- * $("#form-id").submit(function() {
- *     $(this).ajaxSubmit(options);
- *     return false; // cancel conventional submit
- * });
- *
- * When using ajaxForm(), however, this is done for you.
- *
- * @example
- * $('#myForm').ajaxSubmit(function(data) {
- *     alert('Form submit succeeded! Server returned: ' + data);
- * });
- * @desc Submit form and alert server response
- *
- *
- * @example
- * var options = {
- *     target: '#myTargetDiv'
- * };
- * $('#myForm').ajaxSubmit(options);
- * @desc Submit form and update page element with server response
- *
- *
- * @example
- * var options = {
- *     success: function(responseText) {
- *         alert(responseText);
- *     }
- * };
- * $('#myForm').ajaxSubmit(options);
- * @desc Submit form and alert the server response
- *
- *
- * @example
- * var options = {
- *     beforeSubmit: function(formArray, jqForm) {
- *         if (formArray.length == 0) {
- *             alert('Please enter data.');
- *             return false;
- *         }
- *     }
- * };
- * $('#myForm').ajaxSubmit(options);
- * @desc Pre-submit validation which aborts the submit operation if form data is empty
- *
- *
- * @example
- * var options = {
- *     url: myJsonUrl.php,
- *     dataType: 'json',
- *     success: function(data) {
- *        // 'data' is an object representing the the evaluated json data
- *     }
- * };
- * $('#myForm').ajaxSubmit(options);
- * @desc json data returned and evaluated
- *
- *
- * @example
- * var options = {
- *     url: myXmlUrl.php,
- *     dataType: 'xml',
- *     success: function(responseXML) {
- *        // responseXML is XML document object
- *        var data = $('myElement', responseXML).text();
- *     }
- * };
- * $('#myForm').ajaxSubmit(options);
- * @desc XML data returned from server
- *
- *
- * @example
- * var options = {
- *     resetForm: true
- * };
- * $('#myForm').ajaxSubmit(options);
- * @desc submit form and reset it if successful
- *
- * @example
- * $('#myForm).submit(function() {
- *    $(this).ajaxSubmit();
- *    return false;
- * });
- * @desc Bind form's submit event to use ajaxSubmit
- *
- *
- * @name ajaxSubmit
- * @type jQuery
- * @param options  object literal containing options which control the form submission process
- * @cat Plugins/Form
- * @return jQuery
- */
-$.fn.ajaxSubmit = function(options) {
-    if (typeof options == 'function')
-        options = { success: options };
-
-    options = $.extend({
-        url:  this.attr('action') || window.location.toString(),
-        type: this.attr('method') || 'GET'
-    }, options || {});
-
-    // hook for manipulating the form data before it is extracted;
-    // convenient for use with rich editors like tinyMCE or FCKEditor
-    var veto = {};
-    $.event.trigger('form.pre.serialize', [this, options, veto]);
-    if (veto.veto) return this;
-
-    var a = this.formToArray(options.semantic);
-	if (options.data) {
-	    for (var n in options.data)
-	        a.push( { name: n, value: options.data[n] } );
-	}
-
-    // give pre-submit callback an opportunity to abort the submit
-    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this;
-
-    // fire vetoable 'validate' event
-    $.event.trigger('form.submit.validate', [a, this, options, veto]);
-    if (veto.veto) return this;
-
-    var q = $.param(a);//.replace(/%20/g,'+');
-
-    if (options.type.toUpperCase() == 'GET') {
-        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
-        options.data = null;  // data is null for 'get'
-    }
-    else
-        options.data = q; // data is the query string for 'post'
-
-    var $form = this, callbacks = [];
-    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
-    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
-
-    // perform a load on the target only if dataType is not provided
-    if (!options.dataType && options.target) {
-        var oldSuccess = options.success || function(){};
-        callbacks.push(function(data) {
-            if (this.evalScripts)
-                $(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, arguments);
-            else // jQuery v1.1.4
-                $(options.target).html(data).each(oldSuccess, arguments);
-        });
-    }
-    else if (options.success)
-        callbacks.push(options.success);
-
-    options.success = function(data, status) {
-        for (var i=0, max=callbacks.length; i < max; i++)
-            callbacks[i](data, status, $form);
-    };
-
-    // are there files to upload?
-    var files = $('input:file', this).fieldValue();
-    var found = false;
-    for (var j=0; j < files.length; j++)
-        if (files[j])
-            found = true;
-
-    // options.iframe allows user to force iframe mode
-   if (options.iframe || found) { 
-       // hack to fix Safari hang (thanks to Tim Molendijk for this)
-       // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
-       if ($.browser.safari && options.closeKeepAlive)
-           $.get(options.closeKeepAlive, fileUpload);
-       else
-           fileUpload();
-       }
-   else
-       $.ajax(options);
-
-    // fire 'notify' event
-    $.event.trigger('form.submit.notify', [this, options]);
-    return this;
-
-
-    // private function for handling file uploads (hat tip to YAHOO!)
-    function fileUpload() {
-        var form = $form[0];
-        var opts = $.extend({}, $.ajaxSettings, options);
-
-        var id = 'jqFormIO' + $.fn.ajaxSubmit.counter++;
-        var $io = $('<iframe id="' + id + '" name="' + id + '" />');
-        var io = $io[0];
-        var op8 = $.browser.opera && window.opera.version() < 9;
-        if ($.browser.msie || op8) io.src = 'javascript:false;document.write("");';
-        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
-
-        var xhr = { // mock object
-            responseText: null,
-            responseXML: null,
-            status: 0,
-            statusText: 'n/a',
-            getAllResponseHeaders: function() {},
-            getResponseHeader: function() {},
-            setRequestHeader: function() {}
-        };
-
-        var g = opts.global;
-        // trigger ajax global events so that activity/block indicators work like normal
-        if (g && ! $.active++) $.event.trigger("ajaxStart");
-        if (g) $.event.trigger("ajaxSend", [xhr, opts]);
-
-        var cbInvoked = 0;
-        var timedOut = 0;
-
-        // take a breath so that pending repaints get some cpu time before the upload starts
-        setTimeout(function() {
-            // make sure form attrs are set
-            var encAttr = form.encoding ? 'encoding' : 'enctype';
-            var t = $form.attr('target');
-            $form.attr({
-                target:   id,
-                method:  'POST',
-                action:   opts.url
-            });
-            form[encAttr] = 'multipart/form-data';
-
-            // support timout
-            if (opts.timeout)
-                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
-
-            // add iframe to doc and submit the form
-            $io.appendTo('body');
-            io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
-            form.submit();
-            $form.attr('target', t); // reset target
-        }, 10);
-
-        function cb() {
-            if (cbInvoked++) return;
-
-            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
-
-            var ok = true;
-            try {
-                if (timedOut) throw 'timeout';
-                // extract the server response from the iframe
-                var data, doc;
-                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
-                xhr.responseText = doc.body ? doc.body.innerHTML : null;
-                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
-
-                if (opts.dataType == 'json' || opts.dataType == 'script') {
-                    var ta = doc.getElementsByTagName('textarea')[0];
-                    data = ta ? ta.value : xhr.responseText;
-                    if (opts.dataType == 'json')
-                        eval("data = " + data);
-                    else
-                        $.globalEval(data);
-                }
-                else if (opts.dataType == 'xml') {
-                    data = xhr.responseXML;
-                    if (!data && xhr.responseText != null)
-                        data = toXml(xhr.responseText);
-                }
-                else {
-                    data = xhr.responseText;
-                }
-            }
-            catch(e){
-                ok = false;
-                $.handleError(opts, xhr, 'error', e);
-            }
-
-            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
-            if (ok) {
-                opts.success(data, 'success');
-                if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
-            }
-            if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
-            if (g && ! --$.active) $.event.trigger("ajaxStop");
-            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
-
-            // clean up
-            setTimeout(function() {
-                $io.remove();
-                xhr.responseXML = null;
-            }, 100);
-        };
-
-        function toXml(s, doc) {
-            if (window.ActiveXObject) {
-                doc = new ActiveXObject('Microsoft.XMLDOM');
-                doc.async = 'false';
-                doc.loadXML(s);
-            }
-            else
-                doc = (new DOMParser()).parseFromString(s, 'text/xml');
-            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
-        };
-    };
-};
-$.fn.ajaxSubmit.counter = 0; // used to create unique iframe ids
-
-/**
- * ajaxForm() provides a mechanism for fully automating form submission.
- *
- * The advantages of using this method instead of ajaxSubmit() are:
- *
- * 1: This method will include coordinates for <input type="image" /> elements (if the element
- *    is used to submit the form).
- * 2. This method will include the submit element's name/value data (for the element that was
- *    used to submit the form).
- * 3. This method binds the submit() method to the form for you.
- *
- * Note that for accurate x/y coordinates of image submit elements in all browsers
- * you need to also use the "dimensions" plugin (this method will auto-detect its presence).
- *
- * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
- * passes the options argument along after properly binding events for submit elements and
- * the form itself.  See ajaxSubmit for a full description of the options argument.
- *
- *
- * @example
- * var options = {
- *     target: '#myTargetDiv'
- * };
- * $('#myForm').ajaxSForm(options);
- * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response
- *       when the form is submitted.
- *
- *
- * @example
- * var options = {
- *     success: function(responseText) {
- *         alert(responseText);
- *     }
- * };
- * $('#myForm').ajaxSubmit(options);
- * @desc Bind form's submit event so that server response is alerted after the form is submitted.
- *
- *
- * @example
- * var options = {
- *     beforeSubmit: function(formArray, jqForm) {
- *         if (formArray.length == 0) {
- *             alert('Please enter data.');
- *             return false;
- *         }
- *     }
- * };
- * $('#myForm').ajaxSubmit(options);
- * @desc Bind form's submit event so that pre-submit callback is invoked before the form
- *       is submitted.
- *
- *
- * @name   ajaxForm
- * @param  options  object literal containing options which control the form submission process
- * @return jQuery
- * @cat    Plugins/Form
- * @type   jQuery
- */
-$.fn.ajaxForm = function(options) {
-    return this.ajaxFormUnbind().submit(submitHandler).each(function() {
-        // store options in hash
-        this.formPluginId = $.fn.ajaxForm.counter++;
-        $.fn.ajaxForm.optionHash[this.formPluginId] = options;
-        $(":submit,input:image", this).click(clickHandler);
-    });
-};
-
-$.fn.ajaxForm.counter = 1;
-$.fn.ajaxForm.optionHash = {};
-
-function clickHandler(e) {
-    var $form = this.form;
-    $form.clk = this;
-    if (this.type == 'image') {
-        if (e.offsetX != undefined) {
-            $form.clk_x = e.offsetX;
-            $form.clk_y = e.offsetY;
-        } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
-            var offset = $(this).offset();
-            $form.clk_x = e.pageX - offset.left;
-            $form.clk_y = e.pageY - offset.top;
-        } else {
-            $form.clk_x = e.pageX - this.offsetLeft;
-            $form.clk_y = e.pageY - this.offsetTop;
-        }
-    }
-    // clear form vars
-    setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10);
-};
-
-function submitHandler() {
-    // retrieve options from hash
-    var id = this.formPluginId;
-    var options = $.fn.ajaxForm.optionHash[id];
-    $(this).ajaxSubmit(options);
-    return false;
-};
-
-/**
- * ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
- *
- * @name   ajaxFormUnbind
- * @return jQuery
- * @cat    Plugins/Form
- * @type   jQuery
- */
-$.fn.ajaxFormUnbind = function() {
-    this.unbind('submit', submitHandler);
-    return this.each(function() {
-        $(":submit,input:image", this).unbind('click', clickHandler);
-    });
-
-};
-
-/**
- * formToArray() gathers form element data into an array of objects that can
- * be passed to any of the following ajax functions: $.get, $.post, or load.
- * Each object in the array has both a 'name' and 'value' property.  An example of
- * an array for a simple login form might be:
- *
- * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
- *
- * It is this array that is passed to pre-submit callback functions provided to the
- * ajaxSubmit() and ajaxForm() methods.
- *
- * The semantic argument can be used to force form serialization in semantic order.
- * This is normally true anyway, unless the form contains input elements of type='image'.
- * If your form must be submitted with name/value pairs in semantic order and your form
- * contains an input of type='image" then pass true for this arg, otherwise pass false
- * (or nothing) to avoid the overhead for this logic.
- *
- * @example var data = $("#myForm").formToArray();
- * $.post( "myscript.cgi", data );
- * @desc Collect all the data from a form and submit it to the server.
- *
- * @name formToArray
- * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
- * @type Array<Object>
- * @cat Plugins/Form
- */
-$.fn.formToArray = function(semantic) {
-    var a = [];
-    if (this.length == 0) return a;
-
-    var form = this[0];
-    var els = semantic ? form.getElementsByTagName('*') : form.elements;
-    if (!els) return a;
-    for(var i=0, max=els.length; i < max; i++) {
-        var el = els[i];
-        var n = el.name;
-        if (!n) continue;
-
-        if (semantic && form.clk && el.type == "image") {
-            // handle image inputs on the fly when semantic == true
-            if(!el.disabled && form.clk == el)
-                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
-            continue;
-        }
-
-        var v = $.fieldValue(el, true);
-        if (v && v.constructor == Array) {
-            for(var j=0, jmax=v.length; j < jmax; j++)
-                a.push({name: n, value: v[j]});
-        }
-        else if (v !== null && typeof v != 'undefined')
-            a.push({name: n, value: v});
-    }
-
-    if (!semantic && form.clk) {
-        // input type=='image' are not found in elements array! handle them here
-        var inputs = form.getElementsByTagName("input");
-        for(var i=0, max=inputs.length; i < max; i++) {
-            var input = inputs[i];
-            var n = input.name;
-            if(n && !input.disabled && input.type == "image" && form.clk == input)
-                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
-        }
-    }
-    return a;
-};
-
-
-/**
- * Serializes form data into a 'submittable' string. This method will return a string
- * in the format: name1=value1&amp;name2=value2
- *
- * The semantic argument can be used to force form serialization in semantic order.
- * If your form must be submitted with name/value pairs in semantic order then pass
- * true for this arg, otherwise pass false (or nothing) to avoid the overhead for
- * this logic (which can be significant for very large forms).
- *
- * @example var data = $("#myForm").formSerialize();
- * $.ajax('POST', "myscript.cgi", data);
- * @desc Collect all the data from a form into a single string
- *
- * @name formSerialize
- * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
- * @type String
- * @cat Plugins/Form
- */
-$.fn.formSerialize = function(semantic) {
-    //hand off to jQuery.param for proper encoding
-    return $.param(this.formToArray(semantic));
-};
-
-
-/**
- * Serializes all field elements in the jQuery object into a query string.
- * This method will return a string in the format: name1=value1&amp;name2=value2
- *
- * The successful argument controls whether or not serialization is limited to
- * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
- * The default value of the successful argument is true.
- *
- * @example var data = $("input").formSerialize();
- * @desc Collect the data from all successful input elements into a query string
- *
- * @example var data = $(":radio").formSerialize();
- * @desc Collect the data from all successful radio input elements into a query string
- *
- * @example var data = $("#myForm :checkbox").formSerialize();
- * @desc Collect the data from all successful checkbox input elements in myForm into a query string
- *
- * @example var data = $("#myForm :checkbox").formSerialize(false);
- * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string
- *
- * @example var data = $(":input").formSerialize();
- * @desc Collect the data from all successful input, select, textarea and button elements into a query string
- *
- * @name fieldSerialize
- * @param successful true if only successful controls should be serialized (default is true)
- * @type String
- * @cat Plugins/Form
- */
-$.fn.fieldSerialize = function(successful) {
-    var a = [];
-    this.each(function() {
-        var n = this.name;
-        if (!n) return;
-        var v = $.fieldValue(this, successful);
-        if (v && v.constructor == Array) {
-            for (var i=0,max=v.length; i < max; i++)
-                a.push({name: n, value: v[i]});
-        }
-        else if (v !== null && typeof v != 'undefined')
-            a.push({name: this.name, value: v});
-    });
-    //hand off to jQuery.param for proper encoding
-    return $.param(a);
-};
-
-
-/**
- * Returns the value(s) of the element in the matched set.  For example, consider the following form:
- *
- *  <form><fieldset>
- *      <input name="A" type="text" />
- *      <input name="A" type="text" />
- *      <input name="B" type="checkbox" value="B1" />
- *      <input name="B" type="checkbox" value="B2"/>
- *      <input name="C" type="radio" value="C1" />
- *      <input name="C" type="radio" value="C2" />
- *  </fieldset></form>
- *
- *  var v = $(':text').fieldValue();
- *  // if no values are entered into the text inputs
- *  v == ['','']
- *  // if values entered into the text inputs are 'foo' and 'bar'
- *  v == ['foo','bar']
- *
- *  var v = $(':checkbox').fieldValue();
- *  // if neither checkbox is checked
- *  v === undefined
- *  // if both checkboxes are checked
- *  v == ['B1', 'B2']
- *
- *  var v = $(':radio').fieldValue();
- *  // if neither radio is checked
- *  v === undefined
- *  // if first radio is checked
- *  v == ['C1']
- *
- * The successful argument controls whether or not the field element must be 'successful'
- * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
- * The default value of the successful argument is true.  If this value is false the value(s)
- * for each element is returned.
- *
- * Note: This method *always* returns an array.  If no valid value can be determined the
- *       array will be empty, otherwise it will contain one or more values.
- *
- * @example var data = $("#myPasswordElement").fieldValue();
- * alert(data[0]);
- * @desc Alerts the current value of the myPasswordElement element
- *
- * @example var data = $("#myForm :input").fieldValue();
- * @desc Get the value(s) of the form elements in myForm
- *
- * @example var data = $("#myForm :checkbox").fieldValue();
- * @desc Get the value(s) for the successful checkbox element(s) in the jQuery object.
- *
- * @example var data = $("#mySingleSelect").fieldValue();
- * @desc Get the value(s) of the select control
- *
- * @example var data = $(':text').fieldValue();
- * @desc Get the value(s) of the text input or textarea elements
- *
- * @example var data = $("#myMultiSelect").fieldValue();
- * @desc Get the values for the select-multiple control
- *
- * @name fieldValue
- * @param Boolean successful true if only the values for successful controls should be returned (default is true)
- * @type Array<String>
- * @cat Plugins/Form
- */
-$.fn.fieldValue = function(successful) {
-    for (var val=[], i=0, max=this.length; i < max; i++) {
-        var el = this[i];
-        var v = $.fieldValue(el, successful);
-        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
-            continue;
-        v.constructor == Array ? $.merge(val, v) : val.push(v);
-    }
-    return val;
-};
-
-/**
- * Returns the value of the field element.
- *
- * The successful argument controls whether or not the field element must be 'successful'
- * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
- * The default value of the successful argument is true.  If the given element is not
- * successful and the successful arg is not false then the returned value will be null.
- *
- * Note: If the successful flag is true (default) but the element is not successful, the return will be null
- * Note: The value returned for a successful select-multiple element will always be an array.
- * Note: If the element has no value the return value will be undefined.
- *
- * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]);
- * @desc Gets the current value of the myPasswordElement element
- *
- * @name fieldValue
- * @param Element el The DOM element for which the value will be returned
- * @param Boolean successful true if value returned must be for a successful controls (default is true)
- * @type String or Array<String> or null or undefined
- * @cat Plugins/Form
- */
-$.fieldValue = function(el, successful) {
-    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
-    if (typeof successful == 'undefined') successful = true;
-
-    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
-        (t == 'checkbox' || t == 'radio') && !el.checked ||
-        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
-        tag == 'select' && el.selectedIndex == -1))
-            return null;
-
-    if (tag == 'select') {
-        var index = el.selectedIndex;
-        if (index < 0) return null;
-        var a = [], ops = el.options;
-        var one = (t == 'select-one');
-        var max = (one ? index+1 : ops.length);
-        for(var i=(one ? index : 0); i < max; i++) {
-            var op = ops[i];
-            if (op.selected) {
-                // extra pain for IE...
-                var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
-                if (one) return v;
-                a.push(v);
-            }
-        }
-        return a;
-    }
-    return el.value;
-};
-
-
-/**
- * Clears the form data.  Takes the following actions on the form's input fields:
- *  - input text fields will have their 'value' property set to the empty string
- *  - select elements will have their 'selectedIndex' property set to -1
- *  - checkbox and radio inputs will have their 'checked' property set to false
- *  - inputs of type submit, button, reset, and hidden will *not* be effected
- *  - button elements will *not* be effected
- *
- * @example $('form').clearForm();
- * @desc Clears all forms on the page.
- *
- * @name clearForm
- * @type jQuery
- * @cat Plugins/Form
- */
-$.fn.clearForm = function() {
-    return this.each(function() {
-        $('input,select,textarea', this).clearFields();
-    });
-};
-
-/**
- * Clears the selected form elements.  Takes the following actions on the matched elements:
- *  - input text fields will have their 'value' property set to the empty string
- *  - select elements will have their 'selectedIndex' property set to -1
- *  - checkbox and radio inputs will have their 'checked' property set to false
- *  - inputs of type submit, button, reset, and hidden will *not* be effected
- *  - button elements will *not* be effected
- *
- * @example $('.myInputs').clearFields();
- * @desc Clears all inputs with class myInputs
- *
- * @name clearFields
- * @type jQuery
- * @cat Plugins/Form
- */
-$.fn.clearFields = $.fn.clearInputs = function() {
-    return this.each(function() {
-        var t = this.type, tag = this.tagName.toLowerCase();
-        if (t == 'text' || t == 'password' || tag == 'textarea')
-            this.value = '';
-        else if (t == 'checkbox' || t == 'radio')
-            this.checked = false;
-        else if (tag == 'select')
-            this.selectedIndex = -1;
-    });
-};
-
-
-/**
- * Resets the form data.  Causes all form elements to be reset to their original value.
- *
- * @example $('form').resetForm();
- * @desc Resets all forms on the page.
- *
- * @name resetForm
- * @type jQuery
- * @cat Plugins/Form
- */
-$.fn.resetForm = function() {
-    return this.each(function() {
-        // guard against an input with the name of 'reset'
-        // note that IE reports the reset function as an 'object'
-        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
-            this.reset();
-    });
-};
-
-
-/**
- * Enables or disables any matching elements.
- *
- * @example $(':radio').enabled(false);
- * @desc Disables all radio buttons
- *
- * @name select
- * @type jQuery
- * @cat Plugins/Form
- */
-$.fn.enable = function(b) { 
-    if (b == undefined) b = true;
-    return this.each(function() { 
-        this.disabled = !b 
-    });
-};
-
-/**
- * Checks/unchecks any matching checkboxes or radio buttons and
- * selects/deselects and matching option elements.
- *
- * @example $(':checkbox').selected();
- * @desc Checks all checkboxes
- *
- * @name select
- * @type jQuery
- * @cat Plugins/Form
- */
-$.fn.select = function(select) {
-    if (select == undefined) select = true;
-    return this.each(function() { 
-        var t = this.type;
-        if (t == 'checkbox' || t == 'radio')
-            this.checked = select;
-        else if (this.tagName.toLowerCase() == 'option') {
-            var $sel = $(this).parent('select');
-            if (select && $sel[0] && $sel[0].type == 'select-one') {
-                // deselect all other options
-                $sel.find('option').select(false);
-            }
-            this.selected = select;
-        }
-    });
-};
-
-})(jQuery);
--- a/web/wp-content/plugins/gigs-calendar/js/jquery.js	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-/*
- * jQuery 1.2.6 - New Wave Javascript
- *
- * Copyright (c) 2008 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date: 2008-05-27 12:17:26 -0700 (Tue, 27 May 2008) $
- * $Rev: 5700 $
- */
-eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(H(){J w=1c.4I,3n$=1c.$;J D=1c.4I=1c.$=H(a,b){I 2r D.18.5i(a,b)};J u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,61=/^.[^:#\\[\\.]*$/,12;D.18=D.3V={5i:H(d,b){d=d||S;G(d.15){7[0]=d;7.K=1;I 7}G(1j d=="1W"){J c=u.2D(d);G(c&&(c[1]||!b)){G(c[1])d=D.4h([c[1]],b);N{J a=S.60(c[3]);G(a){G(a.2t!=c[3])I D().2u(d);I D(a)}d=[]}}N I D(b).2u(d)}N G(D.1F(d))I D(S)[D.18.25?"25":"3Y"](d);I 7.6V(D.2h(d))},5w:"1.2.6",8H:H(){I 7.K},K:0,3p:H(a){I a==12?D.2h(7):7[a]},2F:H(b){J a=D(b);a.5n=7;I a},6V:H(a){7.K=0;2q.3V.1A.1t(7,a);I 7},P:H(a,b){I D.P(7,a,b)},5h:H(b){J a=-1;I D.2E(b&&b.5w?b[0]:b,7)},1M:H(c,a,b){J d=c;G(c.1q==56)G(a===12)I 7[0]&&D[b||"1M"](7[0],c);N{d={};d[c]=a}I 7.P(H(i){R(c 1k d)D.1M(b?7.V:7,c,D.1e(7,d[c],b,i,c))})},1h:H(b,a){G((b==\'2d\'||b==\'1T\')&&3e(a)<0)a=12;I 7.1M(b,a,"24")},1r:H(b){G(1j b!="3y"&&b!=U)I 7.4F().3s((7[0]&&7[0].2z||S).5J(b));J a="";D.P(b||7,H(){D.P(7.3u,H(){G(7.15!=8)a+=7.15!=1?7.73:D.18.1r([7])})});I a},5W:H(b){G(7[0])D(b,7[0].2z).5y().38(7[0]).2i(H(){J a=7;1G(a.1s)a=a.1s;I a}).3s(7);I 7},8Z:H(a){I 7.P(H(){D(7).6P().5W(a)})},8S:H(a){I 7.P(H(){D(7).5W(a)})},3s:H(){I 7.3S(1a,M,Q,H(a){G(7.15==1)7.49(a)})},6E:H(){I 7.3S(1a,M,M,H(a){G(7.15==1)7.38(a,7.1s)})},6D:H(){I 7.3S(1a,Q,Q,H(a){7.1f.38(a,7)})},5p:H(){I 7.3S(1a,Q,M,H(a){7.1f.38(a,7.2J)})},3m:H(){I 7.5n||D([])},2u:H(b){J c=D.2i(7,H(a){I D.2u(b,a)});I 7.2F(/[^+>] [^+>]/.11(b)||b.1i("..")>-1?D.4u(c):c)},5y:H(e){J f=7.2i(H(){G(D.14.1g&&!D.4o(7)){J a=7.6n(M),5f=S.3t("1w");5f.49(a);I D.4h([5f.4l])[0]}N I 7.6n(M)});J d=f.2u("*").5M().P(H(){G(7[E]!=12)7[E]=U});G(e===M)7.2u("*").5M().P(H(i){G(7.15==3)I;J c=D.L(7,"3x");R(J a 1k c)R(J b 1k c[a])D.W.17(d[i],a,c[a][b],c[a][b].L)});I f},1E:H(b){I 7.2F(D.1F(b)&&D.3G(7,H(a,i){I b.1l(a,i)})||D.3f(b,7))},4W:H(b){G(b.1q==56)G(61.11(b))I 7.2F(D.3f(b,7,M));N b=D.3f(b,7);J a=b.K&&b[b.K-1]!==12&&!b.15;I 7.1E(H(){I a?D.2E(7,b)<0:7!=b})},17:H(a){I 7.2F(D.4u(D.39(7.3p(),1j a==\'1W\'?D(a):D.2h(a))))},3C:H(a){I!!a&&D.3f(a,7).K>0},7V:H(a){I 7.3C("."+a)},6a:H(b){G(b==12){G(7.K){J c=7[0];G(D.Y(c,"2y")){J e=c.63,62=[],16=c.16,2Y=c.O=="2y-2Y";G(e<0)I U;R(J i=2Y?e:0,2e=2Y?e+1:16.K;i<2e;i++){J d=16[i];G(d.3a){b=D.14.1g&&!d.au.2s.aq?d.1r:d.2s;G(2Y)I b;62.1A(b)}}I 62}N I(7[0].2s||"").1o(/\\r/g,"")}I 12}G(b.1q==4N)b+=\'\';I 7.P(H(){G(7.15!=1)I;G(b.1q==2q&&/5R|5A/.11(7.O))7.4M=(D.2E(7.2s,b)>=0||D.2E(7.32,b)>=0);N G(D.Y(7,"2y")){J a=D.2h(b);D("9U",7).P(H(){7.3a=(D.2E(7.2s,a)>=0||D.2E(7.1r,a)>=0)});G(!a.K)7.63=-1}N 7.2s=b})},2I:H(a){I a==12?(7[0]?7[0].4l:U):7.4F().3s(a)},7b:H(a){I 7.5p(a).1Z()},77:H(i){I 7.3w(i,i+1)},3w:H(){I 7.2F(2q.3V.3w.1t(7,1a))},2i:H(b){I 7.2F(D.2i(7,H(a,i){I b.1l(a,i,a)}))},5M:H(){I 7.17(7.5n)},L:H(d,b){J a=d.1Q(".");a[1]=a[1]?"."+a[1]:"";G(b===12){J c=7.5G("9B"+a[1]+"!",[a[0]]);G(c===12&&7.K)c=D.L(7[0],d);I c===12&&a[1]?7.L(a[0]):c}N I 7.1R("9v"+a[1]+"!",[a[0],b]).P(H(){D.L(7,d,b)})},3b:H(a){I 7.P(H(){D.3b(7,a)})},3S:H(g,f,h,d){J e=7.K>1,3z;I 7.P(H(){G(!3z){3z=D.4h(g,7.2z);G(h)3z.9o()}J b=7;G(f&&D.Y(7,"1X")&&D.Y(3z[0],"4H"))b=7.40("22")[0]||7.49(7.2z.3t("22"));J c=D([]);D.P(3z,H(){J a=e?D(7).5y(M)[0]:7;G(D.Y(a,"1m"))c=c.17(a);N{G(a.15==1)c=c.17(D("1m",a).1Z());d.1l(b,a)}});c.P(6R)})}};D.18.5i.3V=D.18;H 6R(i,a){G(a.4e)D.3T({1b:a.4e,31:Q,1L:"1m"});N D.5u(a.1r||a.6N||a.4l||"");G(a.1f)a.1f.30(a)}H 1x(){I+2r 8K}D.1n=D.18.1n=H(){J b=1a[0]||{},i=1,K=1a.K,4B=Q,16;G(b.1q==8I){4B=b;b=1a[1]||{};i=2}G(1j b!="3y"&&1j b!="H")b={};G(K==i){b=7;--i}R(;i<K;i++)G((16=1a[i])!=U)R(J c 1k 16){J a=b[c],2x=16[c];G(b===2x)6L;G(4B&&2x&&1j 2x=="3y"&&!2x.15)b[c]=D.1n(4B,a||(2x.K!=U?[]:{}),2x);N G(2x!==12)b[c]=2x}I b};J E="4I"+1x(),6K=0,5q={},6G=/z-?5h|8B-?8A|1y|6A|8w-?1T/i,3N=S.3N||{};D.1n({8u:H(a){1c.$=3n$;G(a)1c.4I=w;I D},1F:H(a){I!!a&&1j a!="1W"&&!a.Y&&a.1q!=2q&&/^[\\s[]?H/.11(a+"")},4o:H(a){I a.1B&&!a.1d||a.2g&&a.2z&&!a.2z.1d},5u:H(a){a=D.3l(a);G(a){J b=S.40("6v")[0]||S.1B,1m=S.3t("1m");1m.O="1r/4v";G(D.14.1g)1m.1r=a;N 1m.49(S.5J(a));b.38(1m,b.1s);b.30(1m)}},Y:H(b,a){I b.Y&&b.Y.2m()==a.2m()},1Y:{},L:H(c,d,b){c=c==1c?5q:c;J a=c[E];G(!a)a=c[E]=++6K;G(d&&!D.1Y[a])D.1Y[a]={};G(b!==12)D.1Y[a][d]=b;I d?D.1Y[a][d]:a},3b:H(c,b){c=c==1c?5q:c;J a=c[E];G(b){G(D.1Y[a]){3d D.1Y[a][b];b="";R(b 1k D.1Y[a])1V;G(!b)D.3b(c)}}N{23{3d c[E]}21(e){G(c.5k)c.5k(E)}3d D.1Y[a]}},P:H(d,a,c){J e,i=0,K=d.K;G(c){G(K==12){R(e 1k d)G(a.1t(d[e],c)===Q)1V}N R(;i<K;)G(a.1t(d[i++],c)===Q)1V}N{G(K==12){R(e 1k d)G(a.1l(d[e],e,d[e])===Q)1V}N R(J b=d[0];i<K&&a.1l(b,i,b)!==Q;b=d[++i]){}}I d},1e:H(b,a,c,i,d){G(D.1F(a))a=a.1l(b,i);I a&&a.1q==4N&&c=="24"&&!6G.11(d)?a+"2U":a},1D:{17:H(c,b){D.P((b||"").1Q(/\\s+/),H(i,a){G(c.15==1&&!D.1D.3Q(c.1D,a))c.1D+=(c.1D?" ":"")+a})},1Z:H(c,b){G(c.15==1)c.1D=b!=12?D.3G(c.1D.1Q(/\\s+/),H(a){I!D.1D.3Q(b,a)}).6r(" "):""},3Q:H(b,a){I D.2E(a,(b.1D||b).6p().1Q(/\\s+/))>-1}},6o:H(b,c,a){J e={};R(J d 1k c){e[d]=b.V[d];b.V[d]=c[d]}a.1l(b);R(J d 1k c)b.V[d]=e[d]},1h:H(d,e,c){G(e=="2d"||e=="1T"){J b,2L={3c:"5g",5D:"1C",19:"3H"},2S=e=="2d"?["5d","6i"]:["5b","6g"];H 5a(){b=e=="2d"?d.8g:d.8f;J a=0,2A=0;D.P(2S,H(){a+=3e(D.24(d,"55"+7,M))||0;2A+=3e(D.24(d,"2A"+7+"47",M))||0});b-=26.85(a+2A)}G(D(d).3C(":4i"))5a();N D.6o(d,2L,5a);I 26.2e(0,b)}I D.24(d,e,c)},24:H(f,l,k){J e,V=f.V;H 4d(b){G(!D.14.2f)I Q;J a=3N.53(b,U);I!a||a.52("4d")==""}G(l=="1y"&&D.14.1g){e=D.1M(V,"1y");I e==""?"1":e}G(D.14.2H&&l=="19"){J d=V.50;V.50="0 7Z 7Y";V.50=d}G(l.1I(/4g/i))l=y;G(!k&&V&&V[l])e=V[l];N G(3N.53){G(l.1I(/4g/i))l="4g";l=l.1o(/([A-Z])/g,"-$1").3h();J c=3N.53(f,U);G(c&&!4d(f))e=c.52(l);N{J g=[],2G=[],a=f,i=0;R(;a&&4d(a);a=a.1f)2G.6b(a);R(;i<2G.K;i++)G(4d(2G[i])){g[i]=2G[i].V.19;2G[i].V.19="3H"}e=l=="19"&&g[2G.K-1]!=U?"2P":(c&&c.52(l))||"";R(i=0;i<g.K;i++)G(g[i]!=U)2G[i].V.19=g[i]}G(l=="1y"&&e=="")e="1"}N G(f.4f){J h=l.1o(/\\-(\\w)/g,H(a,b){I b.2m()});e=f.4f[l]||f.4f[h];G(!/^\\d+(2U)?$/i.11(e)&&/^\\d/.11(e)){J j=V.1z,65=f.64.1z;f.64.1z=f.4f.1z;V.1z=e||0;e=V.aO+"2U";V.1z=j;f.64.1z=65}}I e},4h:H(l,h){J k=[];h=h||S;G(1j h.3t==\'12\')h=h.2z||h[0]&&h[0].2z||S;D.P(l,H(i,d){G(!d)I;G(d.1q==4N)d+=\'\';G(1j d=="1W"){d=d.1o(/(<(\\w+)[^>]*?)\\/>/g,H(b,a,c){I c.1I(/^(aN|43|7E|aH|4t|7z|aE|3A|aB|aA|az)$/i)?b:a+"></"+c+">"});J f=D.3l(d).3h(),1w=h.3t("1w");J e=!f.1i("<av")&&[1,"<2y 7u=\'7u\'>","</2y>"]||!f.1i("<at")&&[1,"<7t>","</7t>"]||f.1I(/^<(ar|22|ap|al|aj)/)&&[1,"<1X>","</1X>"]||!f.1i("<4H")&&[2,"<1X><22>","</22></1X>"]||(!f.1i("<ah")||!f.1i("<ae"))&&[3,"<1X><22><4H>","</4H></22></1X>"]||!f.1i("<7E")&&[2,"<1X><22></22><7p>","</7p></1X>"]||D.14.1g&&[1,"1w<1w>","</1w>"]||[0,"",""];1w.4l=e[1]+d+e[2];1G(e[0]--)1w=1w.5U;G(D.14.1g){J g=!f.1i("<1X")&&f.1i("<22")<0?1w.1s&&1w.1s.3u:e[1]=="<1X>"&&f.1i("<22")<0?1w.3u:[];R(J j=g.K-1;j>=0;--j)G(D.Y(g[j],"22")&&!g[j].3u.K)g[j].1f.30(g[j]);G(/^\\s/.11(d))1w.38(h.5J(d.1I(/^\\s*/)[0]),1w.1s)}d=D.2h(1w.3u)}G(d.K===0&&(!D.Y(d,"45")&&!D.Y(d,"2y")))I;G(d[0]==12||D.Y(d,"45")||d.16)k.1A(d);N k=D.39(k,d)});I k},1M:H(d,f,c){G(!d||d.15==3||d.15==8)I 12;J e=!D.4o(d),3W=c!==12,1g=D.14.1g;f=e&&D.2L[f]||f;G(d.2g){J g=/5x|4e|V/.11(f);G(f=="3a"&&D.14.2f)d.1f.63;G(f 1k d&&e&&!g){G(3W){G(f=="O"&&D.Y(d,"4t")&&d.1f)7m"O a5 a2\'t 9Z 9W";d[f]=c}G(D.Y(d,"45")&&d.7i(f))I d.7i(f).73;I d[f]}G(1g&&e&&f=="V")I D.1M(d.V,"9V",c);G(3W)d.9T(f,""+c);J h=1g&&e&&g?d.4K(f,2):d.4K(f);I h===U?12:h}G(1g&&f=="1y"){G(3W){d.6A=1;d.1E=(d.1E||"").1o(/7d\\([^)]*\\)/,"")+(3v(c)+\'\'=="9P"?"":"7d(1y="+c*79+")")}I d.1E&&d.1E.1i("1y=")>=0?(3e(d.1E.1I(/1y=([^)]*)/)[1])/79)+\'\':""}f=f.1o(/-([a-z])/9M,H(a,b){I b.2m()});G(3W)d[f]=c;I d[f]},3l:H(a){I(a||"").1o(/^\\s+|\\s+$/g,"")},2h:H(b){J a=[];G(b!=U){J i=b.K;G(i==U||b.1Q||b.4L||b.1l)a[0]=b;N 1G(i)a[--i]=b[i]}I a},2E:H(b,a){R(J i=0,K=a.K;i<K;i++)G(a[i]===b)I i;I-1},39:H(a,b){J i=0,T,36=a.K;G(D.14.1g){1G(T=b[i++])G(T.15!=8)a[36++]=T}N 1G(T=b[i++])a[36++]=T;I a},4u:H(a){J c=[],2w={};23{R(J i=0,K=a.K;i<K;i++){J b=D.L(a[i]);G(!2w[b]){2w[b]=M;c.1A(a[i])}}}21(e){c=a}I c},3G:H(c,a,d){J b=[];R(J i=0,K=c.K;i<K;i++)G(!d!=!a(c[i],i))b.1A(c[i]);I b},2i:H(d,a){J c=[];R(J i=0,K=d.K;i<K;i++){J b=a(d[i],i);G(b!=U)c[c.K]=b}I c.75.1t([],c)}});J v=9E.9C.3h();D.14={5F:(v.1I(/.+(?:9A|9z|9y|9w)[\\/: ]([\\d.]+)/)||[])[1],2f:/72/.11(v),2H:/2H/.11(v),1g:/1g/.11(v)&&!/2H/.11(v),3r:/3r/.11(v)&&!/(9s|72)/.11(v)};J y=D.14.1g?"70":"6Z";D.1n({6Y:!D.14.1g||S.6X=="6W",2L:{"R":"9n","9m":"1D","4g":y,6Z:y,70:y,9j:"9h",9g:"9e",9d:"9b",9a:"99"}});D.P({6S:H(a){I a.1f},96:H(a){I D.4T(a,"1f")},93:H(a){I D.2V(a,2,"2J")},90:H(a){I D.2V(a,2,"4D")},8Y:H(a){I D.4T(a,"2J")},8X:H(a){I D.4T(a,"4D")},8W:H(a){I D.5v(a.1f.1s,a)},8V:H(a){I D.5v(a.1s)},6P:H(a){I D.Y(a,"8U")?a.8T||a.8R.S:D.2h(a.3u)}},H(c,d){D.18[c]=H(b){J a=D.2i(7,d);G(b&&1j b=="1W")a=D.3f(b,a);I 7.2F(D.4u(a))}});D.P({6O:"3s",8Q:"6E",38:"6D",8P:"5p",8O:"7b"},H(c,b){D.18[c]=H(){J a=1a;I 7.P(H(){R(J i=0,K=a.K;i<K;i++)D(a[i])[b](7)})}});D.P({8N:H(a){D.1M(7,a,"");G(7.15==1)7.5k(a)},8M:H(a){D.1D.17(7,a)},8L:H(a){D.1D.1Z(7,a)},8J:H(a){D.1D[D.1D.3Q(7,a)?"1Z":"17"](7,a)},1Z:H(a){G(!a||D.1E(a,[7]).r.K){D("*",7).17(7).P(H(){D.W.1Z(7);D.3b(7)});G(7.1f)7.1f.30(7)}},4F:H(){D(">*",7).1Z();1G(7.1s)7.30(7.1s)}},H(a,b){D.18[a]=H(){I 7.P(b,1a)}});D.P(["6M","47"],H(i,c){J b=c.3h();D.18[b]=H(a){I 7[0]==1c?D.14.2H&&S.1d["5t"+c]||D.14.2f&&1c["5s"+c]||S.6X=="6W"&&S.1B["5t"+c]||S.1d["5t"+c]:7[0]==S?26.2e(26.2e(S.1d["4A"+c],S.1B["4A"+c]),26.2e(S.1d["2k"+c],S.1B["2k"+c])):a==12?(7.K?D.1h(7[0],b):U):7.1h(b,a.1q==56?a:a+"2U")}});H 2a(a,b){I a[0]&&3v(D.24(a[0],b,M),10)||0}J C=D.14.2f&&3v(D.14.5F)<8G?"(?:[\\\\w*3n-]|\\\\\\\\.)":"(?:[\\\\w\\8F-\\8E*3n-]|\\\\\\\\.)",6J=2r 4y("^>\\\\s*("+C+"+)"),6I=2r 4y("^("+C+"+)(#)("+C+"+)"),6H=2r 4y("^([#.]?)("+C+"*)");D.1n({6F:{"":H(a,i,m){I m[2]=="*"||D.Y(a,m[2])},"#":H(a,i,m){I a.4K("2t")==m[2]},":":{8D:H(a,i,m){I i<m[3]-0},8C:H(a,i,m){I i>m[3]-0},2V:H(a,i,m){I m[3]-0==i},77:H(a,i,m){I m[3]-0==i},3o:H(a,i){I i==0},3P:H(a,i,m,r){I i==r.K-1},6C:H(a,i){I i%2==0},6B:H(a,i){I i%2},"3o-4w":H(a){I a.1f.40("*")[0]==a},"3P-4w":H(a){I D.2V(a.1f.5U,1,"4D")==a},"8z-4w":H(a){I!D.2V(a.1f.5U,2,"4D")},6S:H(a){I a.1s},4F:H(a){I!a.1s},8y:H(a,i,m){I(a.6N||a.8x||D(a).1r()||"").1i(m[3])>=0},4i:H(a){I"1C"!=a.O&&D.1h(a,"19")!="2P"&&D.1h(a,"5D")!="1C"},1C:H(a){I"1C"==a.O||D.1h(a,"19")=="2P"||D.1h(a,"5D")=="1C"},8v:H(a){I!a.3O},3O:H(a){I a.3O},4M:H(a){I a.4M},3a:H(a){I a.3a||D.1M(a,"3a")},1r:H(a){I"1r"==a.O},5R:H(a){I"5R"==a.O},5A:H(a){I"5A"==a.O},5o:H(a){I"5o"==a.O},3K:H(a){I"3K"==a.O},5m:H(a){I"5m"==a.O},6z:H(a){I"6z"==a.O},6y:H(a){I"6y"==a.O},2p:H(a){I"2p"==a.O||D.Y(a,"2p")},4t:H(a){I/4t|2y|6x|2p/i.11(a.Y)},3Q:H(a,i,m){I D.2u(m[3],a).K},8t:H(a){I/h\\d/i.11(a.Y)},8s:H(a){I D.3G(D.3M,H(b){I a==b.T}).K}}},6w:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,2r 4y("^([:.#]*)("+C+"+)")],3f:H(a,c,b){J d,1u=[];1G(a&&a!=d){d=a;J f=D.1E(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1u=b?c=f.r:D.39(1u,f.r)}I 1u},2u:H(t,o){G(1j t!="1W")I[t];G(o&&o.15!=1&&o.15!=9)I[];o=o||S;J d=[o],2w=[],3P,Y;1G(t&&3P!=t){J r=[];3P=t;t=D.3l(t);J l=Q,3k=6J,m=3k.2D(t);G(m){Y=m[1].2m();R(J i=0;d[i];i++)R(J c=d[i].1s;c;c=c.2J)G(c.15==1&&(Y=="*"||c.Y.2m()==Y))r.1A(c);d=r;t=t.1o(3k,"");G(t.1i(" ")==0)6L;l=M}N{3k=/^([>+~])\\s*(\\w*)/i;G((m=3k.2D(t))!=U){r=[];J k={};Y=m[2].2m();m=m[1];R(J j=0,3j=d.K;j<3j;j++){J n=m=="~"||m=="+"?d[j].2J:d[j].1s;R(;n;n=n.2J)G(n.15==1){J g=D.L(n);G(m=="~"&&k[g])1V;G(!Y||n.Y.2m()==Y){G(m=="~")k[g]=M;r.1A(n)}G(m=="+")1V}}d=r;t=D.3l(t.1o(3k,""));l=M}}G(t&&!l){G(!t.1i(",")){G(o==d[0])d.4s();2w=D.39(2w,d);r=d=[o];t=" "+t.6t(1,t.K)}N{J h=6I;J m=h.2D(t);G(m){m=[0,m[2],m[3],m[1]]}N{h=6H;m=h.2D(t)}m[2]=m[2].1o(/\\\\/g,"");J f=d[d.K-1];G(m[1]=="#"&&f&&f.60&&!D.4o(f)){J p=f.60(m[2]);G((D.14.1g||D.14.2H)&&p&&1j p.2t=="1W"&&p.2t!=m[2])p=D(\'[@2t="\'+m[2]+\'"]\',f)[0];d=r=p&&(!m[3]||D.Y(p,m[3]))?[p]:[]}N{R(J i=0;d[i];i++){J a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];G(a=="*"&&d[i].Y.3h()=="3y")a="3A";r=D.39(r,d[i].40(a))}G(m[1]==".")r=D.5l(r,m[2]);G(m[1]=="#"){J e=[];R(J i=0;r[i];i++)G(r[i].4K("2t")==m[2]){e=[r[i]];1V}r=e}d=r}t=t.1o(h,"")}}G(t){J b=D.1E(t,r);d=r=b.r;t=D.3l(b.t)}}G(t)d=[];G(d&&o==d[0])d.4s();2w=D.39(2w,d);I 2w},5l:H(r,m,a){m=" "+m+" ";J c=[];R(J i=0;r[i];i++){J b=(" "+r[i].1D+" ").1i(m)>=0;G(!a&&b||a&&!b)c.1A(r[i])}I c},1E:H(t,r,h){J d;1G(t&&t!=d){d=t;J p=D.6w,m;R(J i=0;p[i];i++){m=p[i].2D(t);G(m){t=t.8r(m[0].K);m[2]=m[2].1o(/\\\\/g,"");1V}}G(!m)1V;G(m[1]==":"&&m[2]=="4W")r=61.11(m[3])?D.1E(m[3],r,M).r:D(r).4W(m[3]);N G(m[1]==".")r=D.5l(r,m[2],h);N G(m[1]=="["){J g=[],O=m[3];R(J i=0,3j=r.K;i<3j;i++){J a=r[i],z=a[D.2L[m[2]]||m[2]];G(z==U||/5x|4e|3a/.11(m[2]))z=D.1M(a,m[2])||\'\';G((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1i(m[5])||O=="$="&&z.6t(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1i(m[5])>=0)^h)g.1A(a)}r=g}N G(m[1]==":"&&m[2]=="2V-4w"){J e={},g=[],11=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2D(m[3]=="6C"&&"2n"||m[3]=="6B"&&"2n+1"||!/\\D/.11(m[3])&&"8q+"+m[3]||m[3]),3o=(11[1]+(11[2]||1))-0,d=11[3]-0;R(J i=0,3j=r.K;i<3j;i++){J j=r[i],1f=j.1f,2t=D.L(1f);G(!e[2t]){J c=1;R(J n=1f.1s;n;n=n.2J)G(n.15==1)n.4r=c++;e[2t]=M}J b=Q;G(3o==0){G(j.4r==d)b=M}N G((j.4r-d)%3o==0&&(j.4r-d)/3o>=0)b=M;G(b^h)g.1A(j)}r=g}N{J f=D.6F[m[1]];G(1j f=="3y")f=f[m[2]];G(1j f=="1W")f=6s("Q||H(a,i){I "+f+";}");r=D.3G(r,H(a,i){I f(a,i,m,r)},h)}}I{r:r,t:t}},4T:H(b,c){J a=[],1u=b[c];1G(1u&&1u!=S){G(1u.15==1)a.1A(1u);1u=1u[c]}I a},2V:H(a,e,c,b){e=e||1;J d=0;R(;a;a=a[c])G(a.15==1&&++d==e)1V;I a},5v:H(n,a){J r=[];R(;n;n=n.2J){G(n.15==1&&n!=a)r.1A(n)}I r}});D.W={17:H(f,i,g,e){G(f.15==3||f.15==8)I;G(D.14.1g&&f.4L)f=1c;G(!g.29)g.29=7.29++;G(e!=12){J h=g;g=7.3J(h,H(){I h.1t(7,1a)});g.L=e}J j=D.L(f,"3x")||D.L(f,"3x",{}),1H=D.L(f,"1H")||D.L(f,"1H",H(){G(1j D!="12"&&!D.W.5j)I D.W.1H.1t(1a.3I.T,1a)});1H.T=f;D.P(i.1Q(/\\s+/),H(c,b){J a=b.1Q(".");b=a[0];g.O=a[1];J d=j[b];G(!d){d=j[b]={};G(!D.W.2C[b]||D.W.2C[b].4q.1l(f)===Q){G(f.4a)f.4a(b,1H,Q);N G(f.6q)f.6q("4p"+b,1H)}}d[g.29]=g;D.W.28[b]=M});f=U},29:1,28:{},1Z:H(e,h,f){G(e.15==3||e.15==8)I;J i=D.L(e,"3x"),1K,5h;G(i){G(h==12||(1j h=="1W"&&h.8p(0)=="."))R(J g 1k i)7.1Z(e,g+(h||""));N{G(h.O){f=h.2o;h=h.O}D.P(h.1Q(/\\s+/),H(b,a){J c=a.1Q(".");a=c[0];G(i[a]){G(f)3d i[a][f.29];N R(f 1k i[a])G(!c[1]||i[a][f].O==c[1])3d i[a][f];R(1K 1k i[a])1V;G(!1K){G(!D.W.2C[a]||D.W.2C[a].4G.1l(e)===Q){G(e.6m)e.6m(a,D.L(e,"1H"),Q);N G(e.6l)e.6l("4p"+a,D.L(e,"1H"))}1K=U;3d i[a]}}})}R(1K 1k i)1V;G(!1K){J d=D.L(e,"1H");G(d)d.T=U;D.3b(e,"3x");D.3b(e,"1H")}}},1R:H(h,c,f,g,i){c=D.2h(c);G(h.1i("!")>=0){h=h.3w(0,-1);J a=M}G(!f){G(7.28[h])D("*").17([1c,S]).1R(h,c)}N{G(f.15==3||f.15==8)I 12;J b,1K,18=D.1F(f[h]||U),W=!c[0]||!c[0].37;G(W){c.6b({O:h,2N:f,37:H(){},3X:H(){},4J:1x()});c[0][E]=M}c[0].O=h;G(a)c[0].6k=M;J d=D.L(f,"1H");G(d)b=d.1t(f,c);G((!18||(D.Y(f,\'a\')&&h=="4n"))&&f["4p"+h]&&f["4p"+h].1t(f,c)===Q)b=Q;G(W)c.4s();G(i&&D.1F(i)){1K=i.1t(f,b==U?c:c.75(b));G(1K!==12)b=1K}G(18&&g!==Q&&b!==Q&&!(D.Y(f,\'a\')&&h=="4n")){7.5j=M;23{f[h]()}21(e){}}7.5j=Q}I b},1H:H(b){J a,1K,2T,5e,4m;b=1a[0]=D.W.6j(b||1c.W);2T=b.O.1Q(".");b.O=2T[0];2T=2T[1];5e=!2T&&!b.6k;4m=(D.L(7,"3x")||{})[b.O];R(J j 1k 4m){J c=4m[j];G(5e||c.O==2T){b.2o=c;b.L=c.L;1K=c.1t(7,1a);G(a!==Q)a=1K;G(1K===Q){b.37();b.3X()}}}I a},2L:"8o 8n 8m 8l 2p 8k 42 5c 6h 5I 8j L 8i 8h 4k 2o 59 58 8e 8c 57 6f 8b 8a 4j 88 87 86 6d 2N 4J 6c O 84 83 2S".1Q(" "),6j:H(b){G(b[E]==M)I b;J c=b;b={82:c};R(J i=7.2L.K,1e;i;){1e=7.2L[--i];b[1e]=c[1e]}b[E]=M;b.37=H(){G(c.37)c.37();c.81=Q};b.3X=H(){G(c.3X)c.3X();c.80=M};b.4J=b.4J||1x();G(!b.2N)b.2N=b.6d||S;G(b.2N.15==3)b.2N=b.2N.1f;G(!b.4j&&b.4k)b.4j=b.4k==b.2N?b.6c:b.4k;G(b.57==U&&b.5c!=U){J a=S.1B,1d=S.1d;b.57=b.5c+(a&&a.2c||1d&&1d.2c||0)-(a.69||0);b.6f=b.6h+(a&&a.2l||1d&&1d.2l||0)-(a.68||0)}G(!b.2S&&((b.42||b.42===0)?b.42:b.59))b.2S=b.42||b.59;G(!b.58&&b.5I)b.58=b.5I;G(!b.2S&&b.2p)b.2S=(b.2p&1?1:(b.2p&2?3:(b.2p&4?2:0)));I b},3J:H(a,b){b.29=a.29=a.29||b.29||7.29++;I b},2C:{25:{4q:H(){54();I},4G:H(){I}},4c:{4q:H(){G(D.14.1g)I Q;D(7).2O("51",D.W.2C.4c.2o);I M},4G:H(){G(D.14.1g)I Q;D(7).3L("51",D.W.2C.4c.2o);I M},2o:H(a){G(F(a,7))I M;a.O="4c";I D.W.1H.1t(7,1a)}},3F:{4q:H(){G(D.14.1g)I Q;D(7).2O("4Z",D.W.2C.3F.2o);I M},4G:H(){G(D.14.1g)I Q;D(7).3L("4Z",D.W.2C.3F.2o);I M},2o:H(a){G(F(a,7))I M;a.O="3F";I D.W.1H.1t(7,1a)}}}};D.18.1n({2O:H(c,a,b){I c=="4Y"?7.2Y(c,a,b):7.P(H(){D.W.17(7,c,b||a,b&&a)})},2Y:H(d,b,c){J e=D.W.3J(c||b,H(a){D(7).3L(a,e);I(c||b).1t(7,1a)});I 7.P(H(){D.W.17(7,d,e,c&&b)})},3L:H(a,b){I 7.P(H(){D.W.1Z(7,a,b)})},1R:H(c,a,b){I 7.P(H(){D.W.1R(c,a,7,M,b)})},5G:H(c,a,b){I 7[0]&&D.W.1R(c,a,7[0],Q,b)},2B:H(b){J c=1a,i=1;1G(i<c.K)D.W.3J(b,c[i++]);I 7.4n(D.W.3J(b,H(a){7.4X=(7.4X||0)%i;a.37();I c[7.4X++].1t(7,1a)||Q}))},7X:H(a,b){I 7.2O(\'4c\',a).2O(\'3F\',b)},25:H(a){54();G(D.2Q)a.1l(S,D);N D.3D.1A(H(){I a.1l(7,D)});I 7}});D.1n({2Q:Q,3D:[],25:H(){G(!D.2Q){D.2Q=M;G(D.3D){D.P(D.3D,H(){7.1l(S)});D.3D=U}D(S).5G("25")}}});J x=Q;H 54(){G(x)I;x=M;G(S.4a&&!D.14.2H)S.4a("67",D.25,Q);G(D.14.1g&&1c==1P)(H(){G(D.2Q)I;23{S.1B.7W("1z")}21(3g){3E(1a.3I,0);I}D.25()})();G(D.14.2H)S.4a("67",H(){G(D.2Q)I;R(J i=0;i<S.4V.K;i++)G(S.4V[i].3O){3E(1a.3I,0);I}D.25()},Q);G(D.14.2f){J a;(H(){G(D.2Q)I;G(S.3i!="66"&&S.3i!="1O"){3E(1a.3I,0);I}G(a===12)a=D("V, 7z[7U=7T]").K;G(S.4V.K!=a){3E(1a.3I,0);I}D.25()})()}D.W.17(1c,"3Y",D.25)}D.P(("7S,7R,3Y,7Q,4A,4Y,4n,7P,"+"89,7O,7N,51,4Z,7M,2y,"+"5m,8d,7L,7K,3g").1Q(","),H(i,b){D.18[b]=H(a){I a?7.2O(b,a):7.1R(b)}});J F=H(a,c){J b=a.4j;1G(b&&b!=c)23{b=b.1f}21(3g){b=c}I b==c};D(1c).2O("4Y",H(){D("*").17(S).3L()});D.18.1n({6e:D.18.3Y,3Y:H(g,d,c){G(1j g!=\'1W\')I 7.6e(g);J e=g.1i(" ");G(e>=0){J i=g.3w(e,g.K);g=g.3w(0,e)}c=c||H(){};J f="2R";G(d)G(D.1F(d)){c=d;d=U}N G(1j d==\'3y\'){d=D.3A(d);f="7J"}J h=7;D.3T({1b:g,O:f,1L:"2I",L:d,1O:H(a,b){G(b=="1U"||b=="7I")h.2I(i?D("<1w/>").3s(a.4U.1o(/<1m(.|\\s)*?\\/1m>/g,"")).2u(i):a.4U);h.P(c,[a.4U,b,a])}});I 7},aL:H(){I D.3A(7.7H())},7H:H(){I 7.2i(H(){I D.Y(7,"45")?D.2h(7.aK):7}).1E(H(){I 7.32&&!7.3O&&(7.4M||/2y|6x/i.11(7.Y)||/1r|1C|3K/i.11(7.O))}).2i(H(i,c){J b=D(7).6a();I b==U?U:b.1q==2q?D.2i(b,H(a,i){I{32:c.32,2s:a}}):{32:c.32,2s:b}}).3p()}});D.P("7G,7D,7C,7B,6u,7A".1Q(","),H(i,o){D.18[o]=H(f){I 7.2O(o,f)}});J B=1x();D.1n({3p:H(d,b,a,c){G(D.1F(b)){a=b;b=U}I D.3T({O:"2R",1b:d,L:b,1U:a,1L:c})},aG:H(b,a){I D.3p(b,U,a,"1m")},aF:H(c,b,a){I D.3p(c,b,a,"3B")},aD:H(d,b,a,c){G(D.1F(b)){a=b;b={}}I D.3T({O:"7J",1b:d,L:b,1U:a,1L:c})},aC:H(a){D.1n(D.5Z,a)},5Z:{1b:5Y.5x,28:M,O:"2R",2W:0,7y:"4x/x-ay-45-ax",7v:M,31:M,L:U,5r:U,3K:U,4z:{2K:"4x/2K, 1r/2K",2I:"1r/2I",1m:"1r/4v, 4x/4v",3B:"4x/3B, 1r/4v",1r:"1r/as",4S:"*/*"}},4R:{},3T:H(s){s=D.1n(M,s,D.1n(M,{},D.5Z,s));J g,33=/=\\?(&|$)/g,1v,L,O=s.O.2m();G(s.L&&s.7v&&1j s.L!="1W")s.L=D.3A(s.L);G(s.1L=="4Q"){G(O=="2R"){G(!s.1b.1I(33))s.1b+=(s.1b.1I(/\\?/)?"&":"?")+(s.4Q||"7s")+"=?"}N G(!s.L||!s.L.1I(33))s.L=(s.L?s.L+"&":"")+(s.4Q||"7s")+"=?";s.1L="3B"}G(s.1L=="3B"&&(s.L&&s.L.1I(33)||s.1b.1I(33))){g="4Q"+B++;G(s.L)s.L=(s.L+"").1o(33,"="+g+"$1");s.1b=s.1b.1o(33,"="+g+"$1");s.1L="1m";1c[g]=H(a){L=a;1U();1O();1c[g]=12;23{3d 1c[g]}21(e){}G(i)i.30(h)}}G(s.1L=="1m"&&s.1Y==U)s.1Y=Q;G(s.1Y===Q&&O=="2R"){J j=1x();J k=s.1b.1o(/(\\?|&)3n=.*?(&|$)/,"$am="+j+"$2");s.1b=k+((k==s.1b)?(s.1b.1I(/\\?/)?"&":"?")+"3n="+j:"")}G(s.L&&O=="2R"){s.1b+=(s.1b.1I(/\\?/)?"&":"?")+s.L;s.L=U}G(s.28&&!D.4P++)D.W.1R("7G");J n=/^(?:\\w+:)?\\/\\/([^\\/?#]+)/;G(s.1L=="1m"&&O=="2R"&&n.11(s.1b)&&n.2D(s.1b)[1]!=5Y.ak){J i=S.40("6v")[0];J h=S.3t("1m");h.4e=s.1b;G(s.7r)h.ai=s.7r;G(!g){J l=Q;h.ag=h.af=H(){G(!l&&(!7.3i||7.3i=="66"||7.3i=="1O")){l=M;1U();1O();i.30(h)}}}i.49(h);I 12}J m=Q;J c=1c.7q?2r 7q("ad.ac"):2r 6Q();G(s.5r)c.7o(O,s.1b,s.31,s.5r,s.3K);N c.7o(O,s.1b,s.31);23{G(s.L)c.4O("ab-aa",s.7y);G(s.5T)c.4O("a9-5S-a8",D.4R[s.1b]||"a7, a6 a4 a3 5O:5O:5O a1");c.4O("X-a0-9Y","6Q");c.4O("9X",s.1L&&s.4z[s.1L]?s.4z[s.1L]+", */*":s.4z.4S)}21(e){}G(s.7k&&s.7k(c,s)===Q){s.28&&D.4P--;c.7j();I Q}G(s.28)D.W.1R("7A",[c,s]);J d=H(a){G(!m&&c&&(c.3i==4||a=="2W")){m=M;G(f){7h(f);f=U}1v=a=="2W"?"2W":!D.7g(c)?"3g":s.5T&&D.7f(c,s.1b)?"7I":"1U";G(1v=="1U"){23{L=D.6U(c,s.1L,s.9S)}21(e){1v="5L"}}G(1v=="1U"){J b;23{b=c.5K("7e-5S")}21(e){}G(s.5T&&b)D.4R[s.1b]=b;G(!g)1U()}N D.5E(s,c,1v);1O();G(s.31)c=U}};G(s.31){J f=4L(d,13);G(s.2W>0)3E(H(){G(c){c.7j();G(!m)d("2W")}},s.2W)}23{c.9R(s.L)}21(e){D.5E(s,c,U,e)}G(!s.31)d();H 1U(){G(s.1U)s.1U(L,1v);G(s.28)D.W.1R("6u",[c,s])}H 1O(){G(s.1O)s.1O(c,1v);G(s.28)D.W.1R("7C",[c,s]);G(s.28&&!--D.4P)D.W.1R("7D")}I c},5E:H(s,a,b,e){G(s.3g)s.3g(a,b,e);G(s.28)D.W.1R("7B",[a,s,e])},4P:0,7g:H(a){23{I!a.1v&&5Y.9Q=="5o:"||(a.1v>=7c&&a.1v<9O)||a.1v==7a||a.1v==9N||D.14.2f&&a.1v==12}21(e){}I Q},7f:H(a,c){23{J b=a.5K("7e-5S");I a.1v==7a||b==D.4R[c]||D.14.2f&&a.1v==12}21(e){}I Q},6U:H(a,c,b){J d=a.5K("9L-O"),2K=c=="2K"||!c&&d&&d.1i("2K")>=0,L=2K?a.9K:a.4U;G(2K&&L.1B.2g=="5L")7m"5L";G(b)L=b(L,c);G(c=="1m")D.5u(L);G(c=="3B")L=6s("("+L+")");I L},3A:H(a){J s=[];H 17(b,a){s[s.K]=78(b)+\'=\'+78(a)};G(a.1q==2q||a.5w)D.P(a,H(){17(7.32,7.2s)});N R(J j 1k a)G(a[j]&&a[j].1q==2q)D.P(a[j],H(){17(j,7)});N 17(j,D.1F(a[j])?a[j]():a[j]);I s.6r("&").1o(/%20/g,"+")}});D.18.1n({1N:H(c,b){I c?7.2j({1T:"1N",2d:"1N",1y:"1N"},c,b):7.1E(":1C").P(H(){7.V.19=7.5H||"";G(D.1h(7,"19")=="2P"){J a=D("<"+7.2g+" />").6O("1d");7.V.19=a.1h("19");G(7.V.19=="2P")7.V.19="3H";a.1Z()}}).3m()},1J:H(b,a){I b?7.2j({1T:"1J",2d:"1J",1y:"1J"},b,a):7.1E(":4i").P(H(){7.5H=7.5H||D.1h(7,"19");7.V.19="2P"}).3m()},76:D.18.2B,2B:H(a,b){I D.1F(a)&&D.1F(b)?7.76.1t(7,1a):a?7.2j({1T:"2B",2d:"2B",1y:"2B"},a,b):7.P(H(){D(7)[D(7).3C(":1C")?"1N":"1J"]()})},9J:H(b,a){I 7.2j({1T:"1N"},b,a)},9I:H(b,a){I 7.2j({1T:"1J"},b,a)},9H:H(b,a){I 7.2j({1T:"2B"},b,a)},9G:H(b,a){I 7.2j({1y:"1N"},b,a)},9F:H(b,a){I 7.2j({1y:"1J"},b,a)},9D:H(c,a,b){I 7.2j({1y:a},c,b)},2j:H(k,j,i,g){J h=D.74(j,i,g);I 7[h.35===Q?"P":"35"](H(){G(7.15!=1)I Q;J f=D.1n({},h),p,1C=D(7).3C(":1C"),41=7;R(p 1k k){G(k[p]=="1J"&&1C||k[p]=="1N"&&!1C)I f.1O.1l(7);G(p=="1T"||p=="2d"){f.19=D.1h(7,"19");f.34=7.V.34}}G(f.34!=U)7.V.34="1C";f.44=D.1n({},k);D.P(k,H(c,a){J e=2r D.27(41,f,c);G(/2B|1N|1J/.11(a))e[a=="2B"?1C?"1N":"1J":a](k);N{J b=a.6p().1I(/^([+-]=)?([\\d+-.]+)(.*)$/),2b=e.1u(M)||0;G(b){J d=3e(b[2]),2M=b[3]||"2U";G(2M!="2U"){41.V[c]=(d||1)+2M;2b=((d||1)/e.1u(M))*2b;41.V[c]=2b+2M}G(b[1])d=((b[1]=="-="?-1:1)*d)+2b;e.3Z(2b,d,2M)}N e.3Z(2b,a,"")}});I M})},35:H(a,b){G(D.1F(a)||(a&&a.1q==2q)){b=a;a="27"}G(!a||(1j a=="1W"&&!b))I A(7[0],a);I 7.P(H(){G(b.1q==2q)A(7,a,b);N{A(7,a).1A(b);G(A(7,a).K==1)b.1l(7)}})},9x:H(b,c){J a=D.3M;G(b)7.35([]);7.P(H(){R(J i=a.K-1;i>=0;i--)G(a[i].T==7){G(c)a[i](M);a.7l(i,1)}});G(!c)7.5C();I 7}});J A=H(b,c,a){G(b){c=c||"27";J q=D.L(b,c+"35");G(!q||a)q=D.L(b,c+"35",D.2h(a))}I q};D.18.5C=H(a){a=a||"27";I 7.P(H(){J q=A(7,a);q.4s();G(q.K)q[0].1l(7)})};D.1n({74:H(b,a,c){J d=b&&b.1q==9u?b:{1O:c||!c&&a||D.1F(b)&&b,2v:b,3U:c&&a||a&&a.1q!=9t&&a};d.2v=(d.2v&&d.2v.1q==4N?d.2v:D.27.5N[d.2v])||D.27.5N.71;d.5P=d.1O;d.1O=H(){G(d.35!==Q)D(7).5C();G(D.1F(d.5P))d.5P.1l(7)};I d},3U:{7n:H(p,n,b,a){I b+a*p},5Q:H(p,n,b,a){I((-26.9r(p*26.9q)/2)+0.5)*a+b}},3M:[],46:U,27:H(b,c,a){7.16=c;7.T=b;7.1e=a;G(!c.3R)c.3R={}}});D.27.3V={4E:H(){G(7.16.2Z)7.16.2Z.1l(7.T,7.1x,7);(D.27.2Z[7.1e]||D.27.2Z.4S)(7);G(7.1e=="1T"||7.1e=="2d")7.T.V.19="3H"},1u:H(a){G(7.T[7.1e]!=U&&7.T.V[7.1e]==U)I 7.T[7.1e];J r=3e(D.1h(7.T,7.1e,a));I r&&r>-9p?r:3e(D.24(7.T,7.1e))||0},3Z:H(c,b,d){7.5B=1x();7.2b=c;7.3m=b;7.2M=d||7.2M||"2U";7.1x=7.2b;7.36=7.4C=0;7.4E();J e=7;H t(a){I e.2Z(a)}t.T=7.T;D.3M.1A(t);G(D.46==U){D.46=4L(H(){J a=D.3M;R(J i=0;i<a.K;i++)G(!a[i]())a.7l(i--,1);G(!a.K){7h(D.46);D.46=U}},13)}},1N:H(){7.16.3R[7.1e]=D.1M(7.T.V,7.1e);7.16.1N=M;7.3Z(0,7.1u());G(7.1e=="2d"||7.1e=="1T")7.T.V[7.1e]="9l";D(7.T).1N()},1J:H(){7.16.3R[7.1e]=D.1M(7.T.V,7.1e);7.16.1J=M;7.3Z(7.1u(),0)},2Z:H(a){J t=1x();G(a||t>7.16.2v+7.5B){7.1x=7.3m;7.36=7.4C=1;7.4E();7.16.44[7.1e]=M;J b=M;R(J i 1k 7.16.44)G(7.16.44[i]!==M)b=Q;G(b){G(7.16.19!=U){7.T.V.34=7.16.34;7.T.V.19=7.16.19;G(D.1h(7.T,"19")=="2P")7.T.V.19="3H"}G(7.16.1J)7.T.V.19="2P";G(7.16.1J||7.16.1N)R(J p 1k 7.16.44)D.1M(7.T.V,p,7.16.3R[p])}G(b)7.16.1O.1l(7.T);I Q}N{J n=t-7.5B;7.4C=n/7.16.2v;7.36=D.3U[7.16.3U||(D.3U.5Q?"5Q":"7n")](7.4C,n,0,1,7.16.2v);7.1x=7.2b+((7.3m-7.2b)*7.36);7.4E()}I M}};D.1n(D.27,{5N:{9k:9i,an:7c,71:ao},2Z:{2c:H(a){a.T.2c=a.1x},2l:H(a){a.T.2l=a.1x},1y:H(a){D.1M(a.T.V,"1y",a.1x)},4S:H(a){a.T.V[a.1e]=a.1x+a.2M}}});D.18.2k=H(){J b=0,1P=0,T=7[0],3q;G(T)9f(D.14){J d=T.1f,48=T,1p=T.1p,1S=T.2z,5V=2f&&3v(5F)<9c&&!/aw/i.11(v),1h=D.24,2X=1h(T,"3c")=="2X";G(!(3r&&T==S.1d)&&T.6T){J c=T.6T();17(c.1z+26.2e(1S.1B.2c,1S.1d.2c),c.1P+26.2e(1S.1B.2l,1S.1d.2l));17(-1S.1B.69,-1S.1B.68)}N{17(T.5X,T.5z);1G(1p){17(1p.5X,1p.5z);G(3r&&!/^t(98|d|h)$/i.11(1p.2g)||2f&&!5V)2A(1p);G(!2X&&1h(1p,"3c")=="2X")2X=M;48=/^1d$/i.11(1p.2g)?48:1p;1p=1p.1p}1G(d&&d.2g&&!/^1d|2I$/i.11(d.2g)){G(!/^97|1X.*$/i.11(1h(d,"19")))17(-d.2c,-d.2l);G(3r&&1h(d,"34")!="4i")2A(d);d=d.1f}G((5V&&(2X||1h(48,"3c")=="5g"))||(3r&&1h(48,"3c")!="5g"))17(-1S.1d.5X,-1S.1d.5z);G(2X)17(26.2e(1S.1B.2c,1S.1d.2c),26.2e(1S.1B.2l,1S.1d.2l))}3q={1P:1P,1z:b}}H 2A(a){17(D.24(a,"7w",M),D.24(a,"7x",M))}H 17(l,t){b+=3v(l,10)||0;1P+=3v(t,10)||0}I 3q};D.18.1n({3c:H(){J a=0,1P=0,3q;G(7[0]){J b=7.1p(),2k=7.2k(),4b=/^1d|2I$/i.11(b[0].2g)?{1P:0,1z:0}:b.2k();2k.1P-=2a(7,\'95\');2k.1z-=2a(7,\'94\');4b.1P+=2a(b,\'7x\');4b.1z+=2a(b,\'7w\');3q={1P:2k.1P-4b.1P,1z:2k.1z-4b.1z}}I 3q},1p:H(){J a=7[0].1p;1G(a&&(!/^1d|2I$/i.11(a.2g)&&D.1h(a,\'3c\')==\'aI\'))a=a.1p;I D(a)}});D.P([\'5d\',\'5b\'],H(i,b){J c=\'4A\'+b;D.18[c]=H(a){G(!7[0])I;I a!=12?7.P(H(){7==1c||7==S?1c.aJ(!i?a:D(1c).2c(),i?a:D(1c).2l()):7[c]=a}):7[0]==1c||7[0]==S?41[i?\'92\':\'91\']||D.6Y&&S.1B[c]||S.1d[c]:7[0][c]}});D.P(["6M","47"],H(i,b){J c=i?"5d":"5b",43=i?"6i":"6g";D.18["5s"+b]=H(){I 7[b.3h()]()+2a(7,"55"+c)+2a(7,"55"+43)};D.18["aM"+b]=H(a){I 7["5s"+b]()+2a(7,"2A"+c+"47")+2a(7,"2A"+43+"47")+(a?2a(7,"7F"+c)+2a(7,"7F"+43):0)}})})();',62,671,'|||||||this|||||||||||||||||||||||||||||||||||if|function|return|var|length|data|true|else|type|each|false|for|document|elem|null|style|event||nodeName|||test|undefined||browser|nodeType|options|add|fn|display|arguments|url|window|body|prop|parentNode|msie|css|indexOf|typeof|in|call|script|extend|replace|offsetParent|constructor|text|firstChild|apply|cur|status|div|now|opacity|left|push|documentElement|hidden|className|filter|isFunction|while|handle|match|hide|ret|dataType|attr|show|complete|top|split|trigger|doc|height|success|break|string|table|cache|remove||catch|tbody|try|curCSS|ready|Math|fx|global|guid|num|start|scrollLeft|width|max|safari|tagName|makeArray|map|animate|offset|scrollTop|toUpperCase||handler|button|Array|new|value|id|find|duration|done|copy|select|ownerDocument|border|toggle|special|exec|inArray|pushStack|stack|opera|html|nextSibling|xml|props|unit|target|bind|none|isReady|GET|which|namespace|px|nth|timeout|fixed|one|step|removeChild|async|name|jsre|overflow|queue|pos|preventDefault|insertBefore|merge|selected|removeData|position|delete|parseFloat|multiFilter|error|toLowerCase|readyState|rl|re|trim|end|_|first|get|results|mozilla|append|createElement|childNodes|parseInt|slice|events|object|elems|param|json|is|readyList|setTimeout|mouseleave|grep|block|callee|proxy|password|unbind|timers|defaultView|disabled|last|has|orig|domManip|ajax|easing|prototype|set|stopPropagation|load|custom|getElementsByTagName|self|charCode|br|curAnim|form|timerId|Width|offsetChild|appendChild|addEventListener|parentOffset|mouseenter|color|src|currentStyle|float|clean|visible|relatedTarget|fromElement|innerHTML|handlers|click|isXMLDoc|on|setup|nodeIndex|shift|input|unique|javascript|child|application|RegExp|accepts|scroll|deep|state|previousSibling|update|empty|teardown|tr|jQuery|timeStamp|getAttribute|setInterval|checked|Number|setRequestHeader|active|jsonp|lastModified|_default|dir|responseText|styleSheets|not|lastToggle|unload|mouseout|outline|mouseover|getPropertyValue|getComputedStyle|bindReady|padding|String|pageX|metaKey|keyCode|getWH|Top|clientX|Left|all|container|absolute|index|init|triggered|removeAttribute|classFilter|submit|prevObject|file|after|windowData|username|inner|client|globalEval|sibling|jquery|href|clone|offsetTop|checkbox|startTime|dequeue|visibility|handleError|version|triggerHandler|oldblock|ctrlKey|createTextNode|getResponseHeader|parsererror|andSelf|speeds|00|old|swing|radio|Modified|ifModified|lastChild|safari2|wrapAll|offsetLeft|location|ajaxSettings|getElementById|isSimple|values|selectedIndex|runtimeStyle|rsLeft|loaded|DOMContentLoaded|clientTop|clientLeft|val|unshift|toElement|srcElement|_load|pageY|Bottom|clientY|Right|fix|exclusive|detachEvent|removeEventListener|cloneNode|swap|toString|attachEvent|join|eval|substr|ajaxSuccess|head|parse|textarea|reset|image|zoom|odd|even|before|prepend|expr|exclude|quickClass|quickID|quickChild|uuid|continue|Height|textContent|appendTo|contents|XMLHttpRequest|evalScript|parent|getBoundingClientRect|httpData|setArray|CSS1Compat|compatMode|boxModel|cssFloat|styleFloat|def|webkit|nodeValue|speed|concat|_toggle|eq|encodeURIComponent|100|304|replaceWith|200|alpha|Last|httpNotModified|httpSuccess|clearInterval|getAttributeNode|abort|beforeSend|splice|throw|linear|open|colgroup|ActiveXObject|scriptCharset|callback|fieldset|multiple|processData|borderLeftWidth|borderTopWidth|contentType|link|ajaxSend|ajaxError|ajaxComplete|ajaxStop|col|margin|ajaxStart|serializeArray|notmodified|POST|keyup|keypress|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|hasClass|doScroll|hover|black|solid|cancelBubble|returnValue|originalEvent|wheelDelta|view|round|shiftKey|screenY|screenX|mousedown|relatedNode|prevValue|originalTarget|keydown|newValue|offsetHeight|offsetWidth|eventPhase|detail|currentTarget|cancelable|bubbles|attrName|attrChange|altKey|charAt|0n|substring|animated|header|noConflict|enabled|line|innerText|contains|only|weight|font|gt|lt|uFFFF|u0128|417|size|Boolean|toggleClass|Date|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|wrap|contentDocument|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|pageXOffset|pageYOffset|next|marginLeft|marginTop|parents|inline|able|rowSpan|rowspan|cellSpacing|522|cellspacing|maxLength|with|maxlength|readOnly|600|readonly|slow|1px|class|htmlFor|reverse|10000|PI|cos|compatible|Function|Object|setData|ie|stop|ra|it|rv|getData|userAgent|fadeTo|navigator|fadeOut|fadeIn|slideToggle|slideUp|slideDown|responseXML|content|ig|1223|300|NaN|protocol|send|dataFilter|setAttribute|option|cssText|changed|Accept|With|be|Requested|GMT|can|1970|Jan|property|01|Thu|Since|If|Type|Content|XMLHTTP|Microsoft|th|onreadystatechange|onload|td|charset|cap|host|colg|1_|fast|400|tfoot|specified|thead|plain|leg|attributes|opt|adobeair|urlencoded|www|embed|area|hr|ajaxSetup|post|meta|getJSON|getScript|img|static|scrollTo|elements|serialize|outer|abbr|pixelLeft'.split('|'),0,{}));jQuery.noConflict();
--- a/web/wp-content/plugins/gigs-calendar/js/jquery.tooltip.css	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#tooltip {
-	position: absolute;
-	z-index: 3000;
-	border: 1px solid #111;
-	background-color: #eee;
-	padding: 5px;
-	opacity: 0.85;
-	max-width: 400px;
-}
-#tooltip h3, #tooltip div { margin: 0; }
--- a/web/wp-content/plugins/gigs-calendar/js/jquery.tooltip.min.js	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-/*
- * jQuery Tooltip plugin 1.2
- *
- * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
- * http://docs.jquery.com/Plugins/Tooltip
- *
- * Copyright (c) 2006 - 2008 Jörn Zaefferer
- *
- * $Id: jquery.tooltip.js 4569 2008-01-31 19:36:35Z joern.zaefferer $
- * 
- * Dual licensed under the MIT and GPL licenses:
- *   http://www.opensource.org/licenses/mit-license.php
- *   http://www.gnu.org/licenses/gpl.html
- */;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip-settings",settings);this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).hover(save,hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip-settings");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
-show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;part=parts[i];i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
-helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;helper.parent.show();update();}function update(event){if($.tooltip.blocked)return;if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;helper.parent.css({left:left+'px',top:top+'px'});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;helper.parent.hide().removeClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.unfixPNG();}$.fn.Tooltip=$.fn.tooltip;})(jQuery);
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/js/ui.core.js	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3(C){C.8={2t:{1o:3(E,F,H){6 G=C.8[E].m;1v(6 D 2s H){G.u[D]=G.u[D]||[];G.u[D].2r([F,H[D]])}},1n:3(D,F,E){6 H=D.u[F];5(!H){4}1v(6 G=0;G<H.2q;G++){5(D.a[H[G][0]]){H[G][1].r(D.c,E)}}}},n:{},f:3(D){5(C.8.n[D]){4 C.8.n[D]}6 E=C(\'<2p 2o="8-2n-2m">\').1i(D).f({2l:"2k",11:"-1u",2j:"-1u",2i:"2h"}).2g("1t");C.8.n[D]=!!((!(/2f|2e/).h(E.f("2d"))||(/^[1-9]/).h(E.f("2c"))||(/^[1-9]/).h(E.f("2b"))||!(/1r/).h(E.f("2a"))||!(/29|28\\(0, 0, 0, 0\\)/).h(E.f("27"))));26{C("1t").1s(0).25(E.1s(0))}24(F){}4 C.8.n[D]},23:3(D){D.j="1g";D.1q=3(){4 7};5(D.t){D.t.1p="1r"}},22:3(D){D.j="21";D.1q=3(){4 d};5(D.t){D.t.1p=""}},20:3(G,E){6 D=/11/.h(E||"11")?"1Z":"1Y",F=7;5(G[D]>0){4 d}G[D]=1;F=G[D]>0?d:7;G[D]=0;4 F}};6 B=C.Z.q;C.Z.q=3(){C("*",2).1o(2).1X("q");4 B.r(2,1m)};3 A(E,F,G){6 D=C[E][F].1W||[];D=(U D=="T"?D.10(/,?\\s+/):D);4(C.1V(G,D)!=-1)}C.X=3(E,D){6 F=E.10(".")[0];E=E.10(".")[1];C.Z[E]=3(J){6 H=(U J=="T"),I=1U.m.1T.1n(1m,1);5(H&&A(F,E,J)){6 G=C.Y(2[0],E);4(G?G[J].r(G,I):1S)}4 2.1R(3(){6 K=C.Y(2,E);5(H&&K&&C.1Q(K[J])){K[J].r(K,I)}1P{5(!H){C.Y(2,E,1O C[F][E](2,J))}}})};C[F][E]=3(I,H){6 G=2;2.e=E;2.1h=F+"-"+E;2.a=C.1l({k:7},C[F][E].13,H);2.c=C(I).g("l."+E,3(L,J,K){4 G.l(J,K)}).g("W."+E,3(K,J){4 G.W(J)}).g("q",3(){4 G.1j()});2.1k()};C[F][E].m=C.1l({},C.X.m,D)};C.X.m={1k:3(){},1j:3(){2.c.1N(2.e)},W:3(D){4 2.a[D]},l:3(D,E){2.a[D]=E;5(D=="k"){2.c[E?"1i":"1M"](2.1h+"-k")}},1L:3(){2.l("k",7)},1K:3(){2.l("k",d)}};C.8.14={1J:3(){6 D=2;2.c.g("1I."+2.e,3(E){4 D.1e(E)});5(C.S.R){2.1f=2.c.V("j");2.c.V("j","1g")}2.1H=7},1G:3(){2.c.P("."+2.e);(C.S.R&&2.c.V("j",2.1f))},1e:3(F){(2.b&&2.i(F));2.p=F;6 E=2,G=(F.1F==1),D=(U 2.a.w=="T"?C(F.1E).1D(2.a.w):7);5(!G||D||!2.15(F)){4 d}2.o=!2.a.v;5(!2.o){2.1C=1B(3(){E.o=d},2.a.v)}5(2.N(F)&&2.z(F)){2.b=(2.y(F)!==7);5(!2.b){F.1A();4 d}}2.Q=3(H){4 E.1d(H)};2.O=3(H){4 E.i(H)};C(1c).g("1b."+2.e,2.Q).g("1a."+2.e,2.O);4 7},1d:3(D){5(C.S.R&&!D.1z){4 2.i(D)}5(2.b){2.x(D);4 7}5(2.N(D)&&2.z(D)){2.b=(2.y(2.p,D)!==7);(2.b?2.x(D):2.i(D))}4!2.b},i:3(D){C(1c).P("1b."+2.e,2.Q).P("1a."+2.e,2.O);5(2.b){2.b=7;2.16(D)}4 7},N:3(D){4(M.1y(M.18(2.p.19-D.19),M.18(2.p.17-D.17))>=2.a.12)},z:3(D){4 2.o},y:3(D){},x:3(D){},16:3(D){},15:3(D){4 d}};C.8.14.13={w:1x,12:1,v:0}})(1w)',62,154,'||this|function|return|if|var|false|ui||options|_mouseStarted|element|true|widgetName|css|bind|test|mouseUp|unselectable|disabled|setData|prototype|cssCache|_mouseDelayMet|_mouseDownEvent|remove|apply||style|plugins|delay|cancel|mouseDrag|mouseStart|mouseDelayMet|||||||||||||Math|mouseDistanceMet|_mouseUpDelegate|unbind|_mouseMoveDelegate|msie|browser|string|typeof|attr|getData|widget|data|fn|split|top|distance|defaults|mouse|mouseCapture|mouseStop|pageY|abs|pageX|mouseup|mousemove|document|mouseMove|mouseDown|_mouseUnselectable|on|widgetBaseClass|addClass|destroy|init|extend|arguments|call|add|MozUserSelect|onselectstart|none|get|body|5000px|for|jQuery|null|max|button|preventDefault|setTimeout|_mouseDelayTimer|is|target|which|mouseDestroy|started|mousedown|mouseInit|disable|enable|removeClass|removeData|new|else|isFunction|each|undefined|slice|Array|inArray|getter|trigger|scrollLeft|scrollTop|hasScroll|off|enableSelection|disableSelection|catch|removeChild|try|backgroundColor|rgba|transparent|backgroundImage|width|height|cursor|default|auto|appendTo|block|display|left|absolute|position|gen|resizable|class|div|length|push|in|plugin'.split('|'),0,{}))
-
--- a/web/wp-content/plugins/gigs-calendar/js/ui.datepicker.css	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-/* Main Style Sheet for jQuery UI date picker */
-#ui-datepicker-div, .ui-datepicker-inline {
-	font-family: Arial, Helvetica, sans-serif;
-	font-size: 14px;
-	padding: 0;
-	margin: 0;
-	background: #ddd;
-	width: 185px;
-}
-#ui-datepicker-div {
-	display: none;
-	border: 1px solid #777;
-	z-index: 9999; /*must have*/
-}
-.ui-datepicker-inline {
-	float: left;
-	display: block;
-	border: 0;
-}
-.ui-datepicker-rtl {
-	direction: rtl;
-}
-.ui-datepicker-dialog {
-	padding: 5px !important;
-	border: 4px ridge #ddd !important;
-}
-button.ui-datepicker-trigger {
-	width: 25px;
-}
-img.ui-datepicker-trigger {
-	margin: 2px;
-	vertical-align: middle;
-}
-.ui-datepicker-prompt {
-	float: left;
-	padding: 2px;
-	background: #ddd;
-	color: #000;
-}
-* html .ui-datepicker-prompt {
-	width: 185px;
-}
-.ui-datepicker-control, .ui-datepicker-links, .ui-datepicker-header, .ui-datepicker {
-	clear: both;
-	float: left;
-	width: 100%;
-	color: #fff;
-}
-.ui-datepicker-control {
-	background: #400;
-	padding: 2px 0px;
-}
-.ui-datepicker-links {
-	background: #000;
-	padding: 2px 0px;
-}
-.ui-datepicker-control, .ui-datepicker-links {
-	font-weight: bold;
-	font-size: 80%;
-}
-.ui-datepicker-links label { /* disabled links */
-	padding: 2px 5px;
-	color: #888;
-}
-.ui-datepicker-clear, .ui-datepicker-prev {
-	float: left;
-	width: 34%;
-}
-.ui-datepicker-rtl .ui-datepicker-clear, .ui-datepicker-rtl .ui-datepicker-prev {
-	float: right;
-	text-align: right;
-}
-.ui-datepicker-current {
-	float: left;
-	width: 30%;
-	text-align: center;
-}
-.ui-datepicker-close, .ui-datepicker-next {
-	float: right;
-	width: 34%;
-	text-align: right;
-}
-.ui-datepicker-rtl .ui-datepicker-close, .ui-datepicker-rtl .ui-datepicker-next {
-	float: left;
-	text-align: left;
-}
-.ui-datepicker-header {
-	padding: 1px 0 3px;
-	background: #333;
-	text-align: center;
-	font-weight: bold;
-	height: 1.3em;
-}
-.ui-datepicker-header select {
-	background: #333;
-	color: #fff;
-	border: 0px;
-	font-weight: bold;
-}
-.ui-datepicker {
-	background: #ccc;
-	text-align: center;
-	font-size: 100%;
-}
-.ui-datepicker a {
-	display: block;
-	width: 100%;
-}
-.ui-datepicker-title-row {
-	background: #777;
-}
-.ui-datepicker-days-row {
-	background: #eee;
-	color: #666;
-}
-.ui-datepicker-week-col {
-	background: #777;
-	color: #fff;
-}
-.ui-datepicker-days-cell {
-	color: #000;
-	border: 1px solid #ddd;
-}
-.ui-datepicker-days-cell a{
-	display: block;
-}
-.ui-datepicker-week-end-cell {
-	background: #ddd;
-}
-.ui-datepicker-title-row .ui-datepicker-week-end-cell {
-	background: #777;
-}
-.ui-datepicker-days-cell-over {
-	background: #fff;
-	border: 1px solid #777;
-}
-.ui-datepicker-unselectable {
-	color: #888;
-}
-.ui-datepicker-today {
-	background: #fcc !important;
-}
-.ui-datepicker-current-day {
-	background: #999 !important;
-}
-.ui-datepicker-status {
-	background: #ddd;
-	width: 100%;
-	font-size: 80%;
-	text-align: center;
-}
-
-/* ________ Datepicker Links _______
-
-** Reset link properties and then override them with !important */
-#ui-datepicker-div a, .ui-datepicker-inline a {
-	cursor: pointer;
-	margin: 0;
-	padding: 0;
-	background: none;
-	color: #000;
-}
-.ui-datepicker-inline .ui-datepicker-links a {
-	padding: 0 5px !important;
-}
-.ui-datepicker-control a, .ui-datepicker-links a {
-	padding: 2px 5px !important;
-	color: #eee !important;
-}
-.ui-datepicker-title-row a {
-	color: #eee !important;
-}
-.ui-datepicker-control a:hover {
-	background: #fdd !important;
-	color: #333 !important;
-}
-.ui-datepicker-links a:hover, .ui-datepicker-title-row a:hover {
-	background: #ddd !important;
-	color: #333 !important;
-}
-
-/* ___________ MULTIPLE MONTHS _________*/
-
-.ui-datepicker-multi .ui-datepicker {
-	border: 1px solid #777;
-}
-.ui-datepicker-one-month {
-	float: left;
-	width: 185px;
-}
-.ui-datepicker-new-row {
-	clear: left;
-}
-
-/* ___________ IE6 IFRAME FIX ________ */
-
-.ui-datepicker-cover {
-    display: none; /*sorry for IE5*/
-    display/**/: block; /*sorry for IE5*/
-    position: absolute; /*must have*/
-    z-index: -1; /*must have*/
-    filter: mask(); /*must have*/
-    top: -4px; /*must have*/
-    left: -4px; /*must have*/
-    width: 200px; /*must have*/
-    height: 200px; /*must have*/
-}
--- a/web/wp-content/plugins/gigs-calendar/js/ui.datepicker.min.js	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-(function($){function Datepicker(){this.debug=false;this._nextId=0;this._inst=[];this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,speed:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:" - "};$.extend(this._defaults,this.regional[""]);this._datepickerDiv=$('<div id="ui-datepicker-div"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},_register:function(inst){var id=this._nextId++;this._inst[id]=inst;return id},_getInst:function(id){return this._inst[id]||id},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var instSettings=(inlineSettings?$.extend(settings||{},inlineSettings||{}):settings);if(nodeName=="input"){var inst=(inst&&!inlineSettings?inst:new DatepickerInstance(instSettings,false));this._connectDatepicker(target,inst)}else{if(nodeName=="div"||nodeName=="span"){var inst=new DatepickerInstance(instSettings,true);this._inlineDatepicker(target,inst)}}},_destroyDatepicker:function(target){var nodeName=target.nodeName.toLowerCase();var calId=target._calId;target._calId=null;var $target=$(target);if(nodeName=="input"){$target.siblings(".ui-datepicker-append").replaceWith("").end().siblings(".ui-datepicker-trigger").replaceWith("").end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress);var wrapper=$target.parents(".ui-datepicker-wrap");if(wrapper){wrapper.replaceWith(wrapper.html())}}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}if($("input[_calId="+calId+"]").length==0){this._inst[calId]=null}},_enableDatepicker:function(target){target.disabled=false;$(target).siblings("button.ui-datepicker-trigger").each(function(){this.disabled=false}).end().siblings("img.ui-datepicker-trigger").css({opacity:"1.0",cursor:""});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){target.disabled=true;$(target).siblings("button.ui-datepicker-trigger").each(function(){this.disabled=true}).end().siblings("img.ui-datepicker-trigger").css({opacity:"0.5",cursor:"default"});this._disabledInputs=$.map($.datepicker._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[$.datepicker._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst=this._getInst(target._calId)){extendRemove(inst._settings,settings);this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){if(inst=this._getInst(target._calId)){inst._setDate(date,endDate);this._updateDatepicker(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target._calId);if(inst){inst._setDateFromField($(target))}return(inst?inst._getDate():null)},_doKeyDown:function(e){var inst=$.datepicker._getInst(this._calId);if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:$.datepicker._selectDay(inst,inst._selectedMonth,inst._selectedYear,$("td.ui-datepicker-days-cell-over",inst._datepickerDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,inst._get("speed"));break;case 33:$.datepicker._adjustDate(inst,(e.ctrlKey?-1:-inst._get("stepMonths")),(e.ctrlKey?"Y":"M"));break;case 34:$.datepicker._adjustDate(inst,(e.ctrlKey?+1:+inst._get("stepMonths")),(e.ctrlKey?"Y":"M"));break;case 35:if(e.ctrlKey){$.datepicker._clearDate(inst)}break;case 36:if(e.ctrlKey){$.datepicker._gotoToday(inst)}break;case 37:if(e.ctrlKey){$.datepicker._adjustDate(inst,-1,"D")}break;case 38:if(e.ctrlKey){$.datepicker._adjustDate(inst,-7,"D")}break;case 39:if(e.ctrlKey){$.datepicker._adjustDate(inst,+1,"D")}break;case 40:if(e.ctrlKey){$.datepicker._adjustDate(inst,+7,"D")}break}}else{if(e.keyCode==36&&e.ctrlKey){$.datepicker._showDatepicker(this)}}},_doKeyPress:function(e){var inst=$.datepicker._getInst(this._calId);var chars=$.datepicker._possibleChars(inst._get("dateFormat"));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)},_connectDatepicker:function(target,inst){var input=$(target);if(input.is("."+this.markerClassName)){return }var appendText=inst._get("appendText");var isRTL=inst._get("isRTL");if(appendText){if(isRTL){input.before('<span class="ui-datepicker-append">'+appendText)}else{input.after('<span class="ui-datepicker-append">'+appendText)}}var showOn=inst._get("showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){input.wrap('<span class="ui-datepicker-wrap">');var buttonText=inst._get("buttonText");var buttonImage=inst._get("buttonImage");var trigger=$(inst._get("buttonImageOnly")?$("<img>").addClass("ui-datepicker-trigger").attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button>").addClass("ui-datepicker-trigger").attr({type:"button"}).html(buttonImage!=""?$("<img>").attr({src:buttonImage,alt:buttonText,title:buttonText}):buttonText));if(isRTL){input.before(trigger)}else{input.after(trigger)}trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst._settings[key]=value}).bind("getData.datepicker",function(event,key){return inst._get(key)});input[0]._calId=inst._id},_inlineDatepicker:function(target,inst){var input=$(target);if(input.is("."+this.markerClassName)){return }input.addClass(this.markerClassName).append(inst._datepickerDiv).bind("setData.datepicker",function(event,key,value){inst._settings[key]=value}).bind("getData.datepicker",function(event,key){return inst._get(key)});input[0]._calId=inst._id;this._updateDatepicker(inst)},_inlineShow:function(inst){var numMonths=inst._getNumberOfMonths();inst._datepickerDiv.width(numMonths[1]*$(".ui-datepicker",inst._datepickerDiv[0]).width())},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){inst=this._dialogInst=new DatepickerInstance({},false);this._dialogInput=$('<input type="text" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);this._dialogInput[0]._calId=inst._id}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("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst._settings.onSelect=onSelect;this._inDialog=true;this._datepickerDiv.addClass("ui-datepicker-dialog");this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this._datepickerDiv)}return this},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return }var inst=$.datepicker._getInst(input._calId);var beforeShow=inst._get("beforeShow");extendRemove(inst._settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;inst._setDateFromField(input);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed"});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}inst._datepickerDiv.css("position",($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute"))).css({left:$.datepicker._pos[0]+"px",top:$.datepicker._pos[1]+"px"});$.datepicker._pos=null;inst._rangeStart=null;$.datepicker._updateDatepicker(inst);if(!inst._inline){var speed=inst._get("speed");var postProcess=function(){$.datepicker._datepickerShowing=true;$.datepicker._afterShow(inst)};var showAnim=inst._get("showAnim")||"show";inst._datepickerDiv[showAnim](speed,postProcess);if(speed==""){postProcess()}if(inst._input[0].type!="hidden"){inst._input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){inst._datepickerDiv.empty().append(inst._generateDatepicker());var numMonths=inst._getNumberOfMonths();if(numMonths[0]!=1||numMonths[1]!=1){inst._datepickerDiv.addClass("ui-datepicker-multi")}else{inst._datepickerDiv.removeClass("ui-datepicker-multi")}if(inst._get("isRTL")){inst._datepickerDiv.addClass("ui-datepicker-rtl")}else{inst._datepickerDiv.removeClass("ui-datepicker-rtl")}if(inst._input&&inst._input[0].type!="hidden"){$(inst._input[0]).focus()}},_afterShow:function(inst){var numMonths=inst._getNumberOfMonths();inst._datepickerDiv.width(numMonths[1]*$(".ui-datepicker",inst._datepickerDiv[0])[0].offsetWidth);if($.browser.msie&&parseInt($.browser.version)<7){$("iframe.ui-datepicker-cover").css({width:inst._datepickerDiv.width()+4,height:inst._datepickerDiv.height()+4})}var isFixed=inst._datepickerDiv.css("position")=="fixed";var pos=inst._input?$.datepicker._findPos(inst._input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=(isFixed?0:document.documentElement.scrollLeft||document.body.scrollLeft);var scrollY=(isFixed?0:document.documentElement.scrollTop||document.body.scrollTop);if((inst._datepickerDiv.offset().left+inst._datepickerDiv.width()-(isFixed&&$.browser.msie?document.documentElement.scrollLeft:0))>(browserWidth+scrollX)){inst._datepickerDiv.css("left",Math.max(scrollX,pos[0]+(inst._input?$(inst._input[0]).width():null)-inst._datepickerDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))+"px")}if((inst._datepickerDiv.offset().top+inst._datepickerDiv.height()-(isFixed&&$.browser.msie?document.documentElement.scrollTop:0))>(browserHeight+scrollY)){inst._datepickerDiv.css("top",Math.max(scrollY,pos[1]-(this._inDialog?0:inst._datepickerDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))+"px")}},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,speed){var inst=this._curInst;if(!inst){return }var rangeSelect=inst._get("rangeSelect");if(rangeSelect&&this._stayOpen){this._selectDate(inst,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear))}this._stayOpen=false;if(this._datepickerShowing){speed=(speed!=null?speed:inst._get("speed"));var showAnim=inst._get("showAnim");inst._datepickerDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))](speed,function(){$.datepicker._tidyDialog(inst)});if(speed==""){this._tidyDialog(inst)}var onClose=inst._get("onClose");if(onClose){onClose.apply((inst._input?inst._input[0]:null),[inst._getDate(),inst])}this._datepickerShowing=false;this._lastInput=null;inst._settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this._datepickerDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst._datepickerDiv.removeClass("ui-datepicker-dialog").unbind(".ui-datepicker");$(".ui-datepicker-prompt",inst._datepickerDiv).remove()},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#ui-datepicker-div").length==0)&&!$target.hasClass("hasDatepicker")&&!$target.hasClass("ui-datepicker-trigger")&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var inst=this._getInst(id);inst._adjustDate(offset,period);this._updateDatepicker(inst)},_gotoToday:function(id){var date=new Date();var inst=this._getInst(id);inst._selectedDay=date.getDate();inst._drawMonth=inst._selectedMonth=date.getMonth();inst._drawYear=inst._selectedYear=date.getFullYear();this._adjustDate(inst)},_selectMonthYear:function(id,select,period){var inst=this._getInst(id);inst._selectingMonthYear=false;inst[period=="M"?"_drawMonth":"_drawYear"]=select.options[select.selectedIndex].value-0;this._adjustDate(inst)},_clickMonthYear:function(id){var inst=this._getInst(id);if(inst._input&&inst._selectingMonthYear&&!$.browser.msie){inst._input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_changeFirstDay:function(id,day){var inst=this._getInst(id);inst._settings.firstDay=day;this._updateDatepicker(inst)},_selectDay:function(id,month,year,td){if($(td).is(".ui-datepicker-unselectable")){return }var inst=this._getInst(id);var rangeSelect=inst._get("rangeSelect");if(rangeSelect){if(!this._stayOpen){$(".ui-datepicker td").removeClass("ui-datepicker-current-day");$(td).addClass("ui-datepicker-current-day")}this._stayOpen=!this._stayOpen}inst._selectedDay=inst._currentDay=$("a",td).html();inst._selectedMonth=inst._currentMonth=month;inst._selectedYear=inst._currentYear=year;this._selectDate(id,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear));if(this._stayOpen){inst._endDay=inst._endMonth=inst._endYear=null;inst._rangeStart=new Date(inst._currentYear,inst._currentMonth,inst._currentDay);this._updateDatepicker(inst)}else{if(rangeSelect){inst._endDay=inst._currentDay;inst._endMonth=inst._currentMonth;inst._endYear=inst._currentYear;inst._selectedDay=inst._currentDay=inst._rangeStart.getDate();inst._selectedMonth=inst._currentMonth=inst._rangeStart.getMonth();inst._selectedYear=inst._currentYear=inst._rangeStart.getFullYear();inst._rangeStart=null;if(inst._inline){this._updateDatepicker(inst)}}}},_clearDate:function(id){var inst=this._getInst(id);if(inst._get("mandatory")){return }this._stayOpen=false;inst._endDay=inst._endMonth=inst._endYear=inst._rangeStart=null;this._selectDate(inst,"")},_selectDate:function(id,dateStr){var inst=this._getInst(id);dateStr=(dateStr!=null?dateStr:inst._formatDate());if(inst._rangeStart){dateStr=inst._formatDate(inst._rangeStart)+inst._get("rangeSeparator")+dateStr}if(inst._input){inst._input.val(dateStr)}var onSelect=inst._get("onSelect");if(onSelect){onSelect.apply((inst._input?inst._input[0]:null),[dateStr,inst])}else{if(inst._input){inst._input.trigger("change")}}if(inst._inline){this._updateDatepicker(inst)}else{if(!this._stayOpen){this._hideDatepicker(null,inst._get("speed"));this._lastInput=inst._input[0];if(typeof (inst._input[0])!="object"){inst._input[0].focus()}this._lastInput=null}}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate(),(date.getTimezoneOffset()/-60));var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate)}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},dateStatus:function(date,inst){return $.datepicker.formatDate(inst._get("dateStatus"),date,inst._getFormatConfig())},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){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 literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var size=(match=="y"?4:2);var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+(value.charAt(iValue++)-0);size--}if(size==(match=="y"?4:2)){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}var date=new Date(year,month-1,day);if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},formatDate:function(format,date,settings){if(!date){return""}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<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value){return(lookAhead(match)&&value<10?"0":"")+value};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate());break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"m":output+=formatNumber("m",date.getMonth()+1);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d"||"m"||"y":chars+="0123456789";break;case"D"||"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars}});function DatepickerInstance(settings,inline){this._id=$.datepicker._register(this);this._selectedDay=0;this._selectedMonth=0;this._selectedYear=0;this._drawMonth=0;this._drawYear=0;this._input=null;this._inline=inline;this._datepickerDiv=(!inline?$.datepicker._datepickerDiv:$('<div id="ui-datepicker-div-'+this._id+'" class="ui-datepicker-inline">'));this._settings=extendRemove(settings||{});if(inline){this._setDate(this._getDefaultDate())}}$.extend(DatepickerInstance.prototype,{_get:function(name){return this._settings[name]!==undefined?this._settings[name]:$.datepicker._defaults[name]},_setDateFromField:function(input){this._input=$(input);var dateFormat=this._get("dateFormat");var dates=this._input?this._input.val().split(this._get("rangeSeparator")):null;this._endDay=this._endMonth=this._endYear=null;var date=defaultDate=this._getDefaultDate();if(dates.length>0){var settings=this._getFormatConfig();if(dates.length>1){date=$.datepicker.parseDate(dateFormat,dates[1],settings)||defaultDate;this._endDay=date.getDate();this._endMonth=date.getMonth();this._endYear=date.getFullYear()}try{date=$.datepicker.parseDate(dateFormat,dates[0],settings)||defaultDate}catch(e){$.datepicker.log(e);date=defaultDate}}this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear();this._currentDay=(dates[0]?date.getDate():0);this._currentMonth=(dates[0]?date.getMonth():0);this._currentYear=(dates[0]?date.getFullYear():0);this._adjustDate()},_getDefaultDate:function(){var date=this._determineDate("defaultDate",new Date());var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(name,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 matches=/^([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?$/.exec(offset);if(matches){var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();switch(matches[2]||"d"){case"d":case"D":day+=(matches[1]-0);break;case"w":case"W":day+=(matches[1]*7);break;case"m":case"M":month+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break}date=new Date(year,month,day)}return date};var date=this._get(name);return(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?offsetNumeric(date):date)))},_setDate:function(date,endDate){this._selectedDay=this._currentDay=date.getDate();this._drawMonth=this._selectedMonth=this._currentMonth=date.getMonth();this._drawYear=this._selectedYear=this._currentYear=date.getFullYear();if(this._get("rangeSelect")){if(endDate){this._endDay=endDate.getDate();this._endMonth=endDate.getMonth();this._endYear=endDate.getFullYear()}else{this._endDay=this._currentDay;this._endMonth=this._currentMonth;this._endYear=this._currentYear}}this._adjustDate()},_getDate:function(){var startDate=(!this._currentYear||(this._input&&this._input.val()=="")?null:new Date(this._currentYear,this._currentMonth,this._currentDay));if(this._get("rangeSelect")){return[startDate,(!this._endYear?null:new Date(this._endYear,this._endMonth,this._endDay))]}else{return startDate}},_generateDatepicker:function(){var today=new Date();today=new Date(today.getFullYear(),today.getMonth(),today.getDate());var showStatus=this._get("showStatus");var isRTL=this._get("isRTL");var clear=(this._get("mandatory")?"":'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate('+this._id+');"'+(showStatus?this._addStatus(this._get("clearStatus")||"&#xa0;"):"")+">"+this._get("clearText")+"</a></div>");var controls='<div class="ui-datepicker-control">'+(isRTL?"":clear)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(showStatus?this._addStatus(this._get("closeStatus")||"&#xa0;"):"")+">"+this._get("closeText")+"</a></div>"+(isRTL?clear:"")+"</div>";var prompt=this._get("prompt");var closeAtTop=this._get("closeAtTop");var hideIfNoPrevNext=this._get("hideIfNoPrevNext");var numMonths=this._getNumberOfMonths();var stepMonths=this._get("stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");var drawMonth=this._drawMonth;var drawYear=this._drawYear;if(maxDate){var maxDraw=new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate());maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(new Date(drawYear,drawMonth,1)>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}var prev='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(-1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+", -"+stepMonths+", 'M');\""+(showStatus?this._addStatus(this._get("prevStatus")||"&#xa0;"):"")+">"+this._get("prevText")+"</a>":(hideIfNoPrevNext?"":"<label>"+this._get("prevText")+"</label>"))+"</div>";var next='<div class="ui-datepicker-next">'+(this._canAdjustMonth(+1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+", +"+stepMonths+", 'M');\""+(showStatus?this._addStatus(this._get("nextStatus")||"&#xa0;"):"")+">"+this._get("nextText")+"</a>":(hideIfNoPrevNext?">":"<label>"+this._get("nextText")+"</label>"))+"</div>";var html=(prompt?'<div class="ui-datepicker-prompt">'+prompt+"</div>":"")+(closeAtTop&&!this._inline?controls:"")+'<div class="ui-datepicker-links">'+(isRTL?next:prev)+(this._isInRange(today)?'<div class="ui-datepicker-current"><a onclick="jQuery.datepicker._gotoToday('+this._id+');"'+(showStatus?this._addStatus(this._get("currentStatus")||"&#xa0;"):"")+">"+this._get("currentText")+"</a></div>":"")+(isRTL?prev:next)+"</div>";var showWeeks=this._get("showWeeks");for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=new Date(drawYear,drawMonth,this._selectedDay);html+='<div class="ui-datepicker-one-month'+(col==0?" ui-datepicker-new-row":"")+'">'+this._generateMonthYearHeader(drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead><tr class="ui-datepicker-title-row">'+(showWeeks?"<td>"+this._get("weekHeader")+"</td>":"");var firstDay=this._get("firstDay");var changeFirstDay=this._get("changeFirstDay");var dayNames=this._get("dayNames");var dayNamesShort=this._get("dayNamesShort");var dayNamesMin=this._get("dayNamesMin");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var status=this._get("dayStatus")||"&#xa0;";status=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="<td"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!changeFirstDay?"<span":'<a onclick="jQuery.datepicker._changeFirstDay('+this._id+", "+day+');"')+(showStatus?this._addStatus(status):"")+' title="'+dayNames[day]+'">'+dayNamesMin[day]+(changeFirstDay?"</a>":"</span>")+"</td>"}html+="</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==this._selectedYear&&drawMonth==this._selectedMonth){this._selectedDay=Math.min(this._selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var currentDate=(!this._currentDay?new Date(9999,9,9):new Date(this._currentYear,this._currentMonth,this._currentDay));var endDate=this._endDay?new Date(this._endYear,this._endMonth,this._endDay):currentDate;var printDate=new Date(drawYear,drawMonth,1-leadDays);var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var beforeShowDay=this._get("beforeShowDay");var showOtherMonths=this._get("showOtherMonths");var calculateWeek=this._get("calculateWeek")||$.datepicker.iso8601Week;var dateStatus=this._get("statusForDate")||$.datepicker.dateStatus;for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="ui-datepicker-days-row">'+(showWeeks?'<td class="ui-datepicker-week-col">'+calculateWeek(printDate)+"</td>":"");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((this._input?this._input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="ui-datepicker-days-cell'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end-cell":"")+(otherMonth?" ui-datepicker-otherMonth":"")+(printDate.getTime()==selectedDate.getTime()&&drawMonth==this._selectedMonth?" ui-datepicker-days-cell-over":"")+(unselectable?" ui-datepicker-unselectable":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-datepicker-current-day":"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+(unselectable?"":" onmouseover=\"jQuery(this).addClass('ui-datepicker-days-cell-over');"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+this._id+"').html('"+(dateStatus.apply((this._input?this._input[0]:null),[printDate,this])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('ui-datepicker-days-cell-over');"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+this._id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay('+this._id+","+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?printDate.getDate():"<a>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1)}html+="</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}html+="</tbody></table></div>"}}html+=(showStatus?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+this._id+'" class="ui-datepicker-status">'+(this._get("initStatus")||"&#xa0;")+"</div>":"")+(!closeAtTop&&!this._inline?controls:"")+'<div style="clear: both;"></div>'+($.browser.msie&&parseInt($.browser.version)<7&&!this._inline?'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>':"");return html},_generateMonthYearHeader:function(drawMonth,drawYear,minDate,maxDate,selectedDate,secondary){minDate=(this._rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var showStatus=this._get("showStatus");var html='<div class="ui-datepicker-header">';var monthNames=this._get("monthNames");if(secondary||!this._get("changeMonth")){html+=monthNames[drawMonth]+"&#xa0;"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="ui-datepicker-new-month" onchange="jQuery.datepicker._selectMonthYear('+this._id+", this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear("+this._id+');"'+(showStatus?this._addStatus(this._get("monthStatus")||"&#xa0;"):"")+">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNames[month]+"</option>"}}html+="</select>"}if(secondary||!this._get("changeYear")){html+=drawYear}else{var years=this._get("yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=new Date().getFullYear()+parseInt(years[0],10);endYear=new Date().getFullYear()+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+='<select class="ui-datepicker-new-year" onchange="jQuery.datepicker._selectMonthYear('+this._id+", this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear("+this._id+');"'+(showStatus?this._addStatus(this._get("yearStatus")||"&#xa0;"):"")+">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+="</div>";return html},_addStatus:function(text){return" onmouseover=\"jQuery('#ui-datepicker-status-"+this._id+"').html('"+text+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+this._id+"').html('&#xa0;');\""},_adjustDate:function(offset,period){var year=this._drawYear+(period=="Y"?offset:0);var month=this._drawMonth+(period=="M"?offset:0);var day=Math.min(this._selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=new Date(year,month,day);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear()},_getNumberOfMonths:function(){var numMonths=this._get("numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(minMax,checkRange){var date=this._determineDate(minMax+"Date",null);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return date||(checkRange?this._rangeStart:null)},_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(offset,curYear,curMonth){var numMonths=this._getNumberOfMonths();var date=new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1);if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(date)},_isInRange:function(date){var newMinDate=(!this._rangeStart?null:new Date(this._selectedYear,this._selectedMonth,this._selectedDay));newMinDate=(newMinDate&&this._rangeStart<newMinDate?this._rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate("min");var maxDate=this._getMinMaxDate("max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(){var shortYearCutoff=this._get("shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get("dayNamesShort"),dayNames:this._get("dayNames"),monthNamesShort:this._get("monthNamesShort"),monthNames:this._get("monthNames")}},_formatDate:function(day,month,year){if(!day){this._currentDay=this._selectedDay;this._currentMonth=this._selectedMonth;this._currentYear=this._selectedYear}var date=(day?(typeof day=="object"?day:new Date(year,month,day)):new Date(this._currentYear,this._currentMonth,this._currentDay));return $.datepicker.formatDate(this._get("dateFormat"),date,this._getFormatConfig())}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=null}}return target}$.fn.datepicker=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$(document).ready(function(){$(document.body).append($.datepicker._datepickerDiv).mousedown($.datepicker._checkExternalClick)})})(jQuery)
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/js/ui.sortable.js	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(b(B){b A(E,D){9 C=B.2Q.3T&&B.2Q.3S<3R;5(E.2P&&!C){c E.2P(D)}5(E.2O){c!!(E.2O(D)&16)}1O(D=D.1g){5(D==E){c W}}c w}B.3Q("k.o",B.2f(B.k.3P,{3O:b(){9 C=4.6;4.O={};4.g.24("k-o");4.25();4.13=4.f.z?(/7|23/).17(4.f[0].v.e("3N")):w;5(!(/(2N|1s|3M)/).17(4.g.e("Y"))){4.g.e("Y","2N")}4.a=4.g.a();4.3L()},3K:{},k:b(C){c{l:(C||4)["l"],q:(C||4)["q"]||B([]),Y:(C||4)["Y"],3J:(C||4)["1b"],6:4.6,g:4.g,v:(C||4)["j"],3I:C?C.g:X}},t:b(F,E,C,D){B.k.1o.14(4,F,[E,4.k(C)]);5(!D){4.g.3H(F=="1z"?F:"1z"+F,[E,4.k(C)],4.6[F])}},2e:b(E){9 C=(B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)).1F(".k-o-l");9 D=[];E=E||{};C.1v(b(){9 F=(B(4).2L(E.3G||"2K")||"").3F(E.3E||(/(.+)[-=3D](.+)/));5(F){D.1w((E.2M||F[1])+"[]="+(E.2M?F[1]:F[2]))}});c D.3C("&")},2d:b(C){9 D=(B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)).1F(".k-o-l");9 E=[];D.1v(b(){E.1w(B(4).2L(C||"2K"))});c E},2F:b(J){9 E=4.1b.7,D=E+4.r.m,I=4.1b.8,H=I+4.r.n;9 F=J.7,C=F+J.m,K=J.8,G=K+J.n;5(4.6.1r=="2J"||(4.6.1r=="1S"&&4.r[4.13?"m":"n"]>J[4.13?"m":"n"])){c(I+4.a.p.8>K&&I+4.a.p.8<G&&E+4.a.p.7>F&&E+4.a.p.7<C)}Z{c(F<E+(4.r.m/2)&&D-(4.r.m/2)<C&&K<I+(4.r.n/2)&&H-(4.r.n/2)<G)}},2s:b(J){9 E=4.1b.7,D=E+4.r.m,I=4.1b.8,H=I+4.r.n;9 F=J.7,C=F+J.m,K=J.8,G=K+J.n;5(4.6.1r=="2J"||(4.6.1r=="1S"&&4.r[4.13?"m":"n"]>J[4.13?"m":"n"])){5(!(I+4.a.p.8>K&&I+4.a.p.8<G&&E+4.a.p.7>F&&E+4.a.p.7<C)){c w}5(4.13){5(E+4.a.p.7>F&&E+4.a.p.7<F+J.m/2){c 2}5(E+4.a.p.7>F+J.m/2&&E+4.a.p.7<C){c 1}}Z{5(I+4.a.p.8>K&&I+4.a.p.8<K+J.n/2){c 2}5(I+4.a.p.8>K+J.n/2&&I+4.a.p.8<G){c 1}}}Z{5(!(F<E+(4.r.m/2)&&D-(4.r.m/2)<C&&K<I+(4.r.n/2)&&H-(4.r.n/2)<G)){c w}5(4.13){5(D>F&&E<F){c 2}5(E<C&&D>C){c 1}}Z{5(H>K&&I<K){c 1}5(I<G&&H>G){c 2}}}c w},25:b(){4.2I();4.1T()},2I:b(){4.f=[];4.d=[4];9 C=4.f;9 E=[B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)];5(4.6.28){P(9 F=4.6.28.z-1;F>=0;F--){9 H=B(4.6.28[F]);P(9 D=H.z-1;D>=0;D--){9 G=B.1f(H[D],"o");5(G&&!G.6.27){E.1w(B.1L(G.6.f)?G.6.f.14(G.g):B(G.6.f,G.g));4.d.1w(G)}}}}P(9 F=E.z-1;F>=0;F--){E[F].1v(b(){B.1f(4,"o-v",W);C.1w({v:B(4),m:0,n:0,7:0,8:0})})}},1T:b(C){P(9 E=4.f.z-1;E>=0;E--){9 D=4.f[E].v;5(!C){4.f[E].m=(4.6.1l?B(4.6.1l,D):D).1u()}5(!C){4.f[E].n=(4.6.1l?B(4.6.1l,D):D).1t()}9 F=(4.6.1l?B(4.6.1l,D):D).a();4.f[E].7=F.7;4.f[E].8=F.8}P(9 E=4.d.z-1;E>=0;E--){9 F=4.d[E].g.a();4.d[E].O.7=F.7;4.d[E].O.8=F.8;4.d[E].O.m=4.d[E].g.1u();4.d[E].O.n=4.d[E].g.1t()}},3B:b(){4.g.3A("k-o k-o-27").2H("o").3z(".o");4.3y();P(9 C=4.f.z-1;C>=0;C--){4.f[C].v.2H("o-v")}},1Z:b(E){9 C=E||4,F=C.6;5(F.q.3x==3w){9 D=F.q;F.q={g:b(){c B("<2G></2G>").24(D)[0]},1i:b(G,H){H.e(G.a()).e({m:G.1u(),n:G.1t()})}}}C.q=B(F.q.g.14(C.g,C.j)).1q("S").e({Y:"1s"});F.q.1i.14(C.g,C.j,C.q)},2q:b(F){P(9 D=4.d.z-1;D>=0;D--){5(4.2F(4.d[D].O)){5(!4.d[D].O.1a){5(4.26!=4.d[D]){9 I=3v;9 H=X;9 E=4.1b[4.d[D].13?"7":"8"];P(9 C=4.f.z-1;C>=0;C--){5(!A(4.d[D].g[0],4.f[C].v[0])){1X}9 G=4.f[C][4.d[D].13?"7":"8"];5(1k.2E(G-E)<I){I=1k.2E(G-E);H=4.f[C]}}5(!H&&!4.6.2c){1X}5(4.q){4.q.1E()}5(4.d[D].6.q){4.d[D].1Z(4)}Z{4.q=X}H?4.1D(F,H):4.1D(F,X,4.d[D].g);4.t("1W",F);4.d[D].t("1W",F,4);4.26=4.d[D]}4.d[D].t("1a",F,4);4.d[D].O.1a=1}}Z{5(4.d[D].O.1a){4.d[D].t("2k",F,4);4.d[D].O.1a=0}}}},3u:b(F,E){5(4.6.27||4.6.2r=="3t"){c w}9 D=X,C=B(F.1K).2C().1v(b(){5(B.1f(4,"o-v")){D=B(4);c w}});5(B.1f(F.1K,"o-v")){D=B(F.1K)}5(!D){c w}5(4.6.2D&&!E){9 G=w;B(4.6.2D,D).3s("*").3r().1v(b(){5(4==F.1K){G=W}});5(!G){c w}}4.j=D;c W},3q:b(H,F,C){9 J=4.6;4.26=4;4.25();4.l=3p J.l=="b"?B(J.l.3o(4.g[0],[H,4.j])):4.j.2w();5(!4.l.2C("S").z){4.l.1q((J.1q!="s"?J.1q:4.j[0].1g))}4.l.e({Y:"1s",1H:"3n"}).24("k-o-l");4.T={7:(L(4.j.e("3m"),10)||0),8:(L(4.j.e("3l"),10)||0)};4.a=4.j.a();4.a={8:4.a.8-4.T.8,7:4.a.7-4.T.7};4.a.p={7:H.1c-4.a.7,8:H.1e-4.a.8};4.u=4.l.u();9 D=4.u.a();4.a.s={8:D.8+(L(4.u.e("21"),10)||0),7:D.7+(L(4.u.e("22"),10)||0)};4.1j=4.1Y(H);4.r={m:4.l.1u(),n:4.l.1t()};5(J.12){5(J.12.7!=1J){4.a.p.7=J.12.7}5(J.12.23!=1J){4.a.p.7=4.r.m-J.12.23}5(J.12.8!=1J){4.a.p.8=J.12.8}5(J.12.2B!=1J){4.a.p.8=4.r.n-J.12.2B}}4.1U=4.j.1G()[0];5(J.i){5(J.i=="s"){J.i=4.l[0].1g}5(J.i=="h"||J.i=="1d"){4.i=[0-4.a.s.7,0-4.a.s.8,B(J.i=="h"?h:1d).m()-4.a.s.7-4.r.m-4.T.7-(L(4.g.e("2A"),10)||0),(B(J.i=="h"?h:1d).n()||h.S.1g.2y)-4.a.s.8-4.r.n-4.T.8-(L(4.g.e("2x"),10)||0)]}5(!(/^(h|1d|s)$/).17(J.i)){9 G=B(J.i)[0];9 I=B(J.i).a();4.i=[I.7+(L(B(G).e("22"),10)||0)-4.a.s.7,I.8+(L(B(G).e("21"),10)||0)-4.a.s.8,I.7+1k.2z(G.3k,G.29)-(L(B(G).e("22"),10)||0)-4.a.s.7-4.r.m-4.T.7-(L(4.j.e("2A"),10)||0),I.8+1k.2z(G.2y,G.2a)-(L(B(G).e("21"),10)||0)-4.a.s.8-4.r.n-4.T.8-(L(4.j.e("2x"),10)||0)]}}5(J.q){4.1Z()}4.t("1n",H);4.r={m:4.l.1u(),n:4.l.1t()};5(4.6.q!="2w"){4.j.e("2i","3j")}5(!C){P(9 E=4.d.z-1;E>=0;E--){4.d[E].t("3i",H,4)}}5(B.k.15){B.k.15.3h=4}5(B.k.15&&!J.2n){B.k.15.3g(4,H)}4.2j=W;4.2u(H);c W},2t:b(D,E){5(!E){E=4.Y}9 C=D=="1s"?1:-1;c{8:(E.8+4.a.s.8*C-(4.u[0]==h.S?0:4.u[0].N)*C+4.T.8*C),7:(E.7+4.a.s.7*C-(4.u[0]==h.S?0:4.u[0].M)*C+4.T.7*C)}},1Y:b(F){9 G=4.6;9 C={8:(F.1e-4.a.p.8-4.a.s.8+(4.u[0]==h.S?0:4.u[0].N)),7:(F.1c-4.a.p.7-4.a.s.7+(4.u[0]==h.S?0:4.u[0].M))};5(!4.1j){c C}5(4.i){5(C.7<4.i[0]){C.7=4.i[0]}5(C.8<4.i[1]){C.8=4.i[1]}5(C.7>4.i[2]){C.7=4.i[2]}5(C.8>4.i[3]){C.8=4.i[3]}}5(G.11){9 E=4.1j.8+1k.2v((C.8-4.1j.8)/G.11[1])*G.11[1];C.8=4.i?(!(E<4.i[1]||E>4.i[3])?E:(!(E<4.i[1])?E-G.11[1]:E+G.11[1])):E;9 D=4.1j.7+1k.2v((C.7-4.1j.7)/G.11[0])*G.11[0];C.7=4.i?(!(D<4.i[0]||D>4.i[2])?D:(!(D<4.i[0])?D-G.11[0]:D+G.11[0])):D}c C},2u:b(D){4.Y=4.1Y(D);4.1b=4.2t("1s");P(9 C=4.f.z-1;C>=0;C--){9 E=4.2s(4.f[C]);5(!E){1X}5(4.f[C].v[0]!=4.j[0]&&4.j[E==1?"3f":"1G"]()[0]!=4.f[C].v[0]&&!A(4.j[0],4.f[C].v[0])&&(4.6.2r=="3e-3d"?!A(4.g[0],4.f[C].v[0]):W)){4.2h=E==1?"2g":"3c";4.1D(D,4.f[C]);4.t("1W",D);3b}}4.2q(D);4.t("1z",D);5(!4.6.1I||4.6.1I=="x"){4.l[0].2p.7=4.Y.7+"2o"}5(!4.6.1I||4.6.1I=="y"){4.l[0].2p.8=4.Y.8+"2o"}5(B.k.15){B.k.15.3a(4,D)}c w},39:b(E,D){5(B.k.15&&!4.6.2n){B.k.15.38(4,E)}5(4.6.1V){9 C=4;9 F=C.j.a();5(C.q){C.q.2m({18:"37"},(L(4.6.1V,10)||2l)-36)}B(4.l).2m({7:F.7-4.a.s.7-C.T.7+(4.u[0]==h.S?0:4.u[0].M),8:F.8-4.a.s.8-C.T.8+(4.u[0]==h.S?0:4.u[0].N)},L(4.6.1V,10)||2l,b(){C.t("1p",E,X,D);C.1H(E)})}Z{4.t("1p",E,X,D);4.1H(E,D)}c w},1H:b(E,D){5(4.1U!=4.j.1G().1F(".k-o-l")[0]){4.t("1i",E,X,D)}5(!A(4.g[0],4.j[0])){5(4.1U==4.j.1G().1F(".k-o-l")[0]){4.t("1i",E,X,D)}4.t("1E",E,X,D);P(9 C=4.d.z-1;C>=0;C--){5(A(4.d[C].g[0],4.j[0])){4.d[C].t("1i",E,4,D);4.d[C].t("35",E,4,D)}}}P(9 C=4.d.z-1;C>=0;C--){4.d[C].t("34",E,4,D);5(4.d[C].O.1a){4.d[C].t("2k",E,4);4.d[C].O.1a=0}}4.2j=w;5(4.33){c w}B(4.j).e("2i","");5(4.q){4.q.1E()}4.l.1E();c W},1D:b(E,D,C){C?C.32(4.j):D.v[4.2h=="2g"?"31":"30"](4.j);4.1T(W);5(4.6.q){4.6.q.1i.14(4.g,4.j,4.q)}}}));B.2f(B.k.o,{2Z:"2e 2d",2Y:{1r:"1S",2X:0,2W:0,2V:":2U,2T",f:"> *",19:2S,2c:W,1q:"s"}});B.k.1o.1C("o","1h",{1n:b(E,D){9 C=B("S");5(C.e("1h")){D.6.1R=C.e("1h")}C.e("1h",D.6.1h)},1p:b(D,C){5(C.6.1R){B("S").e("1h",C.6.1R)}}});B.k.1o.1C("o","19",{1n:b(E,D){9 C=D.l;5(C.e("19")){D.6.1Q=C.e("19")}C.e("19",D.6.19)},1p:b(D,C){5(C.6.1Q){B(C.l).e("19",C.6.1Q)}}});B.k.1o.1C("o","18",{1n:b(E,D){9 C=D.l;5(C.e("18")){D.6.1P=C.e("18")}C.e("18",D.6.18)},1p:b(D,C){5(C.6.1P){B(C.l).e("18",C.6.1P)}}});B.k.1o.1C("o","1m",{1n:b(E,D){9 F=D.6;9 C=B(4).1f("o");F.V=F.V||20;F.U=F.U||20;C.R=b(G){2b{5(/1B|1m/.17(G.e("1A"))||(/1B|1m/).17(G.e("1A-y"))){c G}G=G.s()}1O(G[0].1g);c B(h)}(C.j);C.Q=b(G){2b{5(/1B|1m/.17(G.e("1A"))||(/1B|1m/).17(G.e("1A-x"))){c G}G=G.s()}1O(G[0].1g);c B(h)}(C.j);5(C.R[0]!=h&&C.R[0].1y!="1x"){C.1N=C.R.a()}5(C.Q[0]!=h&&C.Q[0].1y!="1x"){C.1M=C.Q.a()}},1z:b(E,D){9 F=D.6;9 C=B(4).1f("o");5(C.R[0]!=h&&C.R[0].1y!="1x"){5((C.1N.8+C.R[0].2a)-E.1e<F.V){C.R[0].N=C.R[0].N+F.U}5(E.1e-C.1N.8<F.V){C.R[0].N=C.R[0].N-F.U}}Z{5(E.1e-B(h).N()<F.V){B(h).N(B(h).N()-F.U)}5(B(1d).n()-(E.1e-B(h).N())<F.V){B(h).N(B(h).N()+F.U)}}5(C.Q[0]!=h&&C.Q[0].1y!="1x"){5((C.1M.7+C.Q[0].29)-E.1c<F.V){C.Q[0].M=C.Q[0].M+F.U}5(E.1c-C.1M.7<F.V){C.Q[0].M=C.Q[0].M-F.U}}Z{5(E.1c-B(h).M()<F.V){B(h).M(B(h).M()-F.U)}5(B(1d).m()-(E.1c-B(h).M())<F.V){B(h).M(B(h).M()+F.U)}}}})})(2R)',62,242,'||||this|if|options|left|top|var|offset|function|return|containers|css|items|element|document|containment|currentItem|ui|helper|width|height|sortable|click|placeholder|helperProportions|parent|propagate|offsetParent|item|false|||length||||||||||||parseInt|scrollLeft|scrollTop|containerCache|for|overflowX|overflowY|body|margins|scrollSpeed|scrollSensitivity|true|null|position|else||grid|cursorAt|floating|call|ddmanager||test|opacity|zIndex|over|positionAbs|pageX|window|pageY|data|parentNode|cursor|update|originalPosition|Math|toleranceElement|scroll|start|plugin|stop|appendTo|tolerance|absolute|outerHeight|outerWidth|each|push|HTML|tagName|sort|overflow|auto|add|rearrange|remove|not|prev|clear|axis|undefined|target|isFunction|overflowXOffset|overflowYOffset|while|_opacity|_zIndex|_cursor|guess|refreshPositions|domPosition|revert|change|continue|generatePosition|createPlaceholder||borderTopWidth|borderLeftWidth|right|addClass|refresh|currentContainer|disabled|connectWith|offsetWidth|offsetHeight|do|dropOnEmpty|toArray|serialize|extend|down|direction|visibility|dragging|out|500|animate|dropBehaviour|px|style|contactContainers|type|intersectsWithEdge|convertPositionTo|mouseDrag|round|clone|marginBottom|scrollHeight|max|marginRight|bottom|parents|handle|abs|intersectsWith|div|removeData|refreshItems|pointer|id|attr|key|relative|compareDocumentPosition|contains|browser|jQuery|1000|button|input|cancel|delay|distance|defaults|getter|after|before|append|cancelHelperRemoval|deactivate|receive|50|hide|drop|mouseStop|drag|break|up|dynamic|semi|next|prepareOffsets|current|activate|hidden|scrollWidth|marginTop|marginLeft|both|apply|typeof|mouseStart|andSelf|find|static|mouseCapture|10000|String|constructor|mouseDestroy|unbind|removeClass|destroy|join|_|expression|match|attribute|triggerHandler|sender|absolutePosition|plugins|mouseInit|fixed|float|init|mouse|widget|522|version|safari'.split('|'),0,{}))
-
--- a/web/wp-content/plugins/gigs-calendar/readme.txt	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-=== Gigs Calendar ===
-Contributors: dancoulter
-Tags: gigs, shows, calendar, musician, artist
-Requires at least: 2.7
-Tested up to: 2.8.4
-Stable tag: 0.4.7
-
-Manage and display a calendar of your gigs/shows/performances.
-
-== Description ==
-
-This plugin is geared toward bands and musicians to manage and display a
-calendar of their gigs within WordPress.  It's meant to be as easy as possible
-for both the musician and the fan.  It even manages venue data complete
-with mapping and ticket links.
-
-== Installation ==
-
-Simply drop the files into a folder in your WordPress plugins folder.  Once
-you've activated the plugin, go to Manage -> Gigs Calendar in your WordPress
-admin panel.  You'll probably want to set which WordPress page you want your 
-calendar to appear on.  Once you've saved that, you are ready to get started.
-
-== Compatibility notes ==
-= Browser =
-This plugin's administration pages are currently only supported fully by the 
-Firefox and Safari browsers.  When I am approaching version 1.0, I plan to
-develop full support for IE7 and Opera.  If you would like to know more about
-my decision to focus on Firefox and Safari, feel free to get in touch with me.
-
-= WordPress =
-If you are using a WordPress version less than 2.3, you may need to create the
-database tables manually.  You can find the SQL in tables.sql. Get in touch with
-me if you need help doing that. You might also want to consider updating to the
-most recent version of WordPress.
-
-= MySQL =
-If you are using a MySQL version less than 4.1, filtering the gig posts from
-your normal blog entries will be disabled.  You will need to filter those based
-on the category you select in the settings page using another plugin.  I suggest
-the Advanced Category Excluder (http://wordpress.org/extend/plugins/advanced-category-excluder/) plugin.
--- a/web/wp-content/plugins/gigs-calendar/rss.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-<?php
-
-header('Content-Type: application/rss+xml; charset=utf-8');
-define('GIGS_PUBLIC', 1);
-define('GIGS_RSS', 1);
-require_once 'ajaxSetup.php';
-require_once 'version.php';
-
-$query = '
-    SELECT p.* 
-    FROM 
-		' . $wpdb->posts . ' p,
-		' . TABLE_GIGS . ' g
-    WHERE 
-		p.ID = g.postID AND
-		g.date >= CURDATE()
-	
-    ORDER BY g.date
-';
-
-$posts = $wpdb->get_results($query);
-echo '<?xml version="1.0"?>'; 
-?>
-<rss version="2.0">
-	<channel>
-		<title><?php bloginfo('name') ?> - <?php _e('Upcoming Gigs feed', $gcd); ?></title>
-		<?php if ( !empty($options['parent']) ) : ?>
-			<link><?php echo get_permalink($options['parent']); ?></link>
-		<?php else : ?>
-			<link><?php get_bloginfo('wpurl') ?></link>
-		<?php endif; ?>
-		
-		<generator>Gigs Calendar v<?php echo DTC_GIGS_PLUGIN_VERSION ?></generator>
-		<description></description>
- <?php if ($posts): ?>
-	<?php foreach ($posts as $post): ?>
-		<?php setup_postdata($post); ?>
-		<?php $g = new gig(); $g->getByPostID($post->ID); $p = $g->getPerformances(); $p->fetch(); ?>
-		<item>
-			<title><?php echo the_title() ?></title>
-			<link><?php the_permalink(); ?></link>
-			<pubDate><?php echo date('r', strtotime($g->date . ' ' . $p->time)); ?></pubDate>
-
-			<description>
-				<![CDATA[
-					<?php the_content(); ?>
-				]]>
-			</description>
-			<guid><?php the_guid(); ?></guid>
-			
-		</item>
-
-	<?php endforeach; ?>
-<?php endif; ?>
-	
-	</channel>
-</rss>
--- a/web/wp-content/plugins/gigs-calendar/settings.ajax.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,488 +0,0 @@
-<?php
-require_once 'ajaxSetup.php';
-
-$date_defaults = array(
-	'short' => 'm/d/y',
-	'archive' => 'm/d/y',
-	'long' => 'l, F j, Y',
-);
-
-
-switch ( $_POST['action'] ) :
-	case 'load':
-		$listFields = array(
-			'city' => __('City', $gcd),
-			'country' => __('Country', $gcd),
-			'venue' => __('Venue', $gcd),
-			'eventName' => __('Event Name', $gcd),
-			'date' => __('Date', $gcd),
-			'time' => __('Time', $gcd),
-			'shortNotes' => __('Short Notes', $gcd),
-			'tickets' => __('Ticket Link', $gcd),
-			'map' => __('Map Link', $gcd),
-		);
-		
-		$titleFields = array(
-			'city' => __('City', $gcd),
-			'venue' => __('Venue', $gcd),
-			'country' => __('Country', $gcd),
-			'eventName' => __('Event Name', $gcd),
-			'date' => __('Date', $gcd),
-		);
-		
-		$defaults = array(
-			'archive' => -1,
-			'category' => get_option('default_category'),
-			'no-upcoming' => __('Sorry, there aren&rsquo;t any upcoming gigs right now.  Check back soon!', $gcd),
-			'no-past' => __('There aren&rsquo;t any gigs here right now.  Check back soon!', $gcd),
-			'silk-link' => 1,
-			'b4b-link' => 1,
-			'rss-link' => 1,
-			'gigs-table-show' => array_keys($listFields),
-			'gig-title-show' => array('city', 'date'),
-			'eventName-label' => __("Who", $gcd),
-			'ages-list' => array(__('All Ages', $gcd), __('21+', $gcd), __('16+', $gcd)),
-			'list-venue-link' => 0,
-			'list-headers' => 0,
-			'template' => 'basic',
-			'time-12h' => 1,
-			'calendar-position' => "bottom",
-			'tbd-text' => __("TBD"),
-			'tours-display' => 0,
-			'tours-empty' => 0,
-			'tours-sort' => 'date',
-			'user_level' => 'level_5',
-			'post-filtering' => 1,
-			'admin-only-settings' => 0,
-		);
-		
-		unset($defaults['gigs-table-show'][array_search('eventName', $defaults['gigs-table-show'])]);
-		unset($defaults['gigs-table-show'][array_search('country', $defaults['gigs-table-show'])]);
-		
-		if ( is_array($options) ) {
-			$options = array_merge($defaults, $options);
-		} else {
-			$options = $defaults;
-		}
-		if ( is_array($options['date']) ) {
-			$options['date'] = array_merge($date_defaults, $options['date']);
-		} else {
-			$options['date'] = $date_defaults;
-		}
-		
-		if ( (int) get_option('gig_db_version') == -1 ) {
-			die (__('Oops! It looks like you&rsquo;re missing some or all of the tables required for this plugin.  They should have been created automatically, but you can create them with the tables.sql file in the same folder as this plugin.  If you have any questions, you can use the feedback form in the next tab.'));
-		}
-		?>
-			<?php if ( empty($options['parent']) && $options['calendar-position'] != 'custom' ) : ?>
-				<div><?php _e('You need to select a page to list your calendar.  You may need to go create a <a href="page-new.php">new page</a> first.', $gcd) ?></div>
-			<?php endif; ?>
-			<?php if ( 4.1 > mysql_get_server_info() ) : ?>
-				<div>
-					<?php _e('<span style="font-weight: bold">Warning:</span> You are running MySQL server version <?php echo mysql_get_server_info(); ?>.  This plugin requires version 4.1 or higher to hide the future gig posts from your homepage.  Your best option is to use a plugin like <a href="http://wordpress.org/extend/plugins/advanced-category-excluder/">Advanced Category Excluder</a> to hide the gigs using the category option below.'); ?>
-				</div>
-			<?php endif; ?>
-			<form id="settings-form" method="post">
-				<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-				<input type="hidden" name="action" value="save" />
-				<h3><?php _e('General Options', $gcd) ?></h3>
-				<div><label>
-					<?php _e('Select a location for the calendars on the page:', $gcd) ?> 
-					<select name="calendar-position">
-						<option value="top" <?php if ( isset($options['calendar-position']) && $options['calendar-position'] == 'top') echo 'selected="selected"'; ?>><?php _e('Top', $gcd) ?></option>
-						<option value="bottom" <?php if ( isset($options['calendar-position']) && $options['calendar-position'] == 'bottom') echo 'selected="selected"'; ?>><?php _e('Bottom', $gcd) ?></option>
-						<option value="custom" <?php if ( isset($options['calendar-position']) && $options['calendar-position'] == 'custom') echo 'selected="selected"'; ?>><?php _e('Custom', $gcd) ?></option>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Display gigs as normal blog posts (turns off filtering):', $gcd) ?> 
-					<select name="post-filtering">
-						<option value="0" <?php if ( isset($options['post-filtering']) && $options['post-filtering'] == '0') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="1" <?php if ( isset($options['post-filtering']) && $options['post-filtering'] == '1') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-				
-				<div><?php _e('Note: If you select the custom location option, you don&rsquo;t have to select a page, but you won&rsquo;t get a link back to the calendar', $gcd); ?></div>
-				<div><label>
-					<?php _e('Select a page to house your calendar:', $gcd) ?> 
-					<?php wp_dropdown_pages('show_option_none=' . __('--None--', $gcd) . '&name=parent&selected=' . $options['parent']); ?>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Select a page to house your gigs archive:', $gcd) ?> 
-					<?php wp_dropdown_pages('show_option_none=' . __('--None--', $gcd) . '&name=archive&selected=' . $options['archive']); ?>
-				</label></div>
-
-				<div><label>
-					<?php _e('Select a category that gigs should be created under:', $gcd) ?> 
-					<select name="category">
-						<?php foreach ( get_categories(array('hide_empty'=>false)) as $cat ) : ?>
-							<?php if ( (float) $wp_version < 2.3 ) : ?>
-								<option value="<?php echo $cat->cat_ID ?>" <?php if ( isset($options['category']) && $options['category'] == $cat->cat_ID) echo 'selected="selected"'; ?>><?php echo $cat->cat_name ?></option>
-							<?php else : ?>
-								<option value="<?php echo $cat->term_id ?>" <?php if ( isset($options['category']) && $options['category'] == $cat->term_id) echo 'selected="selected"'; ?>><?php echo $cat->name ?></option>
-							<?php endif; ?>
-						<?php endforeach; ?>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Display this message if there are no upcoming gigs:', $gcd) ?><br />
-					<textarea rows="2" cols="50" name="no-upcoming"><?php echo $options['no-upcoming'] ?></textarea>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Display this message if there are no past gigs:', $gcd) ?><br />
-					<textarea rows="2" cols="50" name="no-past"><?php echo $options['no-past'] ?></textarea>
-				</label></div>
-
-				<h3><?php _e('Administration Options', $gcd) ?></h3>
-				
-				<div><label>
-					<?php _e('Minimum permission level to administer the calendar: ', $gcd) ?> 
-					<select name="user_level">
-						<?php
-							$levels = array(
-								'level_0' => __('Subscriber', $gcd),
-								'level_1' => __('Contributor', $gcd),
-								'level_2' => __('Author', $gcd),
-								'level_5' => __('Editor', $gcd),
-								'level_8' => __('Administrator', $gcd),
-							);
-							foreach ( $levels as $level => $name ) {
-								?>
-									<option value="<?php echo $level; ?>" <?php if ( $options['user_level'] == $level) echo 'selected="selected"'; ?>><?php echo $name ?></option>
-								<?php
-							}
-						?>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Only allow blog administrators to change calendar settings:', $gcd) ?> 
-					<select name="admin-only-settings">
-						<option value="1" <?php if ( isset($options['admin-only-settings']) && $options['admin-only-settings'] == '1') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['admin-only-settings']) && $options['admin-only-settings'] == '0') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-
-				
-				<h4><?php _e('Performances', $gcd) ?></h4>
-				<div><?php _e('Options you want in the "ages" dropdown.', $gcd) ?></div>
-				<ul id="ages-list" class="sortable">
-					<?php foreach ( $options['ages-list'] as $field ) : ?>
-						<li class="ages-list-item">
-							<input type="hidden" name="ages-list[]" value="<?php echo $field ?>" />
-							<img alt="<? _e('Delete', $gcd) ?>" title="<? _e('Delete', $gcd) ?>" class="delete icon clickable" src="<?php echo $folder ?>images/delete.png" />
-							<span class="handle name"><?php echo $field ?></span>
-						</li>
-					<?php endforeach; ?>
-				</ul>
-				<input type="text" id="new-age" /> <img src="<?php echo $folder ?>images/add.png" id="add-new-age" alt="<? _e('Add', $gcd) ?>" title="<? _e('Add', $gcd) ?>" />
-				
-				<h3><?php _e('Display Options', $gcd) ?></h3>
-				<div><label>
-					<?php _e('Display template: ', $gcd) ?> 
-					<select name="template">
-						<?php
-							$templates = array();
-							$template_dir = opendir(dirname(__FILE__) . '/templates');
-							while ( $dir = readdir($template_dir) ) {
-								if ( substr($dir, 0, 1) != '.' && is_dir(dirname(__FILE__) . '/templates/' . $dir) ) {
-									$templates[] = $dir;
-								}
-							}
-							
-							if ( file_exists(ABSPATH . 'wp-content/gigs-templates') ) {
-								$template_dir = opendir(ABSPATH . 'wp-content/gigs-templates');
-								while ( $dir = readdir($template_dir) ) {
-									if ( substr($dir, 0, 1) != '.' && is_dir(ABSPATH . 'wp-content/gigs-templates/' . $dir) ) {
-										$templates[] = $dir;
-									}
-								}
-							}
-							
-							sort($templates);
-							foreach ( $templates as $dir ) {
-								?>
-									<option <?php if ( $options['template'] == $dir) echo 'selected="selected"'; ?>><?php echo $dir ?></option>
-								<?php
-							}
-						?>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Short date format:', $gcd) ?>
-					<input type="text" name="date-short" value="<?php if ( isset($options['date']['short']) ) dtcGigs::escapeForInput($options['date']['short']); ?>" />
-				</label> <?php _e('(uses PHP&rsquo;s <a href="http://php.net/date">date()</a> function format)', $gcd) ?></div>
-				<div><label>
-					<?php _e('Archives date format:', $gcd) ?>
-					<input type="text" name="date-archive" value="<?php if ( isset($options['date']['archive']) ) dtcGigs::escapeForInput($options['date']['archive']); ?>" />
-				</label> <?php _e('(uses PHP&rsquo;s <a href="http://php.net/date">date()</a> function format)', $gcd) ?></div>
-				
-				<div><label>
-					<?php _e('Long date format:', $gcd) ?>
-					<input type="text" name="date-long" value="<?php if ( isset($options['date']['long']) ) dtcGigs::escapeForInput($options['date']['long']); ?>" />
-				</label> <?php _e('(uses PHP&rsquo;s <a href="http://php.net/date">date()</a> function format)', $gcd) ?></div>
-				
-				<div><label>
-					<?php _e('Time format:', $gcd) ?> 
-					<select name="time-12h">
-						<option value="1" <?php if ( isset($options['time-12h']) && $options['time-12h'] == '1') echo 'selected="selected"'; ?>><?php _e('12 Hour', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['time-12h']) && $options['time-12h'] == '0') echo 'selected="selected"'; ?>><?php _e('24 Hour', $gcd) ?></option>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Text to display when the time is "To be determined":', $gcd) ?>
-					<input type="text" name="tbd-text" value="<?php if ( isset($options['tbd-text']) ) dtcGigs::escapeForInput($options['tbd-text']); ?>" />
-				</label></div>
-
-				
-				<h4><?php _e('Gigs page table', $gcd) ?></h4>
-				<div><?php _e('You can sort the fields by clicking on the names and dragging.', $gcd) ?></div>
-				<ul id="gigs-table" class="sortable">
-					<?php if ( isset($options['gigs-table-show']) && is_array($options['gigs-table-show']) ) : ?>
-						<?php foreach ( $options['gigs-table-show'] as $field ) : ?>
-							<li class="gigs-table-cell">
-								<input type="checkbox" name="gigs-table-show[]" value="<?php echo $field ?>" checked="checked" />
-								<span class="handle name"><?php echo $listFields[$field] ?></span>
-							</li>
-						<?php endforeach; ?>
-					<?php endif ?>
-					<?php foreach ( $listFields as $key => $value ) : ?>
-						<?php if ( !isset($options['gigs-table-show']) || !is_array($options['gigs-table-show']) || !in_array($key, $options['gigs-table-show']) ) : ?>
-							<li class="gigs-table-cell">
-								<input type="checkbox" name="gigs-table-show[]" value="<?php echo $key ?>" />
-								<span class="handle name"><?php echo $value ?></span>
-							</li>
-						<?php endif; ?>
-					<?php endforeach; ?>
-				</ul>
-				<div><label>
-					<?php _e('Field to use for the link to the gig:', $gcd) ?> 
-					<select name="gig-link-field">
-						<?php foreach ( $listFields as $key => $value ) : ?>
-							<?php if ( !in_array($key, array('tickets', 'map', 'shortNotes')) ) : ?>
-								<option value="<?php echo $key ?>" <?php if ( isset($options['gig-link-field']) && $options['gig-link-field'] == $key) echo 'selected="selected"'; ?>><?php echo $value; ?></option>
-							<?php endif; ?>
-						<?php endforeach; ?>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Link to the venue&rsquo;s website from the gig list?', $gcd) ?> 
-					<select name="list-venue-link">
-						<option value="1" <?php if ( isset($options['list-venue-link']) && $options['list-venue-link'] == '1') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['list-venue-link']) && $options['list-venue-link'] == '0') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Display column headers?', $gcd) ?> 
-					<select name="list-headers">
-						<option value="1" <?php if ( isset($options['list-headers']) && $options['list-headers'] == '1') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['list-headers']) && $options['list-headers'] == '0') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Link to Gigs RSS feed?', $gcd) ?> 
-					<select name="rss-link">
-						<option value="1" <?php if ( isset($options['rss-link']) && $options['rss-link'] == '1') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['rss-link']) && $options['rss-link'] == '0') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-				
-				<h4><?php _e('Single Gig Page', $gcd) ?></h4>
-				
-				<div><?php _e('Select and drag the fields for the gig post title.', $gcd) ?></div>
-				<ul id="gig-title" class="sortable">
-					<?php if ( isset($options['gig-title-show']) && is_array($options['gig-title-show']) ) : ?>
-						<?php foreach ( $options['gig-title-show'] as $field ) : ?>
-							<li class="gig-title-cell">
-								<input type="checkbox" name="gig-title-show[]" value="<?php echo $field ?>" checked="checked" />
-								<span class="handle name"><?php echo $titleFields[$field] ?></span>
-							</li>
-						<?php endforeach; ?>
-					<?php endif ?>
-					<?php foreach ( $titleFields as $key => $value ) : ?>
-						<?php if ( !isset($options['gig-title-show']) || !is_array($options['gig-title-show']) || !in_array($key, $options['gig-title-show']) ) : ?>
-							<li class="gig-title-cell">
-								<input type="checkbox" name="gig-title-show[]" value="<?php echo $key ?>" />
-								<span class="handle name"><?php echo $value ?></span>
-							</li>
-						<?php endif; ?>
-					<?php endforeach; ?>
-				</ul>
-
-				<div><label>
-					<?php _e('Label next to the event name:', $gcd) ?>
-					<input type="text" name="eventName-label" value="<?php if ( isset($options['eventName-label']) ) dtcGigs::escapeForInput($options['eventName-label']); ?>" />
-				</label></div>
-
-				<h4><?php _e('Tours Options', $gcd) ?></h4>
-				<div><label>
-					<?php _e('Do you want to split gigs by tour on your calendar page?', $gcd) ?>
-					<select name="tours-display">
-						<option value="1" <?php if ( isset($options['tours-display']) && $options['tours-display'] == '1') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['tours-display']) && $options['tours-display'] == '0') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('Do you want to display empty tours?', $gcd) ?>
-					<select name="tours-empty">
-						<option value="1" <?php if ( isset($options['tours-empty']) && $options['tours-empty'] == '1') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['tours-empty']) && $options['tours-empty'] == '0') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-				
-				<div><label>
-					<?php _e('How should the tours be ordered?', $gcd) ?>
-					<select name="tours-sort">
-						<option value="date" <?php if ( isset($options['tours-sort']) && $options['tours-sort'] == 'date') echo 'selected="selected"'; ?>><?php _e('Date of the earliest gig', $gcd) ?></option>
-						<option value="alpha" <?php if ( isset($options['tours-sort']) && $options['tours-sort'] == 'alpha') echo 'selected="selected"'; ?>><?php _e('Alphabetical', $gcd) ?></option>
-						<!--<option value="custom" <?php if ( isset($options['tours-sort']) && $options['tours-sort'] == 'custom') echo 'selected="selected"'; ?>><?php _e('Custom', $gcd) ?></option>-->
-					</select>
-				</label></div>
-
-
-				<h3><?php _e('Credits', $gcd) ?></h3>
-				<div><label>
-					<?php _e('Do you want to link back to me for building this plugin?', $gcd) ?>
-					<select name="b4b-link">
-						<option value="1" <?php if ( isset($options['b4b-link']) && $options['b4b-link'] == '1') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['b4b-link']) && $options['b4b-link'] == '0') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-				<div style="margin: 0px 1.5em 1em;">
-					<?php _e('<b>Note</b>: It&rsquo;s ok to say "no".  I&rsquo;ve offered this freely with no expectations, but I&rsquo;d be very grateful if you said "yes"', $gcd) ?>
-				</div>
-				
-				<div><label>
-					<?php _e('Do you want to link back to <a target="_blank" href="http://www.famfamfam.com/lab/icons/silk/">Mark James</a> for the Silk icons?', $gcd) ?>
-					<select name="silk-link">
-						<option value="1" <?php if ( isset($options['silk-link']) && $options['silk-link'] == '1') echo 'selected="selected"'; ?>><?php _e('Yes', $gcd) ?></option>
-						<option value="0" <?php if ( isset($options['silk-link']) && $options['silk-link'] == '0') echo 'selected="selected"'; ?>><?php _e('No', $gcd) ?></option>
-					</select>
-				</label></div>
-				<div style="margin: 0px 1.5em;">
-					<?php _e('<b>Note</b>: The Silk Icons that I used in this plugin are licensed under the <a target="_blank" href="http://creativecommons.org/licenses/by/2.5/">Creative Commons</a>. You must link back to him somewhere on your site.  If you link to him on another page, giving him credit, or you have replaced the icons, or you do not display any of them publicly on your site, you may turn off this link.', $gcd) ?></div>
-							
-				<br /><br />
-				<div>
-					<input type="submit" class="button" value="<?php _e('Save Options', $gcd) ?>" /><br />
-					<?php _e('If you made changes that would affect posts, do you want changes applied to existing gigs (possibly breaking existing links)?', $gcd); ?>
-					<select name="apply-changes">
-						<option value="no"><?php _e('No', $gcd); ?></option>
-						<option value="future"><?php _e('Yes, future gigs only', $gcd); ?></option>
-						<option value="all"><?php _e('Yes, all gigs, please', $gcd); ?></option>
-					</select>
-				</div>
-			</form>
-			
-			<script type="text/javascript">
-				(function($){
-					setupEvents = function() {
-						jQuery("#settings form").ajaxForm({
-							url:pageTarget,
-							success:function(){
-								if ( jQuery("#gigs-menu li").length == 3 ) {
-									window.location.reload();
-								} else {
-									gigs_page_load("settings");
-								}
-							}
-						});
-						
-
-						$("#gigs-table").sortable({
-							handle : "span.name",
-							axis:'y'
-						});
-						
-						$("#gig-title").sortable({
-							handle : "span.name",
-							axis:'y'
-						});
-						
-						$("#ages-list").sortable({
-							handle : "span.name",
-							axis:'y'
-						});
-						
-						$("#add-new-age").click(function(){
-							$("#ages-list").append('<li class="ages-list-item"><input type="hidden" value="' + $("#new-age").val() + '" name="ages-list[]"/><img src="http://dev.ssdn.us/wp-content/plugins/gigs-calendar/images/delete.png" class="delete icon clickable" title="Delete" alt="Delete"/> <span class="handle name" style="-moz-user-select: none;">' + $("#new-age").val() + '</span></li>');
-							$("#new-age").val("");
-							$(".ages-list-item").find(".delete").unbind("click");
-							$(".ages-list-item").find(".delete").click(function(){
-								$(this).parents("li.ages-list-item").remove();
-							});
-
-						});
-						
-						
-						$("#new-age").keypress(function(e){
-							if ( e.keyCode == 13 ) {
-								$("#add-new-age").click();
-								return false;
-							}
-						});
-						
-						$(".ages-list-item").find(".delete").click(function(){
-							$(this).parents("li.ages-list-item").remove();
-						});
-						
-						
-					}
-				}(jQuery));
-				
-				setTimeout("setupEvents();");
-			</script>
-			
-
-		<?php
-		break;
-	case 'save':
-		$args = $_POST;
-		
-		$dates = array(
-			'short' => (empty($args['date-short']) ? $date_defaults['short'] : $args['date-short']),
-			'archive' => (empty($args['date-archive']) ? $date_defaults['archive'] : $args['date-archive']),
-			'long' => (empty($args['date-long']) ? $date_defaults['long'] : $args['date-long']),
-		);
-		
-		unset($args['apply-changes'], $args['nonce'], $args['action'], $args['date-long'], $args['date-archive'], $args['date-short'], $args['long-date-format'], $args['short-date-format']);
-		
-		foreach ( $args as $key => $value ) {
-			if ( is_string($value) ) {
-				$args[$key] = stripslashes($value);
-			}
-		}
-		
-		$options = get_option('gigs-calendar');
-		if ( is_array($options) ) {
-			$args = array_merge($options, $args);
-		}
-		if ( is_array($args['date']) ) {
-			$args['date'] = array_merge($args['date'], $dates);
-		} else {
-			$args['date'] = $dates;
-		}
-
-		update_option('gigs-calendar', $args);
-		$options = get_option('gigs-calendar');
-		if ( $_POST['apply-changes'] != 'no' ) {
-			$g = new gig();
-			$g->search('future' == $_POST['apply-changes'] ? 'date >= CURDATE()' : null);
-			while ( $g->fetch() ) {
-				$g->save(false);
-			}
-		}
-		break;
-endswitch;
-
-?>
--- a/web/wp-content/plugins/gigs-calendar/tables.sql	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
--- Database tables for the Gigs Calendar Plugin v0.2
--- Database version: 2
-
--- Note: Ignore this file unless your database tables are not created automatically.
--- Replace "[Your database prefix here]" with the appropriate database prefix, for example "wp_".
-
--- --------------------------------------------------------
-
-CREATE TABLE IF NOT EXISTS `[Your database prefix here]gigs_gig` (
-  `id` int(10) unsigned NOT NULL auto_increment,
-  `venueID` int(10) unsigned NOT NULL,
-  `date` date NOT NULL,
-  `notes` text NOT NULL,
-  `postID` bigint(20) unsigned NOT NULL,
-  `eventName` varchar(255) NOT NULL,
-  `tour_id` INT UNSIGNED NULL,
-  PRIMARY KEY  (`id`)
-);
-
--- --------------------------------------------------------
-
-CREATE TABLE IF NOT EXISTS `[Your database prefix here]gigs_performance` (
-  `id` int(10) unsigned NOT NULL auto_increment,
-  `gigID` int(10) unsigned NOT NULL,
-  `time` time default NULL,
-  `link` varchar(255) NOT NULL,
-  `shortNotes` varchar(255) NOT NULL,
-  `ages` varchar(255) NOT NULL,
-  PRIMARY KEY  (`id`)
-);
-
--- --------------------------------------------------------
-
-CREATE TABLE `[Your database prefix here]gigs_tour` (
-  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-  `name` VARCHAR( 255 ) NOT NULL ,
-  `notes` MEDIUMTEXT NOT NULL ,
-  `pos` INT UNSIGNED NOT NULL
-);
--- --------------------------------------------------------
-
-CREATE TABLE IF NOT EXISTS `[Your database prefix here]gigs_venue` (
-  `id` int(10) unsigned NOT NULL auto_increment,
-  `name` varchar(255) NOT NULL,
-  `address` text NOT NULL,
-  `city` varchar(255) NOT NULL,
-  `state` varchar(255) NOT NULL,
-  `country` varchar(255) NOT NULL,
-  `postalCode` varchar(255) NOT NULL,
-  `contact` varchar(255) NOT NULL,
-  `phone` varchar(255) NOT NULL,
-  `email` varchar(255) NOT NULL,
-  `link` varchar(255) NOT NULL,
-  `notes` text NOT NULL,
-  `private` tinyint(4) NOT NULL,
-  `apiID` int(10) unsigned NOT NULL,
-  `deleted` tinyint(4) NOT NULL,
-  `customMap` varchar(255) NOT NULL,
-  PRIMARY KEY  (`id`)
-);
--- a/web/wp-content/plugins/gigs-calendar/templates/basic/attribution.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?php /* Please leave the links as is, so that the user can choose to link back to the appropriate places. */ ?>
-<div class="attribution">
-	<?php if ( $options['b4b-link'] ) : ?>
-		<span class="b4b"><?php _e('Powered by <a target="_blank" href="http://blogsforbands.com">Blogs for Bands</a>', $gcd); ?></span>
-	<?php endif; ?>
-	<?php if ( $options['silk-link'] ) : ?>
-		<span class="silk"><?php _e('Silk icons by <a target="_blank" href="http://www.famfamfam.com/lab/icons/silk/">Mark James</a>', $gcd); ?></span>
-	<?php endif; ?>
-</div>
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/templates/basic/gig-post.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-<div class="gig-post <?php echo dtcGigs::get_gig_css_classes($g) ?>" id="gig-<?php echo $g->id ?>">
-	<table>
-		<tbody>
-			<?php if ( !empty($g->eventName) ) : ?>
-				<tr class="eventName">
-					<td class="bold" valign="top"><?php echo $options['eventName-label'] ?></td>
-					<td><div class="eventName"><?php echo $g->eventName ?></div></td>
-				</tr>
-			<?php endif; ?>
-			<tr class="when">
-				<td class="bold" valign="top"><?php _e('When', $gcd); ?></td>
-				<td>
-					<div class="date"><?php echo dtcGigs::dateFormat($g->date, 'long'); ?></div>
-					<?php while ( $p->fetch() ) : ?>
-						<div class="performance">
-							<span class="time"><?php echo dtcGigs::timeFormat($p->time); ?></span>
-							<?php if ( !empty($p->shortNotes) ) : ?>
-								<span class="separator shortNotes">-</span>
-								<span class="shortNotes"><?php echo $p->shortNotes; ?></span>
-							<?php endif; ?>
-							<span class="separator ages">-</span>
-							<span class="ages"><?php echo $p->ages; ?></span>
-							<?php if ( !empty($p->link) ) : ?>
-								<a href="<?php echo $p->link; ?>"><img class="buy" src="<?php echo $image_folder; ?>money_dollar.png" alt="<?php _e('Buy Tickets', $gcd); ?>" title="<?php _e('Buy Tickets', $gcd); ?>" /></a>
-							<?php endif; ?>
-						</div>
-					<?php endwhile; ?>
-				</td>
-			</tr>
-			<tr class="where">
-				<td class="bold" valign="top"><?php _e('Where', $gcd); ?></td>
-				<td class="venue">
-					<?php if ( $v->private ) : ?>
-						<div class="name"><?php _e('Private Venue', $gcd); ?></div>
-					<?php else : ?>
-						<div class="name">
-							<?php if ( !empty($v->link) ) : ?>
-								<a target="_blank" href="<?php echo $v->link; ?>"><?php echo $v->name; ?></a>
-							<?php else : ?>
-								<?php echo $v->name; ?>
-							<?php endif; ?>
-							(<a target="_blank" href="<?php echo $v->getMapLink(); ?>"><?php _e('map', $gcd); ?></a>)
-						</div>
-						<div class="address"><?php echo nl2br($v->getAddress()); ?></div>
-						<?php if ( !empty($v->notes) ) : ?>
-							<p class="notes"><?php echo nl2br($v->notes); ?></p>
-						<?php endif ?>
-					<?php endif; ?>
-				</td>
-			</tr>
-			<?php if ( !empty($g->notes) ) : ?>
-				<tr class="other"><td class="bold" valign="top"><?php _e('Other Info', $gcd); ?></td><td><div class="notes"><?php echo nl2br($g->notes); ?></div></td></tr>
-			<?php endif; ?>
-		</tbody>
-	</table>
-	<?php if ( !empty($options['parent']) ) : ?>
-		<p>&laquo; <a href="<?php echo get_permalink($options['parent']); ?>"><?php _e('Back to the calendar', $gcd); ?></a></p>
-	<?php endif; ?>
-</div>
-<?php return false; ?>
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/templates/basic/gigs-list.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-<div class="gigs-calendar">
-	<table class="gigs calendar <?php echo $upcoming ? 'upcoming' : 'archive' ?>">
-		<?php if ( !empty($caption) ) : ?>
-			<caption><?php echo $caption; ?></caption>
-		<?php endif; ?>
-		<?php if ( $options['list-headers'] ) : ?>
-			<thead><tr>
-				<?php foreach ( $show_fields as $field ) : ?>
-					<th><?php echo $listFields[$field]; ?></th>
-				<?php endforeach; ?>
-			</tr></thead>
-		<?php endif; ?>
-		<tbody>
-			<?php foreach ( $gigs as $gkey => $g ) : ?>
-				<?php foreach ( $g->performances as $key => $p ) : ?>
-					<tr id="performance-<?php echo $p->id; ?>" class="<?php echo ($gkey % 2) ? 'even' : 'odd'; ?> <?php echo $key == 0 ? 'gig' : 'performance'; ?> gig-<?php echo $g->id; ?> <?php echo dtcGigs::get_gig_css_classes($g) ?>">
-						<?php 
-							if ( $key == 0 ) {
-								$fields = array(
-									'city' => '<td class="city" valign="top">{' . $g->cityState . '}</td>',
-									'country' => '<td class="country" valign="top">{' . $g->country . '}</td>',
-									'venue' => '<td class="venue" valign="top">{' . $g->name . '}</td>',
-									'eventName' => '<td class="eventName" valign="top">{' . $g->eventName . '}</td>',
-									'date' => '<td class="date" valign="top">{' . $g->date . '}</td>',
-									'time' => '<td class="time" valign="top">{' . $p->time . '}</td>',
-									'shortNotes' => '<td class="shortNotes" valign="top">{' . $p->shortNotes . '}</td>',
-									'tickets' => ( $upcoming ? '<td class="tickets icon" valign="top">' . ( !empty($p->link) ? '<a target="_blank" href="' . $p->link . '"><img alt="' . __('Buy Tickets', $gcd) . '" title="' . __('Buy Tickets', $gcd) . '" class="clickable tickets" src="' . $folder . 'images/money_dollar.png" /></a>' : '') . '</td>' : '' ),
-									'map' => '<td class="map icon" valign="top">' . ($g->mapLink ? '<a target="_blank" href="' . $g->mapLink . '"><img alt="' . __('Map', $gcd) . '" title="' . __('Map', $gcd) . '" class="clickable map" src="' . $folder . 'images/world.png" /></a>' : '') . '</td>',
-								);
-							} else {
-								$fields = array(
-									'city' => '<td class="city" valign="top"></td>',
-									'country' => '<td class="country" valign="top"></td>',
-									'venue' => '<td class="venue" valign="top"></td>',
-									'eventName' => '<td class="eventName" valign="top"></td>',
-									'date' => '<td class="date" valign="top"></td>',
-									'time' => '<td class="time" valign="top">{' . $p->time . '}</td>',
-									'shortNotes' => '<td class="shortNotes" valign="top">{' . $p->shortNotes . '}</td>',
-									'tickets' => ( $upcoming ? '<td class="tickets icon" valign="top">' . ( !empty($p->link) ? '<a target="_blank" href="' . $p->link . '"><img alt="' . __('Buy Tickets', $gcd) . '" title="' . __('Buy Tickets', $gcd) . '" class="clickable tickets" src="' . $folder . 'images/money_dollar.png" /></a>' : '') . '</td>' : '' ),
-									'map' => '<td class="map icon" valign="top"></td>',
-								);
-							}
-							echo dtcGigs::selectFields($fields, $g);
-						?>
-					</tr>
-				<?php endforeach; ?>
-			<?php endforeach; ?>
-		</tbody>
-	</table>
-	<?php if ( empty($gigs) && $upcoming ) : ?>
-		<div class="no-gigs"><?php echo $options['no-upcoming']; ?></div>
-	<?php elseif ( empty($gigs) ) : ?>
-		<div class="no-gigs"><?php echo $options['no-past']; ?></div>
-	<?php endif; ?>
-</div>
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/templates/basic/next-widget.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-<?php if ( count($gigs) ) : $g = $gigs[0]; ?>
-	<div class="<?php echo dtcGigs::get_gig_css_classes($g) ?> next" id="gig-<?php echo $g->id ?>">
-		<div class="eventName"><?php echo $g->eventName ?></div>
-		<div class="venue">
-			<?php if ( !empty($g->venueLink) ) echo '<a href="' . $g->venueLink . '">' ?>
-			<?php echo $g->name ?>
-			<?php if ( !empty($g->venueLink) ) echo '</a>' ?>
-		</div>
-		<div class="cityStateCountry"><?php echo $g->cityStateCountry ?> <?php if ( !empty($g->mapLink) ) echo '(<a href="' . $g->mapLink . '">map</a>)' ?></div>
-		<div class="date"><?php echo $g->longDate ?></div>
-		<div class="moreInfo"><a href="<?php echo $g->permalink?>"><?php _e('More Info...', $gcd) ?></a></div>
-	</div>
-
-<?php else : ?>
-	<div class="no-gigs"><?php echo $options['no-upcoming']; ?></div>
-<?php endif; ?>
--- a/web/wp-content/plugins/gigs-calendar/templates/basic/rss.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<?php if ( $options['rss-link'] ) : ?>
-	<div class="gigs-rss"><a href="<?php echo $folder ?>rss.php"><?php _e('Subscribe to RSS calendar feed', $gcd); ?></a></div>
-<?php endif; ?>
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/templates/basic/style.css	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-div.attribution, div.gigs-rss {
-	text-align: center;
-	font-size: 87%;
-	margin: .5em 0px;
-}
-
-div.gigs-rss img {
-	position: relative;
-	top: 2px;
-}
-
-div.attribution span {
-	margin: 0px 1em;
-}
-
-table.gigs {
-	width: 100%;
-	text-align: left;
-	font-size: .9em;
-	border-collapse: collapse;
-	border: 1px dotted #666;
-}
-
-table.gigs td.icon {
-	width: 18px;
-	text-align: center;
-}
-
-table.gigs td.time {
-	text-align: right;
-}
-
-table.gigs a {
-	font-weight: bold;
-}
-
-table.gigs a img {
-	border: 0px;
-}
-
-
-table.gigs tr.gig {
-	border-top: 1px dotted #666;
-}
-
-table.gigs td.shortNotes {
-	padding-left: 4px;
-}
-
-.bold {
-	font-weight: bold;
-}
-
-img.buy {
-	position: relative;
-	top: 3px;
-}
-
-table.gigs caption {
-	font-weight: bold;
-	font-size: 125%;
-	text-align: left;
-}
-
-table.gigs caption div.notes{
-	font-weight: normal;
-	font-size: 80%;
-	text-align: left;
-}
-
-table.gigs, div.no-gigs {
-	margin-bottom: 1em;
-}
-
-/** Next Gig Widget **/
-	.gig.next {
-		padding-left: 10px;
-	}
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/templates/basic/upcoming-widget.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-<?php if ( count($gigs) ) : ?>
-	<ul class="gigs">
-		<?php foreach ( $gigs as $g ) : 
-			$link = array();
-			foreach ( $args['link'] as $f ) {
-				switch ( $f ) {
-					case 'city': 
-						$link[] = $g->cityState;
-						break;
-					case 'venue':
-						$link[] = $g->name;
-						break;
-					case 'eventName':
-						$link[] = $g->eventName;
-						break;
-				}
-			}
-			$link = array_unique($link);
-			foreach ( $link  as $key => $value ) {
-				if ( empty($value) ) unset($link[$key]);
-			}
-			?>
-			<li class="<?php echo dtcGigs::get_gig_css_classes($g) ?>"><?php echo dtcGigs::dateFormat($g->mysqlDate . ' ' . $p->time, (date('Y') == date('Y', strtotime($g->mysqlDate))) ? $args['dateFormat'] : $args['dateFormatYear']) ?>: <a href="<?php echo $g->permalink; ?>">
-				<?php echo implode(' - ', $link) ?>
-			</a></li>
-		<?php endforeach; ?>
-	</ul>
-<?php else : ?>
-	<div class="no-gigs"><?php echo $options['no-upcoming']; ?></div>
-<?php endif; ?>
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/templates/readme-first.txt	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-Gigs Calendar Templates
-
-WARNING!
-
-Do not edit any files in this folder.  If you do, you do so at your own risk.  
-WordPress will delete any changes you make when you perform the automatic 
-upgrade for this plugin.
-
-Instead create a gigs-templates folder in your wp-content directory and copy
-the basic template there before you make any changes.
-
-For more information, visit the official documentation page:
-http://dev.blogsforbands.com/gigs-calendar-template-system/
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/tours.ajax.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,312 +0,0 @@
-<?php
-
-require_once 'ajaxSetup.php';
-$pageTarget = $folder . 'tours.ajax.php';
-
-switch ($_POST['action']) {
-	case 'load':
-		$t = new tour();
-		$t->search(null, ($options['tours-sort'] == 'custom' ? '`pos`' : '`name`'));
-		?>
-			<div class="clickable" id="tour-add-trigger">
-				<img class="icon" src="<?php echo $folder; ?>images/add.png" /> <?php _e('Add a new tour', $gcd) ?>
-			</div>
-			
-			<div id="tour-add-form" style="display: none;">
-				<form id="new-tour" class="new-item" method="post" action="<?php echo $pageTarget; ?>">
-					<table>
-						<tbody>
-							<tr><td colspan="2">
-								<h3 class="no-margin"><?php _e('Tour Information', $gcd) ?></h3>
-							</td></tr>
-							<tr>
-							<tr>
-								<td><label for="new-name"><?php _e('Tour Name:', $gcd) ?></label></td>
-								<td><input type="text" class="name wide" name="name" id="new-name" /></td>
-							</tr>
-							<tr><td colspan="2">
-								<?php _e('Description/Other notes:', $gcd) ?><br />
-								<textarea class="notes" name="notes" rows="8" cols="80"></textarea>
-							</td></tr>
-						</tbody>
-					</table>
-					<div>
-						<input type="submit" class="button" name="" value="<?php _e('Add tour', $gcd) ?>" />
-						<input type="reset" class="button cancel" name="" value="<?php _e('Cancel', $gcd) ?>" id="new-tour-reset" />
-						<input type="hidden" name="action" value="add" />
-						<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-					</div>
-				</form>
-			</div>
-			
-			<table id="tour-list" class="tours widefat">
-				<thead>
-					<tr>
-						<th style="text-align: center;" scope="col"><?php _e('ID', $gcd) ?></th>
-						<th scope="col"><?php _e('Name', $gcd) ?></th>
-						<th scope="col"><?php _e('Notes', $gcd) ?></th>
-						<th style="text-align: center" scope="col"><?php _e('Actions', $gcd) ?></th>
-					</tr>
-				</thead>
-				<tbody>
-					<?php while ( $t->fetch() ) : ?>
-						<tr id="tour-<?php echo $t->id; ?>" class="tour tour-<?php echo $t->id; ?> <?php echo ++$count % 2 ? "alternate" : "";?>">
-							<th style="text-align: center;" scope="row"><?php echo $t->id; ?></th>
-							<td class="name"><?php echo $t->name; ?></td>
-							<td class="notes"><?php 
-								if( strlen( strip_tags($t->notes) ) > 40 ) {
-									echo substr( strip_tags($t->notes), 0, 40 ) . '...';
-								} else {
-									echo strip_tags($t->notes);
-								}
-							?></td>
-							<td class="actions" style="text-align: center; position: relative;">
-								<div style="position: relative">
-									<img alt="<?php _e('Edit', $gcd) ?>" title="<?php _e('Edit', $gcd) ?>" class="clickable edit" src="<?php echo $folder; ?>images/page_white_edit.png" />
-									<?php if ( $v ) : ?>
-										<a target="_blank" href="<?php echo $v->getMapLink(); ?>"><img alt="<?php _e('Map', $gcd) ?>" title="<?php _e('Map', $gcd) ?>" class="clickable map" src="<?php echo $folder; ?>images/world.png" /></a>
-									<?php endif ?>
-									<img alt="<?php _e('Delete', $gcd) ?>" title="<?php _e('Delete', $gcd) ?>" class="clickable delete" src="<?php echo $folder; ?>images/delete.png" />
-								</div>
-							</td>
-						</tr>
-						<tr id="tour-panel-<?php echo $t->id; ?>" class="tour tour-<?php echo $t->id; ?> panel <?php echo $count % 2 ? "alternate" : "";?>">
-							<td style="background-color: white"></td>
-							<td class="panel" colspan="5"></td>
-						</tr>
-					<?php endwhile; ?>
-				</tbody>
-			</table>
-			
-			<script type="text/javascript">
-				(function($){
-					// Trigger to show the new tour form.
-					$("#tour-add-trigger").click(function(){
-						$("#tour-add-form:hidden").slideDown(300, function(){
-							$("#new-name").focus();
-						});
-					});
-					
-					// Reset form button
-					$("#new-tour-reset").click(function(){
-						$("#tour-add-form table.performance[id!=performance-c1]").parents("tr").remove();
-						$("#tour-add-form").slideUp(300);
-					});
-
-					// Submit the new tour form via ajax.
-					$("#new-tour").ajaxForm({
-						url:pageTarget,
-						dataType: "json",
-						success:function(json){
-							tours = $("table#tour-list tbody tr:not(.panel) td.name");
-							inserted = false;
-							for ( i = 0; i < tours.length; i++ ) {
-								if ( json.tour.name < tours.eq(i).html() ) {
-									t = tours.eq(i);
-									$.post(pageTarget, {
-										nonce:nonce,
-										action:'getRow',
-										id:json.tour.id
-									}, function(rsp){
-										t.parents("tr").before(rsp);
-										resetTableColors("table#tour-list");
-										setupEvents();
-									});
-									inserted = true;
-									break;
-								}
-							}
-							if ( !inserted ) {
-								$.post(pageTarget, {
-									nonce:nonce,
-									action:'getRow',
-									id:json.tour.id
-								}, function(rsp){
-									$("table#tour-list tbody").append(rsp);
-									resetTableColors("table#tour-list");
-									setupEvents();
-								});
-							}
-							$("#new-tour-reset").click();
-						}
-
-					});
-					
-					setupEvents = function() {
-						$("img.delete").unbind("click");
-						$("img.delete").click(function(){
-							if ( confirm("Are you sure you want to delete this tour?") ) {
-								id = $(this).parents("tr").attr("id").split("-")[1];
-								$.post(pageTarget, {
-									nonce:nonce,
-									action:'delete',
-									id:id
-								}, function (rsp){
-									console.log(rsp)
-								}, "json");
-								$(this).parents("tr").next().remove();
-								$(this).parents("tr").remove();
-								resetTableColors("table#tour-list");
-							}
-						});
-						
-						$("img.edit").unbind("click");
-						$("img.edit").click(function(){
-							row = $(this).parents("tr");
-							id = row.attr("id").split("-")[1];
-							row.next().children("td.panel").load(pageTarget, {
-								nonce:nonce,
-								action:"edit",
-								id:id
-							}, function(){
-								row.next().css("display", "table-row");
-							});
-						});
-
-					};
-					
-					setupEvents();
-				})(jQuery);
-			</script>
-			<?php /*
-
-			
-
-				
-			<script type="text/javascript">
-			
-					setupEvents = function() {
-						
-						
-						setupPerformances();
-					}
-					
-					setupEvents();
-
-				}(jQuery));
-				
-			
-			
-			</script>
-		<?php
-		*/
-		break;
-	case 'add':
-		$t = new tour();
-		
-		$t->name = $_POST['name'];
-		$t->notes = $_POST['notes'];
-		
-		if ( $t->save() ) {
-			echo '{success:true, tour:' . $t->toJSON() . '}';
-		} else {
-			echo '{success:false}';
-		}
-		break;
-	case 'getRow':
-		$t = new tour($_POST['id']);
-		?>
-						<tr id="tour-<?php echo $t->id; ?>" class="tour tour-<?php echo $t->id; ?> <?php echo ++$count % 2 ? "alternate" : "";?>">
-							<th style="text-align: center;" scope="row"><?php echo $t->id; ?></th>
-							<td class="name"><?php echo $t->name; ?></td>
-							<td class="notes"><?php 
-								if( strlen( strip_tags($t->notes) ) > 40 ) {
-									echo substr( strip_tags($t->notes), 0, 40 ) . '...';
-								} else {
-									echo strip_tags($t->notes);
-								}
-							?></td>
-							<td class="actions" style="text-align: center; position: relative;">
-								<div style="position: relative">
-									<img alt="<?php _e('Edit', $gcd) ?>" title="<?php _e('Edit', $gcd) ?>" class="clickable edit" src="<?php echo $folder; ?>images/page_white_edit.png" />
-									<?php if ( $v ) : ?>
-										<a target="_blank" href="<?php echo $v->getMapLink(); ?>"><img alt="<?php _e('Map', $gcd) ?>" title="<?php _e('Map', $gcd) ?>" class="clickable map" src="<?php echo $folder; ?>images/world.png" /></a>
-									<?php endif ?>
-									<img alt="<?php _e('Delete', $gcd) ?>" title="<?php _e('Delete', $gcd) ?>" class="clickable delete" src="<?php echo $folder; ?>images/delete.png" />
-								</div>
-							</td>
-						</tr>
-						<tr id="tour-panel-<?php echo $t->id; ?>" class="tour tour-<?php echo $t->id; ?> panel <?php echo $count % 2 ? "alternate" : "";?>">
-							<td style="background-color: white"></td>
-							<td class="panel" colspan="5"></td>
-						</tr>
-		<?php
-		break;
-	
-	case 'delete':
-		$t = new tour($_POST['id']);
-		$result = $t->delete();
-		echo '{"success": ' . ($result ? 'true' : 'false') . ',"action":"delete"' . ($result ? '' : ',"error":"db"') . '}';
-		break;
-	case 'edit':
-		$t = new tour($_POST['id']);
-		?>
-			<form id="edit-tour-<?php echo $t->id ?>" class="edit-item" method="post" action="<?php echo $pageTarget; ?>">
-				<table>
-					<tbody>
-						<tr><td colspan="2">
-							<h3 class="no-margin"><?php _e('Tour Information', $gcd) ?></h3>
-						</td></tr>
-						<tr>
-							<td><label for="edit-name-<?php echo $t->id ?>"><?php _e('Tour Name:', $gcd) ?></label></td>
-							<td><input type="text" class="name wide" name="name" id="edit-name-<?php echo $t->id ?>" value="<?php dtcGigs::escapeForInput($t->name); ?>" /></td>
-						</tr>
-						<tr><td colspan="2">
-							<?php _e('Description/Other notes:', $gcd) ?><br />
-							<textarea class="notes" name="notes" rows="8" cols="80"><?php dtcGigs::escapeForInput($t->notes); ?></textarea>
-						</td></tr>
-					</tbody>
-				</table>
-				<div class="extra-inputs">
-					<input type="submit" class="button" name="" value="Save tour" />
-					<input type="reset" class="button cancel" name="" value="Cancel" id="edit-tour-reset-<?php echo $t->id ?>" />
-					<input type="hidden" name="action" value="save" />
-					<input type="hidden" name="id" value="<?php echo $t->id ?>" />
-					<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-				</div>
-			</form>
-			
-			<script type="text/javascript">
-				(function($){
-					$("#edit-tour-reset-<?php echo $t->id ?>").click(function(){
-						$(this).parents("tr.panel").hide();
-					});
-					
-					$("#edit-tour-<?php echo $t->id ?>").ajaxForm({
-						url:pageTarget,
-						dataType: "json",
-						success:function(json){
-							row = $("#tour-panel-" + json.tour.id).hide().prev();
-							row.children("td.name").html(json.tour.name);
-							if ( json.tour.notes.length > 40 ) {
-								row.children("td.notes").html(json.tour.notes.substr(0,40) + '...');
-							} else {
-								row.children("td.notes").html(json.tour.notes);
-							}
-							
-						}
-					});
-				}(jQuery));
-			</script>
-		<?php
-		break;
-		
-	case 'save':
-		$t = new tour($_POST['id']);
-
-		$t->name = $_POST['name'];
-		$t->notes = $_POST['notes'];
-				
-		$t->save();
-		echo '{success:true, tour:' . $t->toJSON() . '}';
-		break;
-		
-	case 'performance-form':
-		if ( isset($_POST['id']) ) {
-			pForm($_POST['id'], false);
-		} else {
-			pForm((int) $_POST['count'], true);
-		}
-		break;
-}
-?>
\ No newline at end of file
--- a/web/wp-content/plugins/gigs-calendar/venues.ajax.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,306 +0,0 @@
-<?php
-
-require_once 'ajaxSetup.php';
-$pageTarget = $folder . 'venues.ajax.php';
-
-switch ($_POST['action']) {
-	case 'load':
-		//$categories = $wpdb->get_results('SELECT * FROM `' . TABLE_CATS . '` ORDER BY `' . $options['categorySortColumn'] .'` ' . $options['categorySortDirection']);
-		$v = new venue();
-		$v->search('deleted = 0', 'name');
-		?>
-			<div class="clickable" id="venue-add-trigger">
-				<img class="icon" src="<?php echo $folder; ?>images/add.png" /> <?php _e('Add a new venue', $gcd) ?>
-			</div>
-			<div id="venue-add-form" style="<?php if ( !isset($_GET['new']) ) echo 'display: none;' ?>">
-				<form id="new-venue-form" class="new-item" method="post" action="<?php echo $pageTarget; ?>">
-					<table>
-						<tbody>
-							<tr><td><label for="new-name"><?php _e('Name:', $gcd) ?></label></td><td><input type="text" class="name wide" name="name" id="new-name" /></td></tr>
-							<tr><td valign="top"><label for="new-address"><?php _e('Address:', $gcd) ?></label></td><td><textarea class="address wide" name="address" id="new-address"></textarea></td></tr>
-							<tr><td><label for="new-city"><?php _e('City:', $gcd) ?></label></td><td><input type="text" class="city wide" name="city" id="new-city" /></td></tr>
-							<tr><td><label for="new-state"><?php _e('State/Province:', $gcd) ?></label></td><td><input type="text" class="state wide" name="state" id="new-state" /></td></tr>
-							<tr><td><label for="new-country"><?php _e('Country:', $gcd) ?></label></td><td><input type="text" class="country wide" name="country" id="new-country" /></td></tr>
-							<tr><td><label for="new-postalCode"><?php _e('Postal Code:', $gcd) ?></label></td><td><input type="text" class="postalCode" name="postalCode" id="new-postalCode" /></td></tr>
-							<tr><td><label for="new-customMap"><?php _e('Custom location for Google Maps <abbr title="Will override the automatic address unless you leave it blank.">(?)</abbr>', $gcd) ?>:</label></td><td><input type="text" class="customMap wide" name="customMap" id="new-customMap" /></td></tr>
-							<tr><td><label for="new-contact"><?php _e('Primary Contact:', $gcd) ?></label></td><td><input type="text" class="contact wide" name="contact" id="new-contact" /></td></tr>
-							<tr><td><label for="new-phone"><?php _e('Phone:', $gcd) ?></label></td><td><input type="text" class="phone wide" name="phone" id="new-phone" /></td></tr>
-							<tr><td><label for="new-email"><?php _e('Email:', $gcd) ?></label></td><td><input type="text" class="email wide" name="email" id="new-email" /></td></tr>
-							<tr><td><label for="new-link"><?php _e('Homepage:', $gcd) ?></label></td><td><input type="text" class="link wide" name="link" id="new-link" /></td></tr>
-						</tbody>
-					</table>
-					<div>
-						<label for="new-private"><?php _e('Hide information about this venue from the public:', $gcd) ?> <input type="checkbox" value="1" name="private" id="new-private" /></label>
-					</div>
-					<div>
-						<?php _e('Description/Other notes:', $gcd) ?><br />
-						<textarea class="notes" name="notes" rows="7" cols="80"></textarea>
-					</div>
-					<div>
-						<input type="submit" class="button" name="" value="<?php _e('Add Venue', $gcd) ?>" />
-						<input type="reset" class="button cancel" name="" value="<?php _e('Cancel', $gcd) ?>" id="new-venue-reset" />
-						<input type="hidden" name="action" value="add" />
-						<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-					</div>
-				</form>
-			</div>
-			
-			<table id="venue-list" class="venues widefat">
-				<thead>
-					<tr>
-						<th style="text-align: center;" scope="col"><?php _e('ID', $gcd) ?></th>
-						<th scope="col"><?php _e('Name', $gcd) ?></th>
-						<th scope="col"><?php _e('City', $gcd) ?></th>
-						<th scope="col"><?php _e('Phone', $gcd) ?></th>
-						<th scope="col"><?php _e('Email', $gcd) ?></th>
-						<th style="text-align: center" scope="col"><?php _e('Actions', $gcd) ?></th>
-					</tr>
-				</thead>
-				<tbody>
-					<?php while ( $v->fetch() ) : ?>
-						<tr id="venue-<?php echo $v->id; ?>" class="venue-<?php echo $v->id; ?> <?php echo ++$count % 2 ? "alternate" : "";?>">
-							<th style="text-align: center;" scope="row"><?php echo $v->id; ?></th>
-							<td class="name"><?php echo $v->name; ?></td>
-							<td class="city"><?php echo $v->city . (!empty($v->state) ? ', ' . $v->state :  '') ?></td>
-							<td class="phone"><?php echo $v->phone ?></td>
-							<td class="email"><?php echo !empty($v->email) ? '<a href="mailto:' . $v->email . '">' . $v->email . '</a>' : '' ?></td>
-							<td class="actions" style="text-align: center; position: relative;">
-								<div style="position: relative">
-									<img alt="<?php _e('Edit', $gcd) ?>" title="<?php _e('Edit', $gcd) ?>" class="clickable edit" src="<?php echo $folder; ?>images/page_white_edit.png" />
-									<a target="_blank" href="<?php echo $v->getMapLink(); ?>"><img alt="<?php _e('Map', $gcd) ?>" title="<?php _e('Map', $gcd) ?>" class="clickable map" src="<?php echo $folder; ?>images/world.png" /></a>
-									<?php if ( !empty($v->link) ) : ?>
-										<a target="_blank" href="<?php echo $v->link ?>"><img alt="<?php _e('Homepage', $gcd) ?>" title="<?php _e('Homepage', $gcd) ?>" class="clickable homepage" src="<?php echo $folder ?>images/link.png" /></a>
-									<?php endif ?>
-									<img alt="<?php _e('Delete', $gcd) ?>" title="<?php _e('Delete', $gcd) ?>" class="clickable delete" src="<?php echo $folder; ?>images/delete.png" />
-								</div>
-							</td>
-						</tr>
-						<tr id="venue-panel-<?php echo $v->id; ?>" class="venue-<?php echo $v->id; ?> panel <?php echo $count % 2 ? "alternate" : "";?>">
-							<td style="background-color: white"></td>
-							<td class="panel" colspan="5"></td>
-						</tr>
-					<?php endwhile; ?>
-				</tbody>
-			</table>
-				
-			<script type="text/javascript">
-			
-				(function($){
-					//init = function() {
-					$("#venue-add-trigger").click(function(){
-						$("#venue-add-form:hidden").slideDown(300, function(){
-							$("#new-name").focus();
-						});
-					});
-					
-					$("#new-venue-reset").click(function(){
-						$("#venue-add-form").slideUp(300);
-					});
-					
-					$("#new-venue-form").ajaxForm({
-						url:pageTarget,
-						dataType: "json",
-						success:function(json){
-							venues = $("table#venue-list tbody tr:not(.panel) td.name");
-							inserted = false;
-							for ( i = 0; i < venues.length; i++ ) {
-								if ( json.venue.name.toLowerCase() < venues.eq(i).html().toLowerCase() ) {
-									v = venues.eq(i);
-									$.post(pageTarget, {
-										nonce:nonce,
-										action:'getRow',
-										id:json.venue.id
-									}, function(rsp){
-										v.parents("tr").before(rsp);
-										resetTableColors("table#venue-list");
-										setupEvents();
-									});
-									inserted = true;
-									break;
-								}
-							}
-							if ( !inserted ) {
-								$.post(pageTarget, {
-									nonce:nonce,
-									action:'getRow',
-									id:json.venue.id
-								}, function(rsp){
-									$("table#venue-list tbody").append(rsp);
-									resetTableColors("table#venue-list");
-									setupEvents();
-								});
-							}
-							$("#new-venue-reset").click();
-						}
-					});
-					
-					setupEvents = function() {
-						$("img.delete").unbind("click");
-						$("img.delete").click(function(){
-							id = $(this).parents("tr").attr("id").split("-")[1];
-							$.post(pageTarget, {
-								nonce:nonce,
-								action:'delete',
-								id:id
-							});
-							$(this).parents("tr").next().remove();
-							$(this).parents("tr").remove();
-							resetTableColors("table#venue-list");
-						});
-						
-						$("img.edit").unbind("click");
-						$("img.edit").click(function(){
-							row = $(this).parents("tr");
-							id = row.attr("id").split("-")[1];
-							row.next().children("td.panel").load(pageTarget, {
-								nonce:nonce,
-								action:"edit",
-								id:id
-							}, function(){
-								row.next().css("display", "table-row");
-							});
-						});
-					}
-					
-					setupEvents();
-				}(jQuery));
-				
-			
-			
-			</script>
-		<?php
-		break;
-	case 'add':
-		$v = new venue();
-		$args = $_POST;
-		unset($args['nonce'],$args['action']);
-		foreach ( $args as $key => $value ) {
-			$v->$key = $value;
-		}
-		if ( $v->save() ) {
-			echo '{success:true, venue:' . $v->toJSON() . '}';
-		} else {
-			echo '{success:false}';
-		}
-		break;
-	case 'map':
-		//$v = new venue($_GET['id']);
-	case 'getRow':
-		$v = new venue($_POST['id']);
-		?>
-			<tr id="venue-<?php echo $v->id; ?>" class="song-<?php echo $v->id; ?>">
-				<th style="text-align: center;" scope="row"><?php echo $v->id; ?></th>
-				<td class="name"><?php echo $v->name; ?></td>
-				<td class="city"><?php echo $v->city . (!empty($v->state) ? ', ' . $v->state :  '') ?></td>
-				<td class="phone"><?php echo $v->phone ?></td>
-				<td class="email"><?php echo !empty($v->email) ? '<a href="mailto:' . $v->email . '">' . $v->email . '</a>' : '' ?></td>
-				<td class="actions" style="text-align: center; position: relative;">
-					<div style="position: relative">
-						<img alt="<?php _e('Edit', $gcd) ?>" title="<?php _e('Edit', $gcd) ?>" class="clickable edit" src="<?php echo $folder; ?>images/page_white_edit.png" />
-						<a target="_blank" href="http://maps.google.com/?q=<?php echo urlencode($v->getAddress(true)); ?>"><img alt="<?php _e('Map', $gcd) ?>" title="<?php _e('Map', $gcd) ?>" class="clickable map" src="<?php echo $folder; ?>images/world.png" /></a>
-						<?php if ( !empty($v->link) ) : ?>
-							<a target="_blank" href="<?php echo $v->link ?>"><img alt="<?php _e('Homepage', $gcd) ?>" title="<?php _e('Homepage', $gcd) ?>" class="clickable homepage" src="<?php echo $folder ?>images/link.png" /></a>
-						<?php endif ?>
-						<img alt="<?php _e('Delete', $gcd) ?>" title="<?php _e('Delete', $gcd) ?>" class="clickable delete" src="<?php echo $folder; ?>images/delete.png" />
-					</div>
-				</td>
-			</tr>
-			<tr id="venue-panel-<?php echo $v->id; ?>" class="song-<?php echo $v->id; ?> panel <?php echo $count % 2 ? "alternate" : "";?>">
-				<td style="background-color: white"></td>
-				<td class="panel" colspan="5"></td>
-			</tr>
-		<?php
-		break;
-	
-	case 'delete':
-		$v = new venue($_POST['id']);
-		$result = $v->delete();
-		echo '{"success": ' . ($result ? 'true' : 'false') . ',"action":"delete"' . ($result ? '' : ',"error":"db"') . '}';
-		break;
-		
-	case 'edit':
-		$v = new venue($_POST['id']);
-		?>
-			<form id="edit-venue-<?php echo $v->id ?>" class="edit-item venue-<?php echo $v->id ?>" method="post" action="<?php echo $pageTarget; ?>">
-				<table>
-					<tbody>
-						<tr><td><label for="edit-name-<?php echo $v->id ?>"><?php _e('Name:', $gcd) ?></label></td><td><input type="text" class="name wide" name="name" id="edit-name-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->name) ?>" /></td></tr>
-						<tr><td valign="top"><label for="edit-address-<?php echo $v->id ?>"><?php _e('Address:', $gcd) ?></label></td><td><textarea class="address wide" name="address" id="edit-address-<?php echo $v->id ?>"><?php echo dtcGigs::escapeForInput($v->address) ?></textarea></td></tr>
-						<tr><td><label for="edit-city-<?php echo $v->id ?>"><?php _e('City:', $gcd) ?></label></td><td><input type="text" class="city wide" name="city" id="edit-city-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->city) ?>" /></td></tr>
-						<tr><td><label for="edit-state-<?php echo $v->id ?>"><?php _e('State/Province:', $gcd) ?></label></td><td><input type="text" class="state wide" name="state" id="edit-state-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->state) ?>" /></td></tr>
-						<tr><td><label for="edit-country-<?php echo $v->id ?>"><?php _e('Country:', $gcd) ?></label></td><td><input type="text" class="country wide" name="country" id="edit-country-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->country) ?>" /></td></tr>
-						<tr><td><label for="edit-postalCode-<?php echo $v->id ?>"><?php _e('Postal Code:', $gcd) ?></label></td><td><input type="text" class="postalCode" name="postalCode" id="edit-postalCode-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->postalCode) ?>" /></td></tr>
-						<tr><td><label for="edit-customMap-<?php echo $v->id ?>"><?php _e('Custom location for Google Maps <abbr title="Will override the automatic address unless you leave it blank.">(?)</abbr>', $gcd) ?>:</label></td><td><input type="text" class="customMap wide" name="customMap" id="edit-customMap-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->customMap) ?>" /></td></tr>
-						<tr><td><label for="edit-contact-<?php echo $v->id ?>"><?php _e('Primary Contact:', $gcd) ?></label></td><td><input type="text" class="contact wide" name="contact" id="edit-contact-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->contact) ?>" /></td></tr>
-						<tr><td><label for="edit-phone-<?php echo $v->id ?>"><?php _e('Phone:', $gcd) ?></label></td><td><input type="text" class="phone wide" name="phone" id="edit-phone-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->phone) ?>" /></td></tr>
-						<tr><td><label for="edit-email-<?php echo $v->id ?>"><?php _e('Email:', $gcd) ?></label></td><td><input type="text" class="email wide" name="email" id="edit-email-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->email) ?>" /></td></tr>
-						<tr><td><label for="edit-link-<?php echo $v->id ?>"><?php _e('Homepage:', $gcd) ?></label></td><td><input type="text" class="link wide" name="link" id="edit-link-<?php echo $v->id ?>" value="<?php echo dtcGigs::escapeForInput($v->link) ?>" /></td></tr>
-					</tbody>
-				</table>
-				<div>
-					<label for="edit-private-<?php echo $v->id ?>"><?php _e('Hide information about this venue from the public:', $gcd) ?> <input <?php if ( $v->private ) echo 'checked="checked"' ?> type="checkbox" value="1" name="private" id="edit-private-<?php echo $v->id ?>" /></label>
-				</div>
-				<div>
-					<?php _e('Description/Other notes:', $gcd) ?><br />
-					<textarea class="notes" name="notes" rows="7" cols="80"><?php echo dtcGigs::escapeForInput($v->notes) ?></textarea>
-				</div>
-				<div>
-					<input type="submit" class="button" name="" value="<?php _e('Save Changes', $gcd); ?>" />
-					<input type="reset" class="button cancel" name="" value="<?php _e('Cancel', $gcd); ?>" id="edit-venue-reset-<?php echo $v->id ?>" />
-					<input type="hidden" name="id" value="<?php echo $v->id ?>" />
-					<input type="hidden" name="action" value="save" />
-					<input type="hidden" name="nonce" value="<?php echo $_POST['nonce']; ?>" />
-				</div>
-			</form>
-			
-			<script type="text/javascript">
-				(function($){
-					$("#edit-venue-reset-<?php echo $v->id ?>").click(function(){
-						$(this).parents("tr.panel").hide();
-					});
-					
-					$("#edit-venue-<?php echo $v->id ?>").ajaxForm({
-						url:pageTarget,
-						dataType: "json",
-						success:function(json){
-							$("#venue-panel-" + json.venue.id).hide();
-							row = $("#venue-" + json.venue.id);
-							row.children("td.name").html(json.venue.name);
-							row.children("td.phone").html(json.venue.phone);
-							
-							city = json.venue.city;
-							if ( json.venue.state != "" ) {
-								if ( city != "" ) {
-									city += ", ";
-								}
-								city += json.venue.state;
-							}
-							row.children("td.city").html(city);
-							
-							if ( json.venue.email != "" ) {
-								row.children("td.email").html("<a href=\"mailto:" + json.venue.email + "\">" + json.venue.email + "</a>");
-							}
-						}
-					});
-				}(jQuery));
-			</script>
-		<?php
-		break;
-		
-	case 'save':
-		$v = new venue($_POST['id']);
-		$args = $_POST;
-		unset($args['nonce'],$args['action'],$args['id']);
-		if ( !isset($_POST['private']) ) $args['private'] = 0;
-		foreach ( $args as $key => $value ) {
-			$v->$key = $value;
-		}
-		if ( $v->save() ) {
-			echo '{success:true, venue:' . $v->toJSON() . '}';
-		} else {
-			echo '{success:false}';
-		}
-		break;
-}
-
-
--- a/web/wp-content/plugins/gigs-calendar/version.php	Tue Jan 05 09:48:24 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?php
-
-define("DTC_GIGS_DB_VERSION", 3);
-define("DTC_GIGS_PLUGIN_VERSION", '0.4.7');
-
-?>