(function($) {
 
  $.fn.tweet = function(o){
    var s = {
      //username: ["sbr_ac"],              // [string]   required, unless you want to display our tweets. :) it can be an array, just do ["username1","username2","etc"]
      list: null,                              //[string]   optional name of list belonging to username
      avatar_size: null,                      // [integer]  height and width of avatar if displayed (48px max)
      count: 3,                               // [integer]  how many tweets to display?
      intro_text: null,                       // [string]   do you want text BEFORE your your tweets?
      outro_text: null,                       // [string]   do you want text AFTER your tweets?
      join_text:  null,                       // [string]   optional text in between date and tweet, try setting to "auto"
      auto_join_text_default: "i said,",      // [string]   auto text for non verb: "i said" bullocks
      auto_join_text_ed: "i",                 // [string]   auto text for past tense: "i" surfed
      auto_join_text_ing: "i am",             // [string]   auto tense for present tense: "i was" surfing
      auto_join_text_reply: "i replied to",   // [string]   auto tense for replies: "i replied to" @someone "with"
      auto_join_text_url: "i was looking at", // [string]   auto tense for urls: "i was looking at" http:...
      loading_text: null,                     // [string]   optional loading text, displayed while tweets load
      query: null                             // [string]   optional search query
    };
    
    if(o) $.extend(s, o);
    
    $.fn.extend({
      linkUrl: function() {
        var returning = [];
        var regexp = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
        this.each(function() {
          returning.push(this.replace(regexp,"<a href=\"$1\">$1</a>"));
        });
        return $(returning);
      },
      linkUser: function() {
        var returning = [];
        var regexp = /[\@]+([A-Za-z0-9-_]+)/gi;
        this.each(function() {
          returning.push(this.replace(regexp,"<a href=\"http://twitter.com/$1\">@$1</a>"));
        });
        return $(returning);
      },
      linkHash: function() {
        var returning = [];
        var regexp = / [\#]+([A-Za-z0-9-_]+)/gi;
        this.each(function() {
          returning.push(this.replace(regexp, ' <a href="http://search.twitter.com/search?q=&tag=$1&lang=all&from='+s.username.join("%2BOR%2B")+'">#$1</a>'));
        });
        return $(returning);
      },
      capAwesome: function() {
        var returning = [];
        this.each(function() {
          returning.push(this.replace(/\b(awesome)\b/gi, '<span class="awesome">$1</span>'));
        });
        return $(returning);
      },
      capEpic: function() {
        var returning = [];
        this.each(function() {
          returning.push(this.replace(/\b(epic)\b/gi, '<span class="epic">$1</span>'));
        });
        return $(returning);
      },
      makeHeart: function() {
        var returning = [];
        this.each(function() {
          returning.push(this.replace(/(&lt;)+[3]/gi, "<tt class='heart'>&#x2665;</tt>"));
        });
        return $(returning);
      }
    });

    function parse_date(date_str) {
      // The non-search twitter APIs return inconsistently-formatted dates, which Date.parse
      // cannot handle in IE. We therefore perform the following transformation:
      // "Wed Apr 29 08:53:31 +0000 2009" => "Wed, Apr 29 2009 08:53:31 +0000"
      return Date.parse(date_str.replace(/^([a-z]{3})( [a-z]{3} \d\d?)(.*)( \d{4})$/i, '$1,$2$4$3'));
    }

    function relative_time(time_value) {
      var parsed_date = parse_date(time_value);
      var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
      var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
      var pluralize = function (singular, n) {
        return '' + n + ' ' + singular + (n == 1 ? '' : 's');
      };
      if(delta < 60) {
      return 'less than a minute ago';
      } else if(delta < (60*60)) {
      return 'about ' + pluralize("minute", parseInt(delta / 60)) + ' ago';
      } else if(delta < (24*60*60)) {
      return 'about ' + pluralize("hour", parseInt(delta / 3600)) + ' ago';
      } else {
      return 'about ' + pluralize("day", parseInt(delta / 86400)) + ' ago';
      }
    }

    function build_url() {
      var proto = ('https:' == document.location.protocol ? 'https:' : 'http:');
      if (s.list) {
        return proto+"//api.twitter.com/1/"+s.username[0]+"/lists/"+s.list+"/statuses.json?per_page="+s.count+"&callback=?";
      } else if (s.query == null && s.username.length == 1) {
        return proto+'//api.twitter.com/1/statuses/user_timeline.json?screen_name='+s.username[0]+'&count='+s.count+'&callback=?';
      } else {
        var query = (s.query || 'from:'+s.username.join(' OR from:'));
        return proto+'//search.twitter.com/search.json?&q='+escape(query)+'&rpp='+s.count+'&callback=?';
      }
    }

    return this.each(function(){
      var list = $('<ul class="tweet_list">').appendTo(this);
      var intro = '<p class="tweet_intro">'+s.intro_text+'</p>';
      var outro = '<p class="tweet_outro">'+s.outro_text+'</p>';
      var loading = $('<p class="loading">'+s.loading_text+'</p>');

      if(typeof(s.username) == "string"){
        s.username = [s.username];
      }

      if (s.loading_text) $(this).append(loading);
      $.getJSON(build_url(), function(data){
        if (s.loading_text) loading.remove();
        if (s.intro_text) list.before(intro);
        $.each((data.results || data), function(i,item){
          // auto join text based on verb tense and content
          if (s.join_text == "auto") {
            if (item.text.match(/^(@([A-Za-z0-9-_]+)) .*/i)) {
              var join_text = s.auto_join_text_reply;
            } else if (item.text.match(/(^\w+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+) .*/i)) {
              var join_text = s.auto_join_text_url;
            } else if (item.text.match(/^((\w+ed)|just) .*/im)) {
              var join_text = s.auto_join_text_ed;
            } else if (item.text.match(/^(\w*ing) .*/i)) {
              var join_text = s.auto_join_text_ing;
            } else {
              var join_text = s.auto_join_text_default;
            }
          } else {
            var join_text = s.join_text;
          };

          var from_user = item.from_user || item.user.screen_name;
          var profile_image_url = item.profile_image_url || item.user.profile_image_url;
          var join_template = '<span class="tweet_join"> '+join_text+' </span>';
          var join = ((s.join_text) ? join_template : ' ');
          var avatar_template = '<a class="tweet_avatar" href="http://twitter.com/'+from_user+'"><img src="'+profile_image_url+'" height="'+s.avatar_size+'" width="'+s.avatar_size+'" alt="'+from_user+'\'s avatar" title="'+from_user+'\'s avatar" border="0"/></a>';
          var avatar = (s.avatar_size ? avatar_template : '');
          var date = '<span class="tweet_time"><a href="http://twitter.com/'+from_user+'/statuses/'+item.id_str+'" title="view tweet on twitter" target="_blank">'+relative_time(item.created_at)+'</a></span>';
          var text = '<span class="tweet_text">' +$([item.text]).linkUrl().linkUser().linkHash().makeHeart().capAwesome().capEpic()[0]+ '</span>';

          // until we create a template option, arrange the items below to alter a tweet's display.
          list.append('<li>' + avatar + date + join + text + '</li>');

          list.children('li:first').addClass('tweet_first');
          list.children('li:odd').addClass('tweet_even');
          list.children('li:even').addClass('tweet_odd');
        });
        if (s.outro_text) list.after(outro);
      });

    });
  };
})(jQuery);


// ColorBox v1.3.6 - a full featured, light-weight, customizable lightbox based on jQuery 1.3
// c) 2009 Jack Moore - www.colorpowered.com - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php

(function ($) {
	// Shortcuts (to increase compression)
	var colorbox = 'colorbox',
	hover = 'hover',
	TRUE = true,
	FALSE = false,
	cboxPublic,
	isIE = $.browser.msie && !$.support.opacity, // feature detection alone gave false positives in some browsers
	isIE6 = isIE && $.browser.version < 7,

	// Event Strings (to increase compression)
	cbox_open = 'cbox_open',
	cbox_load = 'cbox_load',
	cbox_complete = 'cbox_complete',
	cbox_cleanup = 'cbox_cleanup',
	cbox_closed = 'cbox_closed',
	cbox_resize = 'resize.cbox_resize',

	// Cached jQuery Object Variables
	$overlay,
	$cbox,
	$wrap,
	$content,
	$topBorder,
	$leftBorder,
	$rightBorder,
	$bottomBorder,
	$related,
	$window,
	$loaded,
	$loadingBay,
	$loadingOverlay,
	$loadingGraphic,
	$title,
	$current,
	$slideshow,
	$next,
	$prev,
	$close,

	// Variables for cached values or use across multiple functions
	interfaceHeight,
	interfaceWidth,
	loadedHeight,
	loadedWidth,
	element,
	bookmark,
	index,
	settings,
	open,
	active,
	
	// ColorBox Default Settings.	
	// See http://colorpowered.com/colorbox for details.
	defaults = {
		transition: "elastic",
		speed: 350,
		width: FALSE,
		height: FALSE,
		innerWidth: FALSE,
		innerHeight: FALSE,
		initialWidth: "400",
		initialHeight: "400",
		maxWidth: FALSE,
		maxHeight: FALSE,
		scalePhotos: TRUE,
		scrolling: TRUE,
		inline: FALSE,
		html: FALSE,
		iframe: FALSE,
		photo: FALSE,
		href: FALSE,
		title: FALSE,
		rel: FALSE,
		opacity: 0.9,
		preloading: TRUE,
		current: "image {current} of {total}",
		previous: "previous",
		next: "next",
		close: "close",
		open: FALSE,
		overlayClose: TRUE,
		
		slideshow: FALSE,
		slideshowAuto: TRUE,
		slideshowSpeed: 2500,
		slideshowStart: "start slideshow",
		slideshowStop: "stop slideshow",
		
		onOpen: FALSE,
		onLoad: FALSE,
		onComplete: FALSE,
		onCleanup: FALSE,
		onClosed: FALSE
	};
	
	// ****************
	// HELPER FUNCTIONS
	// ****************
		
	// Convert % values to pixels
	function setSize(size, dimension) {
		dimension = dimension === 'x' ? $window.width() : $window.height();//document.documentElement.clientWidth : document.documentElement.clientHeight;
		return (typeof size === 'string') ? Math.round((size.match(/%/) ? (dimension / 100) * parseInt(size, 10) : parseInt(size, 10))) : size;
	}

	// Checks an href to see if it is a photo.
	// There is a force photo option (photo: true) for hrefs that cannot be matched by this regex.
	function isImage(url) {
		url = $.isFunction(url) ? url.call(element) : url;
		return settings.photo || url.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i);
	}
	
	// Assigns functions results to their respective settings.  This allows functions to be used to set ColorBox options.
	function process() {
		for (var i in settings) {
			if ($.isFunction(settings[i]) && i.substring(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
			    settings[i] = settings[i].call(element);
			}
		}
		settings.rel = settings.rel || element.rel;
		settings.href = settings.href || element.href;
		settings.title = settings.title || element.title;
	}

	function launch(elem) {
		
		element = elem;
		
		settings = $(element).data(colorbox);
		
		process(); // Convert functions to their returned values.
		
		if (settings.rel && settings.rel !== 'nofollow') {
			$related = $('.cboxElement').filter(function () {
				var relRelated = $(this).data(colorbox).rel || this.rel;
				return (relRelated === settings.rel);
			});
			index = $related.index(element);
			
			// Check direct calls to ColorBox.
			if (index < 0) {
				$related = $related.add(element);
				index = $related.length - 1;
			}
		} else {
			$related = $(element);
			index = 0;
		}
		
		if (!open) {
			open = TRUE;
			
			active = TRUE; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
			
			bookmark = element;
			
			bookmark.blur(); // Remove the focus from the calling element.
			
			// Set Navigation Key Bindings
			$(document).bind("keydown.cbox_close", function (e) {
				if (e.keyCode === 27) {
					e.preventDefault();
					cboxPublic.close();
				}
			}).bind("keydown.cbox_arrows", function (e) {
				if ($related.length > 1) {
					if (e.keyCode === 37) {
						e.preventDefault();
						$prev.click();
					} else if (e.keyCode === 39) {
						e.preventDefault();
						$next.click();
					}
				}
			});
			
			if (settings.overlayClose) {
				$overlay.css({"cursor": "pointer"}).one('click', cboxPublic.close);
			}
			
			$.event.trigger(cbox_open);
			if (settings.onOpen) {
				settings.onOpen.call(element);
			}
			
			$overlay.css({"opacity": settings.opacity}).show();
			
			// Opens inital empty ColorBox prior to content being loaded.
			settings.w = setSize(settings.initialWidth, 'x');
			settings.h = setSize(settings.initialHeight, 'y');
			cboxPublic.position(0);
			
			if (isIE6) {
				$window.bind('resize.cboxie6 scroll.cboxie6', function () {
					$overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()});
				}).trigger("scroll.cboxie6");
			}
		}
		
		$current.add($prev).add($next).add($slideshow).add($title).hide();
		
		$close.html(settings.close).show();
		
		cboxPublic.slideshow();
		
		cboxPublic.load();
	}

	// ****************
	// PUBLIC FUNCTIONS
	// Usage format: $.fn.colorbox.close();
	// Usage from within an iframe: parent.$.fn.colorbox.close();
	// ****************
	
	cboxPublic = $.fn.colorbox = function (options, callback) {
		var $this = this;
		
		if (!$this.length) {
			if ($this.selector === '') { // empty selector means a direct call, ie: $.fn.colorbox();
				$this = $('<a/>');
				options.open = TRUE;
			} else { // else the selector didn't match anything, and colorbox should go ahead and return.
				return this;
			}
		}
		
		$this.each(function () {
			var data = $.extend({}, $(this).data(colorbox) ? $(this).data(colorbox) : defaults, options);
			
			$(this).data(colorbox, data).addClass("cboxElement");
			
			if (callback) {
				$(this).data(colorbox).onComplete = callback;
			}
		});
		
		if (options && options.open) {
			launch($this);
		}
		
		return this;
	};

	// Initialize ColorBox: store common calculations, preload the interface graphics, append the html.
	// This preps colorbox for a speedy open when clicked, and lightens the burdon on the browser by only
	// having to run once, instead of each time colorbox is opened.
	cboxPublic.init = function () {
		
		// jQuery object generator to save a bit of space
		function $div(id) {
			return $('<div id="cbox' + id + '"/>');
		}
		
		// Create & Append jQuery Objects
		$window = $(window);
		$cbox = $('<div id="colorbox"/>');
		$overlay = $div("Overlay").hide();
		$wrap = $div("Wrapper");
		$content = $div("Content").append(
			$loaded = $div("LoadedContent").css({width: 0, height: 0}),
			$loadingOverlay = $div("LoadingOverlay"),
			$loadingGraphic = $div("LoadingGraphic"),
			$title = $div("Title"),
			$current = $div("Current"),
			$slideshow = $div("Slideshow"),
			$next = $div("Next"),
			$prev = $div("Previous"),
			$close = $div("Close")
		);
		$wrap.append( // The 3x3 Grid that makes up ColorBox
			$('<div/>').append(
				$div("TopLeft"),
				$topBorder = $div("TopCenter"),
				$div("TopRight")
			),
			$('<div/>').append(
				$leftBorder = $div("MiddleLeft"),
				$content,
				$rightBorder = $div("MiddleRight")
			),
			$('<div/>').append(
				$div("BottomLeft"),
				$bottomBorder = $div("BottomCenter"),
				$div("BottomRight")
			)
		).children().children().css({'float': 'left'});
		
		$loadingBay = $("<div style='position:absolute; top:0; left:0; width:9999px; height:0;'/>");
		
		$('body').prepend($overlay, $cbox.append($wrap, $loadingBay));
				
		if (isIE) {
			$cbox.addClass('cboxIE');
			if (isIE6) {
				$overlay.css('position', 'absolute');
			}
		}
		
		// Add rollover event to navigation elements
		$content.children()
		.bind('mouseover mouseout', function(){
			$(this).toggleClass(hover);
		}).addClass(hover);
		
		// Cache values needed for size calculations
		interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(TRUE) - $content.height();//Subtraction needed for IE6
		interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(TRUE) - $content.width();
		loadedHeight = $loaded.outerHeight(TRUE);
		loadedWidth = $loaded.outerWidth(TRUE);
		
		// Setting padding to remove the need to do size conversions during the animation step.
		$cbox.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth}).hide();
		
		// Setup button & key events.
		$next.click(cboxPublic.next);
		$prev.click(cboxPublic.prev);
		$close.click(cboxPublic.close);
		
		// Adding the 'hover' class allowed the browser to load the hover-state
		// background graphics.  The class can now can be removed.
		$content.children().removeClass(hover);
		
		$('.cboxElement').live('click', function (e) {
			if (e.button !== 0 && typeof e.button !== 'undefined') {// checks to see if it was a non-left mouse-click.
				return TRUE;
			} else {
				launch(this);			
				return FALSE;
			}
		});
	};

	cboxPublic.position = function (speed, loadedCallback) {
		var
		animate_speed,
		winHeight = $window.height(),
		// keeps the top and left positions within the browser's viewport.
		posTop = Math.max(winHeight - settings.h - loadedHeight - interfaceHeight,0)/2 + $window.scrollTop(),
		posLeft = Math.max(document.documentElement.clientWidth - settings.w - loadedWidth - interfaceWidth,0)/2 + $window.scrollLeft();
		
		// setting the speed to 0 to reduce the delay between same-sized content.
		animate_speed = ($cbox.width() === settings.w+loadedWidth && $cbox.height() === settings.h+loadedHeight) ? 0 : speed;
		
		// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
		// but it has to be shrank down around the size of div#colorbox when it's done.  If not,
		// it can invoke an obscure IE bug when using iframes.
		$wrap[0].style.width = $wrap[0].style.height = "9999px";
		
		function modalDimensions (that) {
			// loading overlay size has to be sure that IE6 uses the correct height.
			$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = that.style.width;
			$loadingGraphic[0].style.height = $loadingOverlay[0].style.height = $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = that.style.height;
		}
		
		$cbox.dequeue().animate({width:settings.w+loadedWidth, height:settings.h+loadedHeight, top:posTop, left:posLeft}, {duration: animate_speed,
			complete: function(){
				modalDimensions(this);
				
				active = FALSE;
				
				// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
				$wrap[0].style.width = (settings.w+loadedWidth+interfaceWidth) + "px";
				$wrap[0].style.height = (settings.h+loadedHeight+interfaceHeight) + "px";
				
				if (loadedCallback) {loadedCallback();}
			},
			step: function(){
				modalDimensions(this);
			}
		});
	};

	cboxPublic.resize = function (object) {
		if(!open){ return; }
		
		var topMargin,
		prev,
		prevSrc,
		next,
		nextSrc,
		photo,
		timeout,
		speed = settings.transition==="none" ? 0 : settings.speed;
		
		$window.unbind(cbox_resize);
		
		if(!object){
			timeout = setTimeout(function(){ // timer allows IE to render the dimensions before attempting to calculate the height
				var $child = $loaded.wrapInner("<div style='overflow:auto'></div>").children(); // temporary wrapper to get an accurate estimate of just how high the total content should be.
				settings.h = $child.height();
				$loaded.css({height:settings.h});
				$child.replaceWith($child.children()); // ditch the temporary wrapper div used in height calculation
				cboxPublic.position(speed);
			}, 1);
			return;
		}
		
		$loaded.remove();
		$loaded = $('<div id="cboxLoadedContent"/>').html(object);
		
		function getWidth(){
			settings.w = settings.w || $loaded.width();
			settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
			return settings.w;
		}
		function getHeight(){
			settings.h = settings.h || $loaded.height();
			settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
			return settings.h;
		}
		
		$loaded.hide()
		.appendTo($loadingBay)// content has to be appended to the DOM for accurate size calculations.  Appended to an absolutely positioned element, rather than BODY, which avoids an extremely brief display of the vertical scrollbar in Firefox that can occur for a small minority of websites.
		.css({width:getWidth(), overflow:settings.scrolling ? 'auto' : 'hidden'})
		.css({height:getHeight()})// sets the height independently from the width in case the new width influences the value of height.
		.prependTo($content);
		
		$('#cboxPhoto').css({cssFloat:'none'});// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
		
		// Hides SELECT elements in IE6 because they would otherwise sit on top of the overlay.
		if (isIE6) {
			$('select:not(#colorbox select)').filter(function(){
				return this.style.visibility !== 'hidden';
			}).css({'visibility':'hidden'}).one(cbox_cleanup, function(){
				this.style.visibility = 'inherit';
			});
		}
				
		function setPosition (s) {
			cboxPublic.position(s, function(){
				if (!open) { return; }
				
				if (isIE) {
					//This fadeIn helps the bicubic resampling to kick-in.
					if( photo ){$loaded.fadeIn(100);}
					//IE adds a filter when ColorBox fades in and out that can cause problems if the loaded content contains transparent pngs.
					$cbox[0].style.removeAttribute("filter");
				}
				
				//Waited until the iframe is added to the DOM & it is visible before setting the src.
				//This increases compatability with pages using DOM dependent JavaScript.
				if(settings.iframe){
					$loaded.append("<iframe id='cboxIframe'" + (settings.scrolling ? " " : "scrolling='no'") + " name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+settings.href+"' " + (isIE ? "allowtransparency='true'" : '') + " />");
				}
				
				$loaded.show();
				
				$title.show().html(settings.title);
				
				if ($related.length>1) {
					$current.html(settings.current.replace(/\{current\}/, index+1).replace(/\{total\}/, $related.length)).show();
					$next.html(settings.next).show();
					$prev.html(settings.previous).show();
					
					if(settings.slideshow){
						$slideshow.show();
					}
				}
				
				$loadingOverlay.hide();
				$loadingGraphic.hide();
				
				$.event.trigger(cbox_complete);
				if (settings.onComplete) {
					settings.onComplete.call(element);
				}
				
				if (settings.transition === 'fade'){
					$cbox.fadeTo(speed, 1, function(){
						if(isIE){$cbox[0].style.removeAttribute("filter");}
					});
				}
				
				$window.bind(cbox_resize, function(){
					cboxPublic.position(0);
				});
			});
		}
		
		if((settings.transition === 'fade' && $cbox.fadeTo(speed, 0, function(){setPosition(0);})) || setPosition(speed)){}
		
		// Preloads images within a rel group
		if (settings.preloading && $related.length>1) {
			prev = index > 0 ? $related[index-1] : $related[$related.length-1];
			next = index < $related.length-1 ? $related[index+1] : $related[0];
			nextSrc = $(next).data(colorbox).href || next.href;
			prevSrc = $(prev).data(colorbox).href || prev.href;
			
			if(isImage(nextSrc)){
				$('<img />').attr('src', nextSrc);
			}
			
			if(isImage(prevSrc)){
				$('<img />').attr('src', prevSrc);
			}
		}
	};

	cboxPublic.load = function () {
		var href, img, setResize, resize = cboxPublic.resize;
		
		active = TRUE;
		
		/*
		 
		// I decided to comment this out because I can see it causing problems as users
		// really should just set the dimensions on their IMG elements instead,
		// but I'm leaving the code in as it may be useful to someone.
		// To use, uncomment the function and change 'if(textStatus === "success"){ resize(this); }'
		// to 'if(textStatus === "success"){ preload(this); }'
		
		// Preload loops through the HTML to find IMG elements and loads their sources.
		// This allows the resize method to accurately estimate the dimensions of the new content.
		function preload(html){
			var
			$ajax = $(html),
			$imgs = $ajax.find('img'),
			x = $imgs.length;
			
			function loadloop(){
				var img = new Image();
				x = x-1;
				if(x >= 0){
					img.onload = loadloop;
					img.src = $imgs[x].src;
				} else {
					resize($ajax);
				}
			}
			
			loadloop();
		}
		*/
		
		element = $related[index];
		
		settings = $(element).data(colorbox);
		
		//convert functions to static values
		process();
		
		$.event.trigger(cbox_load);
		if (settings.onLoad) {
			settings.onLoad.call(element);
		}
		
		// Evaluate the height based on the optional height and width settings.
		settings.h = settings.height ?
				setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
				settings.innerHeight ?
					setSize(settings.innerHeight, 'y') :
					FALSE;
		settings.w = settings.width ?
				setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
				settings.innerWidth ?
					setSize(settings.innerWidth, 'x') :
					FALSE;
		
		// Sets the minimum dimensions for use in image scaling
		settings.mw = settings.w;
		settings.mh = settings.h;
		
		// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
		// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
		if(settings.maxWidth){
			settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
			settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
		}
		if(settings.maxHeight){
			settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
			settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
		}
		
		href = settings.href;
		
		$loadingOverlay.show();
		$loadingGraphic.show();
		
		if (settings.inline) {
			// Inserts an empty placeholder where inline content is being pulled from.
			// An event is bound to put inline content back when ColorBox closes or loads new content.
			$('<div id="cboxInlineTemp" />').hide().insertBefore($(href)[0]).bind(cbox_load+' '+cbox_cleanup, function(){
				$(this).replaceWith($loaded.children());
			});
			resize($(href));
		} else if (settings.iframe) {
			// IFrame element won't be added to the DOM until it is ready to be displayed,
			// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
			resize(" ");
		} else if (settings.html) {
			resize(settings.html);
		} else if (isImage(href)){
			img = new Image();
			img.onload = function(){
				var percent;
				
				img.onload = null;
				
				img.id = 'cboxPhoto';
				
				$(img).css({margin:'auto', border:'none', display:'block', cssFloat:'left'});
				
				if(settings.scalePhotos){
					setResize = function(){
						img.height -= img.height * percent;
						img.width -= img.width * percent;	
					};
					if(settings.mw && img.width > settings.mw){
						percent = (img.width - settings.mw) / img.width;
						setResize();
					}
					if(settings.mh && img.height > settings.mh){
						percent = (img.height - settings.mh) / img.height;
						setResize();
					}
				}
				
				if (settings.h) {
					img.style.marginTop = Math.max(settings.h - img.height,0)/2 + 'px';
				}
				
				resize(img);
				
				if($related.length > 1){
					$(img).css({cursor:'pointer'}).click(cboxPublic.next);
				}
				
				if(isIE){
					img.style.msInterpolationMode='bicubic';
				}
			};
			img.src = href;
		} else {
			$('<div />').appendTo($loadingBay).load(href, function(data, textStatus){
				if(textStatus === "success"){
					resize(this);
				} else {
					resize($("<p>Request unsuccessful.</p>"));
				}
			});
		}
	};

	// Navigates to the next page/image in a set.
	cboxPublic.next = function () {
		if(!active){
			index = index < $related.length-1 ? index+1 : 0;
			cboxPublic.load();
		}
	};
	
	cboxPublic.prev = function () {
		if(!active){
			index = index > 0 ? index-1 : $related.length-1;
			cboxPublic.load();
		}
	};

	cboxPublic.slideshow = function () {
		var stop, timeOut, className = 'cboxSlideshow_';
		
		$slideshow.bind(cbox_closed, function(){
			$slideshow.unbind();
			clearTimeout(timeOut);
			$cbox.removeClass(className+"off"+" "+className+"on");
		});
		
		function start(){
			$slideshow
			.text(settings.slideshowStop)
			.bind(cbox_complete, function(){
				timeOut = setTimeout(cboxPublic.next, settings.slideshowSpeed);
			})
			.bind(cbox_load, function(){
				clearTimeout(timeOut);	
			}).one("click", function(){
				stop();
				$(this).removeClass(hover);
			});
			$cbox.removeClass(className+"off").addClass(className+"on");
		}
		
		stop = function(){
			clearTimeout(timeOut);
			$slideshow
			.text(settings.slideshowStart)
			.unbind(cbox_complete+' '+cbox_load)
			.one("click", function(){
				start();
				timeOut = setTimeout(cboxPublic.next, settings.slideshowSpeed);
				$(this).removeClass(hover);
			});
			$cbox.removeClass(className+"on").addClass(className+"off");
		};
		
		if(settings.slideshow && $related.length>1){
			if(settings.slideshowAuto){
				start();
			} else {
				stop();
			}
		}
	};

	// Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close();
	cboxPublic.close = function () {
		
		$.event.trigger(cbox_cleanup);
		if (settings.onCleanup) {
			settings.onCleanup.call(element);
		}
		
		open = FALSE;
		$(document).unbind("keydown.cbox_close keydown.cbox_arrows");
		$window.unbind(cbox_resize+' resize.cboxie6 scroll.cboxie6');
		$overlay.css({cursor: 'auto'}).fadeOut('fast');
		
		$cbox
		.stop(TRUE, FALSE)
		.fadeOut('fast', function () {
			$('#colorbox iframe').attr('src', 'about:blank');
			$loaded.remove();
			$cbox.css({'opacity': 1});
			
			try{
				bookmark.focus();
			} catch (er){
				// do nothing
			}
			
			$.event.trigger(cbox_closed);
			if (settings.onClosed) {
				settings.onClosed.call(element);
			}
		});
	};

	// A method for fetching the current element ColorBox is referencing.
	// returns a jQuery object.
	cboxPublic.element = function(){ return $(element); };

	cboxPublic.settings = defaults;

	// Initializes ColorBox when the DOM has loaded
	$(cboxPublic.init);

}(jQuery));
////////////////////////////////////////////////////////////////////////////


//////////////////////////
/*
	jQuery Blend v1.3
	(c) 2009 Jack Moore - www.colorpowered.com - jack@colorpowered.com
	Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
(function($){
    /*
        Blend creates a 2nd layer on top of the target element.
        This layer is faded in and out to create the effect.  The orignal, bottom layer
        has it's class set to 'hover' and remains that way for the duration to
        keep the CSS :hover state from being apparent when the object is moused-over.
    */
    
    $.fn.blend = function(options, callback) {
	// Disable Blend for FireFox 2 because of a bug that does not allow JavaScript
	// to retrieve the CSS background position.
	// More info: https://bugzilla.mozilla.org/show_bug.cgi?id=316981
	if ($.browser.mozilla && (parseFloat($.browser.version) < 1.9)) { return this; }
	
	var settings = $.extend({}, $.fn.blend.settings, options);
        $(this).each(function(){    
	    var $this = $(this),
		$target = $(settings.target ? settings.target : this),
		$hover,
		target = [],
		i,
		length,
		style = {},
		active = false,
		out = 0,
		opacity = settings.opacity,
		bg = 'background-',
		properties = [
		    bg+'color',
		    bg+'image',
		    bg+'repeat',
		    bg+'attachment',
		    bg+'position',
		    bg+'position-x',
		    bg+'position-y'
		];
	    
	    length = properties.length;
	    
	    if($target[0].style.position !== 'absolute'){
		$target.css({position:'relative'});   
	    }
	    
	    if(!$target.hasClass('hover')){
		$target.wrapInner('<div style="position:relative" />');
	    }
	    
	    for (i=0; i<length; i++){
		target[i] = $target.css(properties[i]);
	    }
	    
	    $target.addClass("hover");
	    
	    style = {};
		style.position='absolute';
		style.top=0;
		style.left=0;
		style.width=$target.width();
		style.height=$target.height();
		for (i=0; i<length; i++){
		    style[properties[i]] = $target.css(properties[i]);
		}
		
	    //checks to see if blend has already been applied to an element.
	    if($target.find(".jsblend").length === 0){
		$hover = $('<div class="jsblend" />').css(style);
		
		if(settings.top){
		    $hover.appendTo($target);
		} else {
		    $hover.prependTo($target);
		}
	    } else {
		$hover = $target.find(".jsblend");
	    }
	    
	    style = {};
	    for (i=0; i<length; i++){
		style[properties[i]] = target[i];
	    }
	    
	    $target.css(style);
	    
	    if(settings.reverse){
		out = settings.opacity;
		opacity = 0;
	    }
	    $hover.css({opacity:out});
	    
	    function pulse(o){
		if(active){
		    $hover.fadeTo(settings.speed, o, function(){
			pulse(o===out?opacity:out);
		    });
		}
	    }
	    
	    if(settings.pulse && settings.active){
		active = true;
		pulse(opacity);
	    } else if(settings.pulse){
		$this.hover(function(){
		    active = true;
		    pulse(opacity);
		}, function(){
		    active = false;
		    $hover.stop(true).fadeTo(settings.speed, out);
		});
	    } else {
		$this.hover(function(){
		    $hover.stop().fadeTo(settings.speed, opacity);
		}, function(){
		    $hover.stop().fadeTo(settings.speed, out);
		});
	    }
	    
	});
        return this;
    };
    
    $.fn.blend.settings = {
        speed : 500,
        opacity : 1,
        target : false,
        reverse : false,
	pulse : false,
	active : false,
	top : false
    };
    
}(jQuery));

//////////////////////////////////////////////////////


/*
jQuery Url Plugin
	* Version 1.0
	* 2009-03-22 19:30:05
	* URL: http://ajaxcssblog.com/jquery/url-read-get-variables/
	* Description: jQuery Url Plugin gives the ability to read GET parameters from the actual URL
	* Author: Matthias Jäggli
	* Copyright: Copyright (c) 2009 Matthias Jäggli 
	* Licence: dual, MIT/GPLv2
*/
(function($){$.url={};$.extend($.url,{_params:{},init:function(){var paramsRaw="";try{paramsRaw=(document.location.href.split("?",2)[1]||"").split("#")[0].split("&")||[];for(var i=0;i<paramsRaw.length;i++){var single=paramsRaw[i].split("=");if(single[0])this._params[single[0]]=unescape(single[1]);}}catch(e){alert(e);}},param:function(name){return this._params[name]||"";},paramAll:function(){return this._params;}});$.url.init();})(jQuery);

///////////////////////////////////////////////////

/*
jQuery Fieldtag Plugin
    * Version 1.1
    * 2009-05-07 10:10:35
    * URL: http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/
    * Description: jQuery Plugin to dynamically tag an inputfield, with a class and/or text
    * Author: Matthias Jäggli
    * Copyright: Copyright (c) 2009 Matthias Jäggli under dual MIT/GPL license.
*/

(function($){$.fn.fieldtag=function(options){var opt=$.extend({markedClass:"tagged",standardText:false},options);$(this).focus(function(){if(!this.changed){this.clear();}}).blur(function(){if(!this.changed){this.addTag();}}).keyup(function(){this.changed=($(this).val()?true:false);}).each(function(){this.title=$(this).attr("title");if($(this).val()==$(this).attr("title")){this.changed=false;}
this.clear=function(){if(!this.changed){$(this).val("").removeClass(opt.markedClass);}}
this.addTag=function(){$(this).val(opt.standardText===false?this.title:opt.standardText).addClass(opt.markedClass);}
if(this.form){this.form.tagFieldsToClear=this.form.tagFieldsToClear||[];this.form.tagFieldsToClear.push(this);if(this.form.tagFieldsAreCleared){return true;}
this.form.tagFieldsAreCleared=true;$(this.form).submit(function(){$(this.tagFieldsToClear).each(function(){this.clear();});});}}).keyup().blur();return $(this);}})(jQuery);

///////////////////////////////////////////////////////

/*
This license text has to stay intact at all times:
fleXcroll Public License Version
Cross Browser Custom Scroll Bar Script by Hesido.
Public version - Free for non-commercial uses.

This script cannot be used in any commercially built
web sites, or in sites that relates to commercial
activities. This script is not for re-distribution.
For licensing options:
Contact Emrah BASKAYA @ www.hesido.com

Derivative works are only allowed for personal uses,
and they cannot be redistributed.

FleXcroll Public Key Code: 20050907122003339
MD5 hash for this license: 9ada3be4d7496200ab2665160807745d

End of license text---
*/

// fleXcroll v1.9.5f

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}('7 E={4L:6(){Q.N(1i,\'4v\',Q.51)},3s:6(f){7 g=17,G=1i,1Z=6Q;5(!g.20||!g.4b)B;5(3M(f)==\'4f\')f=17.20(f);5(f==14||1Z.3b.2v(\'5H\')!=-1||((1Z.3b.2v(\'5l\')!=-1||1Z.3b.2v(\'6n\')!=-1)&&!(3M(4O)!="6y"&&4O.6z))||1Z.65==\'67\'||(1Z.6d.2v(\'5h\')!=-1&&1Z.3b.2v(\'5J\')!=-1))B;5(f.1G){f.1G();B};5(!f.1W||f.1W==\'\'){7 h="6h",c=1;1E(17.20(h+c)!=14){c++};f.1W=h+c}7 k=f.1W;f.3n=2n 5E();7 l=f.3n;l.1K={6G:[\'-1s\',0],5r:[0,\'-1s\'],5f:[\'1s\',0],5m:[0,\'1s\'],5w:[0,\'-1p\'],5M:[0,\'1p\'],5Z:[0,\'-52\'],66:[0,\'+52\']};l.3R=["-2s","2s"];l.3z=["-2s","2s"];7 m=Z(\'6e\',C),D=Z(\'6c\',C),H=Z(\'6m\',C),18=Z(\'6O\',C);7 o=Z(\'5x\',C),1g=Z(\'5O\',C),2M=8;18.A.1v=\'4B 4P 5F\';18.1N();f.19.4W=\'2w\';1g.A.6F="6J";1g.A.1x="4j";1g.A.T="4j";1g.A.1P="3X";1g.A.3F="-6u";1g.1N();7 p=f.R,4X=f.1e;2c(f,18,\'16\',[\'1v-12-T\',\'1v-26-T\',\'1v-13-T\',\'1v-1R-T\']);7 q=f.R,4g=f.1e,3A=4X-4g,3C=p-q;7 s=(f.1T)?f.1T:0,5b=(f.1S)?f.1S:0;7 t=17.3O.1k,3S=/#([^#.]*)$/;7 u=[\'5B\',\'60\',\'5c\'];l.V=[];l.21=[];l.5s=l.O=[];l.5A=l.1M=[];l.1u=[8,8];l.W=[];l.1H=[0,0];l.1m=[];l.3x=[];l.X=[];1E(f.4M){m.Y(f.4M)};m.Y(o);f.Y(D);f.Y(18);5(L(f,\'1P\')!=\'3X\')f.19.1P="37";7 w=L(f,\'6p-6r\');f.19.4d=\'12\';D.A.T="4x";D.A.1x="4x";D.A.13="16";D.A.12="16";2c(f,18,"16",[\'J-12\',\'J-13\',\'J-26\',\'J-1R\']);7 x=f.1e,4e=f.R,3p;3p=D.R;D.A.5g="6b 4P 6I";5(D.R>3p)2M=C;D.A.5j="16";2c(18,f,8,[\'J-12\',\'J-13\',\'J-26\',\'J-1R\']);1o(D);1o(f);l.X[0]=D.1f-f.1f;l.X[2]=D.1h-f.1h;f.19.53=L(f,"J-1R");f.19.4G=L(f,"J-26");1o(D);1o(f);l.X[1]=D.1f-f.1f;l.X[3]=D.1h-f.1h;f.19.53=L(18,"J-13");f.19.4G=L(18,"J-12");7 y=l.X[2]+l.X[3],3E=l.X[0]+l.X[1];D.19.4d=w;2c(f,D,8,[\'J-12\',\'J-26\',\'J-13\',\'J-1R\']);H.A.T=f.1e+\'F\';H.A.1x=f.R+\'F\';D.A.T=x+\'F\';D.A.1x=4e+\'F\';H.A.1P=\'3X\';H.A.13=\'16\';H.A.12=\'16\';D.Y(m);f.Y(H);H.Y(1g);m.A.1P=\'37\';D.A.1P=\'37\';m.A.13="0";m.A.T="4y%";D.A.4W=\'2w\';D.A.12="-"+l.X[2]+"F";D.A.13="-"+l.X[0]+"F";l.3T=1g.R;l.2G=6(){7 a=m.5Q,2H=6j=0;1q(7 i=0;i<a.4A;i++){5(a[i].1e){2H=11.1Y(a[i].1e,2H)}};l.O[0]=((l.W[1]&&!l.1m[1])||l.21[1])?f.1e-l.1H[0]:f.1e;l.1M[0]=2H+y;B l.1M[0]};l.2K=6(){l.O[1]=((l.W[0]&&!l.1m[0])||l.21[0])?f.R-l.1H[1]:f.R;l.1M[1]=m.R+3E-2;B l.1M[1]};l.4D=6(){m.A.3I=\'6g\';m.A.3I=\'5t\'};l.3K=6(){D.A.T=(2M)?(l.O[0]-y-3A)+\'F\':l.O[0]+\'F\'};l.3U=6(){D.A.1x=(2M)?(l.O[1]-3E-3C)+\'F\':l.O[1]+\'F\'};l.2m=6(){l.2G();l.2K();H.2E=2n 3v();7 a=H.2E;2m(a,\'6N\');a.2i=[1a(L(a.4,\'J-13\')),1a(L(a.4,\'J-1R\'))];a.4.A.J=\'16\';a.4.K=0;a.4.2O=C;a.4.2a=1;m.4h=a.4;3o(a,0);l.1H[0]=a.1b.1e;l.3K();H.2Q=2n 3v();7 b=H.2Q;2m(b,\'5p\');b.2i=[1a(L(b.4,\'J-12\')),1a(L(b.4,\'J-26\'))];b.4.A.J=\'16\';b.4.K=0;b.4.2O=8;b.4.2a=0;m.5D=b.4;5(G.4T)b.4.A.1P=\'37\';3o(b,0);l.1H[1]=b.1b.R;l.3U();H.A.1x=f.R+\'F\';b.2p=Z(\'68\');H.Y(b.2p);b.2p.3r=6(){b.4.2S=C;l.1Q=b.4;b.4.2U=C;b.4.29=8;H.2E.4.29=8;E.N(g,\'3G\',2x);E.N(g,\'2g\',2W);E.N(g,\'2X\',2F);B 8}};l.1Q=14;l.2m();m.57(o);5(!Q.28(f,\'49\',2f)||!Q.28(f,\'4a\',2f)){f.5C=2f};Q.28(f,\'49\',2f);Q.28(f,\'4a\',2f);f.5G(\'5I\',\'0\');Q.N(f,\'5K\',6(e){5(f.2Z)B;5(!e){7 e=G.1w};7 a=e.4k;l.4u=a;l.27();5(l.1K[\'1L\'+a]&&!1i.4T){f.1c(l.1K[\'1L\'+a][0],l.1K[\'1L\'+a][1],C);5(e.1J)e.1J();B 8}});Q.N(f,\'6q\',6(e){5(f.2Z)B;5(!e){7 e=G.1w};7 a=e.4k;5(l.1K[\'1L\'+a]){f.1c(l.1K[\'1L\'+a][0],l.1K[\'1L\'+a][1],C);5(e.1J)e.1J();B 8}});Q.N(f,\'6s\',6(){l.4u=8});Q.N(g,\'2X\',2A);Q.N(f,\'6w\',6(e){5(!e)e=G.1w;7 a=(e.1A)?e.1A:(e.1n)?e.1n:8;5(!a||(a.1r&&a.1r.U(31("\\\\64\\\\b"))))B;l.4i=e.2r;l.4t=e.2k;33();1o(f);2A();E.N(g,\'2g\',3V);l.2u=[f.1h+10,f.1h+l.O[0]-10,f.1f+10,f.1f+l.O[1]-10]});6 3V(e){5(!e)e=G.1w;7 a=e.2r,3B=e.2k,3j=a+l.3D,3c=3B+l.3d;l.3e=(3j<l.2u[0]||3j>l.2u[1])?1:0;l.3f=(3c<l.2u[2]||3c>l.2u[3])?1:0;l.3k=a-l.4i;l.3m=3B-l.4t;l.36=(l.3k>40)?1:(l.3k<-40)?-1:0;l.39=(l.3m>40)?1:(l.3m<-40)?-1:0;5((l.36!=0||l.39!=0)&&!l.1U)l.1U=G.3a(6(){5(l.36==0&&l.39==0){G.2l(l.1U);l.1U=8;B};33();5(l.3e==1||l.3f==1)f.1c((l.36*l.3e)+"s",(l.39*l.3f)+"s",C)},45)};6 2A(){E.2d(g,\'2g\',3V);5(l.1U)G.2l(l.1U);l.1U=8;5(l.44)G.4V(l.44);5(l.46)G.2l(l.46)};6 33(){l.3D=(G.4Z)?G.4Z:(g.2e&&g.2e.1S)?g.2e.1S:0;l.3d=(G.54)?G.54:(g.2e&&g.2e.1T)?g.2e.1T:0};f.1G=6(a){H.2C();5(H.M[1]()===0||H.M[0]()===0)B;m.A.J=\'4B\';7 b=l.W[0],4p=l.W[1],47=H.2E,2t=H.2Q,2V,2J,2z=[];H.A.T=f.1e-3A+\'F\';H.A.1x=f.R-3C+\'F\';2z[0]=l.O[0];2z[1]=l.O[1];l.W[0]=l.2G()>l.O[0];l.W[1]=l.2K()>l.O[1];7 c=(b!=l.W[0]||4p!=l.W[1]||2z[0]!=l.O[0]||2z[1]!=l.O[1])?C:8;47.1b.3H(l.W[1]);2t.1b.3H(l.W[0]);2V=(l.W[1]||l.21[1]);2J=(l.W[0]||l.21[0]);l.2G();l.2K();l.3U();l.3K();5(!l.W[0]||!l.W[1]||l.1m[0]||l.1m[1])2t.2p.1N();1l 2t.2p.2C();5(2V)2N(47,(2J&&!l.1m[0])?l.1H[1]:0);1l m.A.13="0";5(2J)2N(2t,(2V&&!l.1m[1])?l.1H[0]:0);1l m.A.12="0";5(c&&!a)f.1G(C);m.A.J=\'16\';l.1u[0]=l.1u[1]=8};f.62=f.1c=6(a,b,c){7 d=[[8,8],[8,8]],P;5((a||a===0)&&l.V[0]){a=3L(a,0);P=H.2Q.4;P.1d=(c)?11.22(11.1Y(P.1I,P.1d-a),0):-a;P.3Q();d[0]=[-P.1d-P.24,-P.1I]}5((b||b===0)&&l.V[1]){b=3L(b,1);P=H.2E.4;P.1d=(c)?11.22(11.1Y(P.1I,P.1d-b),0):-b;P.3Q();d[1]=[-P.1d-P.24,-P.1I]}5(!c)l.1u[0]=l.1u[1]=8;B d};f.2Y=6(a){5(a==14||!59(a))B;7 b=48(a);f.1c(b[0]+l.X[2],b[1]+l.X[0],8);f.1c(0,0,C)};2c(18,f,\'16\',[\'1v-12-T\',\'1v-26-T\',\'1v-13-T\',\'1v-1R-T\']);f.57(18);f.1T=0;f.1S=0;f.2I=C;30(f,\'6i\',8);f.1G();f.1c(5b,s,C);5(t.U(3S)){f.2Y(g.20(t.U(3S)[1]))};l.5L=G.3a(6(){7 n=1g.R;5(n!=l.3T){f.1G();l.3T=n}},5N);6 3L(v,i){7 a=v.5P();v=5i(a);B 1a((a.U(/p$/))?v*l.O[i]*0.9:(a.U(/s$/))?v*l.O[i]*0.1:v)}6 41(a){7 a=a.6x(\'-\'),42=a[0],i;1q(i=1;3q=a[i];i++){42+=3q.6B(0).5U()+3q.5z(1)}B 42}6 L(a,b){5(G.4m)B G.4m(a,14).5W(b);5(a.4o)B a.4o[41(b)];B 8};6 2c(a,b,c,d){7 e=2n 3v();1q(7 i=0;i<d.4A;i++){e[i]=41(d[i]);b.19[e[i]]=L(a,d[i],e[i]);5(c)a.19[e[i]]=c}};6 Z(b,c){7 d=g.4b(\'4q\');d.1W=k+\'1L\'+b;d.1r=(c)?b:b+\' 5Y\';d.M=[6(){B d.1e},6(){B d.R}];d.2h=[6(a){d.A.T=a},6(a){d.A.1x=a}];d.4s=[6(){B L(d,"12")},6(){B L(d,"13")}];d.15=[6(a){d.A.12=a},6(a){d.A.13=a}];d.1N=6(){d.A.2j="2w"};d.2C=6(a){d.A.2j=(a)?L(a,\'2j\'):"5d"};d.A=d.19;B d};6 2m(a,b){a.1b=Z(b+\'5e\');a.2o=Z(b+\'5k\');a.25=Z(b+\'5o\');a.4=Z(b+\'5q\');a.1V=Z(b+\'5u\');a.1t=Z(b+\'5y\');H.Y(a.1b);a.1b.Y(a.4);a.1b.Y(a.2o);a.1b.Y(a.25);a.4.Y(a.1V);a.4.Y(a.1t)};6 3o(b,c){7 d=b.1b,4=b.4,i=4.2a;4.1O=b.2i[0];4.2P=d;4.D=D;4.4w=m;4.24=0;2N(b,c,C);4.3h=6(){4.K=(11.22(11.1Y(4.K,0),4.2b));4.1d=1a((4.K/4.32)*4.1I);4.24=(4.K==0)?0:(4.K==4.2b)?0:4.24;4.15[i](4.K+4.1O+"F");m.15[i](4.1d+4.24+"F")};4.3Q=6(){4.K=1a((4.1d*4.32)/4.1I);4.24=4.1d-1a((4.K/4.32)*4.1I);4.K=(11.22(11.1Y(4.K,0),4.2b));4.15[i](4.K+4.1O+"F");4.15[i](4.K+4.1O+"F");m.15[i](4.1d+"F")};l.2B=L(4,\'z-4F\');4.A.3F=(l.2B=="5R"||l.2B=="0"||l.2B==\'5T\')?2:l.2B;D.A.3F=L(4,\'z-4F\');4.3r=6(){4.2U=C;l.1Q=4;4.2S=8;4.29=8;E.N(g,\'3G\',2x);E.N(g,\'2g\',2W);E.N(g,\'2X\',2F);B 8};4.5V=2A;d.3r=d.5X=6(e){5(!e){7 e=G.1w}5(e.1A&&(e.1A==b.1V||e.1A==b.1t||e.1A==b.4))B;5(e.1n&&(e.1n==b.1V||e.1n==b.1t||e.1n==b.4))B;7 a,1X=[];33();l.27();1o(4);a=(4.2O)?e.2k+l.3d-4.1f:e.2r+l.3D-4.1h;1X[4.2a]=(a<0)?l.3z[0]:l.3z[1];1X[1-4.2a]=0;f.1c(1X[0],1X[1],C);5(e.61!="63"){2A();l.44=G.4H(6(){l.46=G.3a(6(){f.1c(1X[0],1X[1],C)},4J)},69)}B 8};d.3H=6(r){5(r){d.2C(f);l.1m[i]=(L(d,"2j")=="2w")?C:8;5(!l.1m[i])4.2C(f);1l 4.1N();l.V[i]=C;30(d,"","4N")}1l{d.1N();4.1N();l.21[i]=(L(d,"2j")!="2w")?C:8;l.V[i]=8;4.K=0;m.15[i](\'16\');30(d,"4N","")}D.15[1-i]((l.3x[i]&&(r||l.21[i])&&!l.1m[i])?l.1H[1-i]-l.X[i*2]+"F":"-"+l.X[i*2]+"F")};d.6f=2x};6 2N(a,b,c){7 d=a.1b,4=a.4,2o=a.2o,1V=a.1V,25=a.25,1t=a.1t,i=4.2a;d.2h[i](H.M[i]()-b+\'F\');d.15[1-i](H.M[1-i]()-d.M[1-i]()+\'F\');l.3x[i]=(1a(d.4s[1-i]())===0)?C:8;a.3l=a.2i[0]+a.2i[1];a.3J=1a((d.M[i]()-a.3l)*0.6l);4.4R=11.22(11.1Y(11.22(1a(l.O[i]/l.1M[i]*d.M[i]()),a.3J),45),a.3J);4.2h[i](4.4R+\'F\');4.2b=d.M[i]()-4.M[i]()-a.3l;4.K=11.22(11.1Y(0,4.K),4.2b);4.15[i](4.K+4.1O+\'F\');4.1I=D.M[i]()-l.1M[i];4.32=4.2b;2o.2h[i](d.M[i]()-25.M[i]()+\'F\');1V.2h[i](4.M[i]()-1t.M[i]()+\'F\');1t.15[i](4.M[i]()-1t.M[i]()+\'F\');25.15[i](d.M[i]()-25.M[i]()+\'F\');5(!c)4.3h();l.4D()};l.27=6(){D.1T=0;D.1S=0;f.1T=0;f.1S=0};Q.N(G,\'4v\',6(){5(f.2I)f.1G()});Q.N(G,\'6o\',6(){5(f.3t)G.4V(f.3t);f.3t=G.4H(6(){5(f.2I)f.1G()},4J)});1q(7 j=0,3i;3i=u[j];j++){7 z=f.34(3i);1q(7 i=0,2R;2R=z[i];i++){E.N(2R,\'6A\',6(){f.2Z=C});E.N(2R,\'6C\',6E=6(){f.2Z=8})}};6 2x(){B 8};6 2W(e){5(!e){7 e=G.1w};7 a=l.1Q,I,3N,6K,6M;5(a==14)B;5(!E.56&&!e.6P)2F();3N=(a.2S)?2:1;1q(7 i=0;i<3N;i++){I=(i==1)?a.4w.4h:a;5(a.2U){5(!I.29){l.27();1o(I);1o(I.2P);I.58=e.2k-I.1f;I.5a=e.2r-I.1h;I.4E=I.K;I.29=C};I.K=(I.2O)?e.2k-I.58-I.2P.1f-I.1O:e.2r-I.5a-I.2P.1h-I.1O;5(a.2S)I.K=I.K+(I.K-I.4E);I.3h()}1l I.29=8}};6 2F(){5(l.1Q!=14){l.1Q.2U=8}l.1Q=14;E.2d(g,\'3G\',2x);E.2d(g,\'2g\',2W);E.2d(g,\'2X\',2F)};6 2f(e){5(!e)e=G.1w;5(!Q.2I)B;7 a=Q,35,3P,1C=8,1j=0,1D;l.27();3g=(e.1A)?e.1A:(e.1n)?e.1n:Q;5(3g.1W&&3g.1W.U(/6a/))1C=C;5(e.4K)1j=-e.4K;5(e.4r)1j=e.4r;1j=(1j<0)?-1:+1;1D=(1j<0)?0:1;l.1u[1-1D]=8;5((l.1u[1D]&&!1C)||(!l.V[0]&&!l.V[1]))B;5(l.V[1]&&!1C)1B=f.1c(8,l.3R[1D],C);35=!l.V[1]||1C||(l.V[1]&&((1B[1][0]==1B[1][1]&&1j>0)||(1B[1][0]==0&&1j<0)));5(l.V[0]&&(!l.V[1]||1C))1B=f.1c(l.3R[1D],8,C);3P=!l.V[0]||(l.V[0]&&l.V[1]&&35&&!1C)||(l.V[0]&&((1B[0][0]==1B[0][1]&&1j>0)||(1B[0][0]==0&&1j<0)));5(35&&3P&&!1C)l.1u[1D]=C;1l l.1u[1D]=8;5(e.1J)e.1J();B 8};6 59(a){1E(a.1y){a=a.1y;5(a==f)B C}B 8};6 1o(a){7 b=a,23=1z=0;7 c="";5(b.2T){1E(b){23+=b.4c;1z+=b.4Q;b=b.2T;c+=1z+" "}}1l 5(b.x){23+=b.x;1z+=b.y}a.1h=23;a.1f=1z};6 48(a){7 b=a;23=1z=0;1E(!b.R&&b.1y&&b!=m&&L(b,\'3I\')=="6k"){b=b.1y}5(b.2T){1E(b!=m){23+=b.4c;1z+=b.4Q;b=b.2T}}B[23,1z]};6 30(a,b,c){5(!a.1r)a.1r=\'\';7 d=a.1r;5(b&&!d.U(31("(^|\\\\s)"+b+"($|\\\\s)")))d=d.3W(/(\\S$)/,\'$1 \')+b;5(c)d=d.3W(31("((^|\\\\s)+"+c+")+($|\\\\s)","g"),\'$2\').3W(/\\s$/,\'\');a.1r=d}},51:6(){5(E.38)1i.2l(E.38);7 d=/#([^#.]*)$/,2q=/(.*)#.*$/,5v,i,1F,4U=17.34("a"),2y=17.3O.1k;5(2y.U(2q))2y=2y.U(2q)[1];1q(i=0;1F=4U[i];i++){5(1F.1k&&1F.1k.U(d)&&1F.1k.U(2q)&&2y===1F.1k.U(2q)[1]){1F.3Y=C;E.N(1F,\'6t\',6(e){5(!e)e=1i.1w;7 a=(e.1n)?e.1n:Q;1E(!a.3Y&&a.1y){a=a.1y};5(!a.3Y)B;7 b=17.20(a.1k.U(d)[1]),2L=8;5(b==14)b=(b=17.6v(a.1k.U(d)[1])[0])?b:14;5(b!=14){7 c=b;1E(c.1y){c=c.1y;5(c.2Y){c.2Y(b);2L=c}};5(2L){5(e.1J)e.1J();17.3O.1k="#"+a.1k.U(d)[1];2L.3n.27();B 8}}})}};E.3Z();5(1i.4Y)1i.4Y()},3Z:6(){5(E.4z)B;E.4z=C;7 a=E.50(17.34("5n")[0],"4q",\'4l\');1q(7 i=0,3u;3u=a[i];i++)E.3s(3u)},50:6(a,b,c){5(3M(a)==\'4f\')a=17.20(a);5(a==14)B 8;7 d=2n 31("(^|\\\\s)"+c+"($|\\\\s)"),6D,3w=[],43=0;7 e=a.34(b);1q(7 i=0,2D;2D=e[i];i++){5(2D.1r&&2D.1r.U(d)){3w[43]=2D;43++}};B 3w},38:1i.3a(6(){7 a=17.20(\'4l-6H\');5(a!=14){E.3Z();1i.2l(E.38)}},4y),N:6(a,b,c){5(!E.28(a,b,c)&&a.55){a.55(\'4C\'+b,c)}},28:6(a,b,c){5(a.3y){a.3y(b,c,8);E.56=C;1i.3y("6L",6(){E.2d(a,b,c)},8);B C}1l B 8},2d:6(a,b,c){5(!E.4n(a,b,c)&&a.4I)a.4I(\'4C\'+b,c)},4n:6(a,b,c){5(a.4S){a.4S(b,c,8);B C}1l B 8}};6 5S(a){E.3s(a)};E.4L();',62,425,'||||sBr|if|function|var|false||||||||||||||||||||||||||||sY|return|true|mDv|fleXenv|px|wD|tDv|movBr|padding|curPos|getStyle|getSize|addTrggr|cntRSize|Bar|this|offsetHeight||width|match|scroller|reqS|paddings|appendChild|createDiv||Math|left|top|null|setPos|0px|document|pDv|style|parseInt|sDv|contentScroll|trgtScrll|offsetWidth|yPos|fDv|xPos|window|delta|href|else|forcedHide|srcElement|findPos||for|className||sSBr|edge|border|event|height|parentNode|curtop|target|scrollState|hoverH|iNDx|while|anchoR|scrollUpdate|barSpace|mxScroll|preventDefault|keyAct|_|cntSize|fHide|minPos|position|goScroll|bottom|scrollLeft|scrollTop|tSelectFunc|sFBr|id|mV|max|nV|getElementById|forcedBar|min|curleft|targetSkew|sSDv|right|mDPosFix|addChckTrggr|moved|indx|maxPos|copyStyles|remTrggr|documentElement|mWheelProc|mousemove|setSize|barPadding|visibility|clientY|clearInterval|createScrollBars|new|sFDv|jBox|urlExt|clientX||hBr|mTBox|indexOf|hidden|retFalse|urlBase|cPSize|intClear|barZ|fShow|pusher|vrt|mMouseUp|getContentWidth|maxCWidth|fleXcroll|hUpReq|getContentHeight|eScroll|stdMode|updateScroll|vertical|ofstParent|hrz|formItem|scrollBoth|offsetParent|clicked|vUpReq|mMoveBar|mouseup|scrollToElement|focusProtect|classChange|RegExp|sRange|pageScrolled|getElementsByTagName|vEdge|sXdir|relative|catchFastInit|sYdir|setInterval|userAgent|mdY|yScrld|mOnXEdge|mOnYEdge|hElem|doScrollPos|inputName|mdX|xAw|padLoss|yAw|fleXdata|prepareScroll|mHeight|parT|onmousedown|fleXcrollMain|refreshTimeout|tgDiv|Array|retArray|forcedPos|addEventListener|baseAct|brdWidthLoss|mY|brdHeightLoss|xScrld|padHeightComp|zIndex|selectstart|setVisibility|display|baseProp|setWidth|calcCScrollVal|typeof|maxx|location|hEdge|contentScrollPos|wheelAct|uReg|zTHeight|setHeight|tSelectMouse|replace|absolute|fleXanchor|initByClass||camelConv|reT|key|barClickRetard||barClickScroll|vBr|findRCpos|mousewheel|DOMMouseScroll|createElement|offsetLeft|textAlign|postHeight|string|intlWidth|vBar|inMposX|1em|keyCode|flexcroll|getComputedStyle|remChckTrggr|currentStyle|reqV|div|detail|getPos|inMposY|pkeY|load|scrlTrgt|100px|100|initialized|length|1px|on|fixIEDispBug|inCurPos|index|paddingLeft|setTimeout|detachEvent|80|wheelDelta|fleXcrollInit|firstChild|flexinactive|HTMLElement|solid|offsetTop|aSize|removeEventListener|opera|anchorList|clearTimeout|overflow|brdWidth|onfleXcrollRun|pageXOffset|getByClassName|globalInit|100p|paddingTop|pageYOffset|attachEvent|w3events|removeChild|pointerOffsetY|isddvChild|pointerOffsetX|oScrollX|select|visible|base|_39|borderBottom|Mac|parseFloat|borderBottomWidth|basebeg|AppleWebKit|_40|body|baseend|hscroller|bar|_38|containerSize|block|barbeg|matcH|_33|domfixdiv|barend|substr|contentSize|textarea|onmousewheel|hBar|Object|blue|setAttribute|OmniWeb|tabIndex|MSIE|keydown|sizeChangeDetect|_34|2500|zoomdetectdiv|toString|childNodes|auto|CSBfleXcroll|normal|toUpperCase|onmouseover|getPropertyValue|ondblclick|scrollgeneric|_36|input|type|commitScroll|dblclick|bscrollgeneric|vendor|_35|KDE|scrollerjogbox|425|_hscroller|2px|mcontentwrapper|platform|contentwrapper|onmouseclick|none|flex__|flexcrollactive|compPad|inline|75|scrollwrapper|Safari|resize|text|keypress|align|keyup|click|999|getElementsByName|mousedown|split|undefined|prototype|focus|charAt|blur|clsnm|onblur|fontSize|_37|init|black|12px|xScroll|unload|yScroll|vscroller|copyholder|button|navigator'.split('|'),0,{}))

/////////////////////////////////////////////////////////////////


