/*
* jQuery jclock - Clock plugin - v 2.2.0
* http://plugins.jquery.com/project/jclock
*
* Copyright (c) 2007-2009 Doug Sparling <http://www.dougsparling.com>
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*/
(function($) {
 
  $.fn.jclock = function(options) {
    var version = '2.2.0';
 
    // options
    var opts = $.extend({}, $.fn.jclock.defaults, options);
         
    return this.each(function() {
      $this = $(this);
      $this.timerID = null;
      $this.running = false;
 
      // Record keeping for seeded clock
      $this.increment = 0;
      $this.lastCalled = new Date().getTime();
 
      var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
 
      $this.format = o.format;
      $this.utc = o.utc;
      // deprecate utc_offset (v 2.2.0)
      $this.utcOffset = (o.utc_offset != null) ? o.utc_offset : o.utcOffset;
      $this.seedTime = o.seedTime;
      $this.timeout = o.timeout;
 
      $this.css({
        fontFamily: o.fontFamily,
        fontSize: o.fontSize,
        backgroundColor: o.background,
        color: o.foreground
      });
 
      // %a
      $this.daysAbbrvNames = new Array(7);
      $this.daysAbbrvNames[0] = "Sun";
      $this.daysAbbrvNames[1] = "Mon";
      $this.daysAbbrvNames[2] = "Tue";
      $this.daysAbbrvNames[3] = "Wed";
      $this.daysAbbrvNames[4] = "Thu";
      $this.daysAbbrvNames[5] = "Fri";
      $this.daysAbbrvNames[6] = "Sat";
 
      // %A
      $this.daysFullNames = new Array(7);
      $this.daysFullNames[0] = "Sunday";
      $this.daysFullNames[1] = "Monday";
      $this.daysFullNames[2] = "Tuesday";
      $this.daysFullNames[3] = "Wednesday";
      $this.daysFullNames[4] = "Thursday";
      $this.daysFullNames[5] = "Friday";
      $this.daysFullNames[6] = "Saturday";
 
      // %b
      $this.monthsAbbrvNames = new Array(12);
      $this.monthsAbbrvNames[0] = "Jan";
      $this.monthsAbbrvNames[1] = "Feb";
      $this.monthsAbbrvNames[2] = "Mar";
      $this.monthsAbbrvNames[3] = "Apr";
      $this.monthsAbbrvNames[4] = "May";
      $this.monthsAbbrvNames[5] = "Jun";
      $this.monthsAbbrvNames[6] = "Jul";
      $this.monthsAbbrvNames[7] = "Aug";
      $this.monthsAbbrvNames[8] = "Sep";
      $this.monthsAbbrvNames[9] = "Oct";
      $this.monthsAbbrvNames[10] = "Nov";
      $this.monthsAbbrvNames[11] = "Dec";
 
      // %B
      $this.monthsFullNames = new Array(12);
      $this.monthsFullNames[0] = "January";
      $this.monthsFullNames[1] = "February";
      $this.monthsFullNames[2] = "March";
      $this.monthsFullNames[3] = "April";
      $this.monthsFullNames[4] = "May";
      $this.monthsFullNames[5] = "June";
      $this.monthsFullNames[6] = "July";
      $this.monthsFullNames[7] = "August";
      $this.monthsFullNames[8] = "September";
      $this.monthsFullNames[9] = "October";
      $this.monthsFullNames[10] = "November";
      $this.monthsFullNames[11] = "December";
 
      $.fn.jclock.startClock($this);
 
    });
  };
       
  $.fn.jclock.startClock = function(el) {
    $.fn.jclock.stopClock(el);
    $.fn.jclock.displayTime(el);
  }
 
  $.fn.jclock.stopClock = function(el) {
    if(el.running) {
      clearTimeout(el.timerID);
    }
    el.running = false;
  }
 
  $.fn.jclock.displayTime = function(el) {
    var time = $.fn.jclock.getTime(el);
    el.html(time);
    el.timerID = setTimeout(function(){$.fn.jclock.displayTime(el)},el.timeout);
  }
 
  $.fn.jclock.getTime = function(el) {
    if(typeof(el.seedTime) == 'undefined') {
      // Seed time not being used, use current time
      var now = new Date();
    } else {
      // Otherwise, use seed time with increment
      el.increment += new Date().getTime() - el.lastCalled;
      var now = new Date(el.seedTime + el.increment);
      el.lastCalled = new Date().getTime();
    }
 
    if(el.utc == true) {
      var localTime = now.getTime();
      var localOffset = now.getTimezoneOffset() * 60000;
      var utc = localTime + localOffset;
      var utcTime = utc + (3600000 * el.utcOffset);
      now = new Date(utcTime);
    }
 
    var timeNow = "";
    var i = 0;
    var index = 0;
    while ((index = el.format.indexOf("%", i)) != -1) {
      timeNow += el.format.substring(i, index);
      index++;
 
      // modifier flag
      //switch (el.format.charAt(index++)) {
      //}
      
      var property = $.fn.jclock.getProperty(now, el, el.format.charAt(index));
      index++;
      
      //switch (switchCase) {
      //}
 
      timeNow += property;
      i = index
    }
 
    timeNow += el.format.substring(i);
    return timeNow;
  };
 
  $.fn.jclock.getProperty = function(dateObject, el, property) {
 
    switch (property) {
      case "a": // abbrv day names
          return (el.daysAbbrvNames[dateObject.getDay()]);
      case "A": // full day names
          return (el.daysFullNames[dateObject.getDay()]);
      case "b": // abbrv month names
          return (el.monthsAbbrvNames[dateObject.getMonth()]);
      case "B": // full month names
          return (el.monthsFullNames[dateObject.getMonth()]);
      case "d": // day 01-31
          return ((dateObject.getDate() < 10) ? "0" : "") + dateObject.getDate();
      case "H": // hour as a decimal number using a 24-hour clock (range 00 to 23)
          return ((dateObject.getHours() < 10) ? "0" : "") + dateObject.getHours();
      case "I": // hour as a decimal number using a 12-hour clock (range 01 to 12)
          var hours = (dateObject.getHours() % 12 || 12);
          return ((hours < 10) ? "0" : "") + hours;
      case "m": // month number
          return ((dateObject.getMonth() < 10) ? "0" : "") + (dateObject.getMonth() + 1);
      case "M": // minute as a decimal number
          return ((dateObject.getMinutes() < 10) ? "0" : "") + dateObject.getMinutes();
      case "p": // either `am' or `pm' according to the given time value,
          // or the corresponding strings for the current locale
          return (dateObject.getHours() < 12 ? "am" : "pm");
      case "P": // either `AM' or `PM' according to the given time value,
          return (dateObject.getHours() < 12 ? "AM" : "PM");
      case "S": // second as a decimal number
          return ((dateObject.getSeconds() < 10) ? "0" : "") + dateObject.getSeconds();
      case "y": // two-digit year
          return dateObject.getFullYear().toString().substring(2);
      case "Y": // full year
          return (dateObject.getFullYear());
      case "%":
          return "%";
    }
 
  }
       
  // plugin defaults (24-hour)
  $.fn.jclock.defaults = {
    format: '%H:%M:%S',
    utcOffset: 0,
    utc: false,
    fontFamily: '',
    fontSize: '',
    foreground: '',
    background: '',
    seedTime: undefined,
    timeout: 1000 // 1000 = one second, 60000 = one minute
  };
 
})(jQuery);



/* Copyright (c) 2009 Alvaro A. Lima Jr http://alvarojunior.com/jquery/joverlay.html
 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * Version: 0.8 (OUT 19, 2009)
 * Requires: jQuery 1.3+
 * Packer from http://dean.edwards.name/packer/
 */
(function($){var isIE6=$.browser.msie&&$.browser.version==6.0;var JOVERLAY_TIMER=null;$.fn.jOverlay=function(options){if($('#jOverlay').length){$.closeOverlay()}if(JOVERLAY_TIMER!==null){clearTimeout(JOVERLAY_TIMER)}var options=$.extend({},$.fn.jOverlay.options,options||{});var onSuccess=options.onSuccess||options.success;var element=this.is('*')?this:'#jOverlayContent';var position=isIE6?'absolute':'fixed';var isImage=/([^\/\\]+)\.(png|gif|jpeg|jpg|bmp)$/i.test(options.url);var imgLoading=options.imgLoading?"<img id='jOverlayLoading' src='"+options.imgLoading+"' style='position:"+position+"; z-index:"+(options.zIndex+9)+";'/>":'';function center(id){if(options.center){$.center(id)}else if(isIE6){$.center('#jOverlayContent',{'top':$(window).scrollTop()+'px','marginLeft':'','marginTop':'','left':''})}}$('body').prepend(imgLoading+"<div id='jOverlay' />"+"<div id='jOverlayContent' style='position:"+position+"; z-index:"+(options.zIndex+5)+"; display:none;'/>");$('#jOverlayContent').data('options',options);$('#jOverlayLoading').load(function(){center(this)});if(isIE6){$('select').hide();$('#jOverlayContent select').show()}$('#jOverlay').css({'backgroundColor':options.color,'position':position,'top':'0px','left':'0px','filter':'alpha(opacity='+(options.opacity*100)+')','opacity':options.opacity,'-khtml-opacity':options.opacity,'-moz-opacity':options.opacity,'zIndex':options.zIndex,'width':!isIE6?'100%':$(window).width()+'px','height':!isIE6?'100%':$(document).height()+'px'}).show();if($.trim(options.html)){$(element).html(options.html)}if(this.is('*')){$('#jOverlayContent').data('jOverlayElementPrev',this.prev());$('#jOverlayContent').html(this.show().data('display',options.autoHide?'none':this.css('display')));if(!isImage){center('#jOverlayContent');$('#jOverlayContent').show();if(!options.url&&$.isFunction(onSuccess)){onSuccess(this)}}}if(isImage){$('<img/>').load(function(){var resize=$.resize(this.width,this.height);$(this).css({width:resize.width,height:resize.height});$(element).html(this);center('#jOverlayContent');center('#jOverlayLoading');$('#jOverlayLoading').fadeOut(500);$('#jOverlayContent').show();if($.isFunction(onSuccess)){onSuccess($(element))}}).error(function(){alert('Image ('+options.url+') not found.');$.closeOverlay()}).attr({'src':options.url,'alt':options.url})}if(options.url&&!isImage){$.ajax({type:options.method,data:options.data,url:options.url,success:function(responseText){$('#jOverlayLoading').fadeOut(500);$(element).html(responseText).show();center('#jOverlayContent');if($.isFunction(onSuccess)){onSuccess(responseText)}},error:function(){alert('URL ('+options.url+') not found.');$.closeOverlay()}})}if(isIE6){$(window).scroll(function(){center('#jOverlayContent')});$(window).resize(function(){$('#jOverlay').css({'width':$(window).width()+'px','height':$(document).height()+'px'});center('#jOverlayContent')})}if(options.closeOnEsc){$(document).keydown(function(event){if(event.keyCode==27){$.closeOverlay()}})}else{$(document).unbind('keydown')}if(options.bgClickToClose){$('#jOverlay').click($.closeOverlay)}if(options.timeout&&Number(options.timeout)>0){JOVERLAY_TIMER=window.setTimeout($.closeOverlay,Number(options.timeout))}$('#jOverlayContent').css(options.css||{})};$.resize=function(imageWidth,imageHeight){var x=$(window).width()-150;var y=$(window).height()-150;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x}}return{'width':imageWidth,'height':imageHeight}};$.center=function(element,css){var element=$(element);var elemWidth=element.width();element.css($.extend({},{'width':elemWidth+'px','marginLeft':'-'+(elemWidth/2)+'px','marginTop':'-'+element.height()/2+'px','height':'auto','top':!isIE6?'50%':$(window).scrollTop()+($(window).height()/2)+'px','left':'50%'},css||{}))};$.fn.jOverlay.options={'method':'GET','data':'','url':'','color':'#000','opacity':'0.6','zIndex':9999,'center':true,'imgLoading':'','bgClickToClose':true,'success':null,'onSuccess':null,'timeout':0,'autoHide':true,'css':{},'html':'','closeOnEsc':true};$.fn.jOverlay.setDefaults=function(options){$.fn.jOverlay.options=$.extend({},$.fn.jOverlay.options,options||{})};$.closeOverlay=function(){var content=$('#jOverlayContent');var options=content.data('options');var elementPrev=content.data('jOverlayElementPrev');if(isIE6){$("select").show()}if(elementPrev){var contentChildren=content.children();elementPrev.after(contentChildren.css('display',contentChildren.data('display')));contentChildren.removeData('display');content.removeData('jOverlayElementPrev')}content.removeData('options');$('#jOverlayLoading, #jOverlayContent, #jOverlay').remove()}})(jQuery);

/* Wayfarer Tooltip
 * Version 1.0.1
 * Author Abel Mohler
 * URI: http://www.wayfarerweb.com/wtooltip.php
 * Released with the MIT License: http://www.wayfarerweb.com/mit.php
(function(a){a.fn.wTooltip=function(f,s){f=a.extend({content:null,ajax:null,follow:true,auto:true,fadeIn:300,fadeOut:0,appendTip:"body",degrade:false,offsetY:10,offsetX:1,style:{},className:null,id:null,callBefore:function(u,p,o){},callAfter:function(u,p,o){},clickAction:function(p,o){a(p).hide()},delay:0,timeout:0,cloneable:false},f||{});if(!f.style&&typeof f.style!="object"){f.style={};f.style.zIndex="1000"}else{f.style=a.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"7px",zIndex:"1000",textAlign:"left"},f.style||{})}if(typeof s=="function"){f.callAfter=s||f.callAfter}f.style.display="none",f.style.position="absolute";var n,m,r,c,l={},b=true,e=false,q=false,t=document.createElement("div"),i=document.getElementsByTagName("html")[0],g=(typeof document.body.style.maxWidth=="undefined")?true:false,k=(typeof a.talk=="function"&&typeof a.listen=="function")?true:false;if(f.id){t.id=f.id}if(f.className){t.className=f.className}f.degrade=(f.degrade&&g)?true:false;for(var d in f.style){t.style[d]=f.style[d]}function j(o){if(o){if(f.degrade){a(t).html(f.content.replace(/<\/?[^>]+>/gi,""))}else{a(t).html(f.content)}}}if(f.ajax){a.get(f.ajax,function(o){if(o){f.content=o}j(f.content)})}function h(p){function u(v){if(n&&!f.content){v.title=n;n=null}}function o(){if(!e&&f.auto){clearInterval(c);if(f.fadeOut){a(t).fadeOut(f.fadeOut,function(){u(p)})}else{u(p);t.style.display="none"}}if(typeof f.callAfter=="function"){f.callAfter(t,p,f)}if(k){f=a.listen(f)}}if(f.timeout>0){r=setTimeout(function(){o()},f.timeout)}else{o()}}a(t).hover(function(){e=true},function(){e=false;h(l)});if(k){f.key=t;f.plugin="wTooltip";f.channel="wayfarer";a.talk(f)}j(f.content&&!f.ajax);a(t).appendTo(f.appendTip);return this.each(function(){this.onmouseover=function(u){var p=this;clearTimeout(r);if(this.title&&!f.degrade&&!f.content){n=this.title;this.title=""}if(f.content&&f.degrade){this.title=t.innerHTML}function o(){if(typeof f.callBefore=="function"){f.callBefore(t,p,f)}if(k){f=a.listen(f)}if(f.auto){var v;if(f.content){if(!f.degrade){v="block"}}else{if(n&&!f.degrade){a(t).html(n);v="block"}else{v="none"}}if(v=="block"&&f.fadeIn){a(t).fadeIn(f.fadeIn)}else{t.style.display=v}}}if(f.delay>0){m=setTimeout(function(){o()},f.delay)}else{o()}};this.onmousemove=function(y){var w=(y)?y:window.event,v=this;l=this;if(f.follow||b){var z=i.scrollTop;var A=i.scrollLeft;var x=w.clientY+z+f.offsetY;var p=w.clientX+A+f.offsetX;var o=a(window).width()+A-a(t).outerWidth();var u=a(window).height()+z-a(t).outerHeight();q=(x>u||p>o)?true:false;if(p-A<=0&&f.offsetX<0){p=A}else{if(p>o){p=o}}if(x-z<=0&&f.offsetY<0){x=z}else{if(x>u){x=u}}t.style.top=x+"px";t.style.left=p+"px";b=false}};this.onmouseout=function(){clearTimeout(m);var o=this;b=true;if(!f.follow||q||(f.offsetX<0&&f.offsetY<0)){setTimeout(function(){c=setInterval(function(){h(o)},1)},1)}else{h(this)}};if(typeof f.clickAction=="function"){this.onclick=function(){f.clickAction(t,this)}}})}})(jQuery);
 */

/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);