/*  jQuery Easing v1.1.1 - http://gsgd.co.uk/sandbox/jquery.easing.php * Copyright (c) 2007 George Smith * Licensed under the MIT License: *   http://www.opensource.org/licenses/mit-license.php */
jQuery.extend(jQuery.easing,{easein:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeinout:function(x,t,b,c,d){if(t<d/2)return 2*c*t*t/(d*d)+b;var ts=t-d/2;return-2*c*ts*ts/(d*d)+2*c*ts/d+c/2+b;},easeout:function(x,t,b,c,d){return-c*t*t/(d*d)+2*c*t/d+b;},expoin:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1;}
return flip*(Math.exp(Math.log(c)/d*t))+b;},expoout:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1;}
return flip*(-Math.exp(-Math.log(c)/d*(t-d))+c+1)+b;},expoinout:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1;}
if(t<d/2)return flip*(Math.exp(Math.log(c/2)/(d/2)*t))+b;return flip*(-Math.exp(-2*Math.log(c/2)/d*(t-d))+c+1)+b;},bouncein:function(x,t,b,c,d){return c-jQuery.easing['bounceout'](x,d-t,0,c,d)+b;},bounceout:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},bounceinout:function(x,t,b,c,d){if(t<d/2)return jQuery.easing['bouncein'](x,t*2,0,c,d)*.5+b;return jQuery.easing['bounceout'](x,t*2-d,0,c,d)*.5+c*.5+b;},elasin:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasout:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},elasinout:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},backin:function(x,t,b,c,d){var s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},backout:function(x,t,b,c,d){var s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backinout:function(x,t,b,c,d){var s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;}});

/* jQuery UI Accordion 1.6 * Copyright (c) 2007 Jörn Zaefferer: http://docs.jquery.com/UI/Accordion * Revision: $Id: jquery.accordion.js 4876 2008-03-08 11:49:04Z joern.zaefferer $

 */
(function($){$.ui=$.ui||{};$.fn.extend({accordion:function(options,data){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof options=="string"){var accordion=$.data(this,"ui-accordion");accordion[options].apply(accordion,args);}else if(!$(this).is(".ui-accordion"))
$.data(this,"ui-accordion",new $.ui.accordion(this,options));});},activate:function(index){return this.accordion("activate",index);}});$.ui.accordion=function(container,options){this.options=options=$.extend({},$.ui.accordion.defaults,options);this.element=container;$(container).addClass("ui-accordion");if(options.navigation){var current=$(container).find("a").filter(options.navigationFilter);if(current.length){if(current.filter(options.header).length){options.active=current;}else{options.active=current.parent().parent().prev();current.addClass("current");}}}
options.headers=$(container).find(options.header);options.active=findActive(options.headers,options.active);if(options.fillSpace){var maxHeight=$(container).parent().height();options.headers.each(function(){maxHeight-=$(this).outerHeight();});var maxPadding=0;options.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height());}).height(maxHeight-maxPadding);}else if(options.autoheight){var maxHeight=0;options.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight());}).height(maxHeight);}
options.headers.not(options.active||"").next().hide();options.active.parent().andSelf().addClass(options.selectedClass);if(options.event)
$(container).bind((options.event)+".ui-accordion",clickHandler);};$.ui.accordion.prototype={activate:function(index){clickHandler.call(this.element,{target:findActive(this.options.headers,index)[0]});},enable:function(){this.options.disabled=false;},disable:function(){this.options.disabled=true;},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoheight){this.options.headers.next().css("height","");}
$.removeData(this.element,"ui-accordion");$(this.element).removeClass("ui-accordion").unbind(".ui-accordion");}}
function scopeCallback(callback,scope){return function(){return callback.apply(scope,arguments);};}
function completed(cancel){if(!$.data(this,"ui-accordion"))
return;var instance=$.data(this,"ui-accordion");var options=instance.options;options.running=cancel?0:--options.running;if(options.running)
return;if(options.clearStyle){options.toShow.add(options.toHide).css({height:"",overflow:""});}
$(this).triggerHandler("change.ui-accordion",[options.data],options.change);}
function toggle(toShow,toHide,data,clickedActive,down){var options=$.data(this,"ui-accordion").options;options.toShow=toShow;options.toHide=toHide;options.data=data;var complete=scopeCallback(completed,this);options.running=toHide.size()==0?toShow.size():toHide.size();if(options.animated){if(!options.alwaysOpen&&clickedActive){$.ui.accordion.animations[options.animated]({toShow:jQuery([]),toHide:toHide,complete:complete,down:down,autoheight:options.autoheight});}else{$.ui.accordion.animations[options.animated]({toShow:toShow,toHide:toHide,complete:complete,down:down,autoheight:options.autoheight});}}else{if(!options.alwaysOpen&&clickedActive){toShow.toggle();}else{toHide.hide();toShow.show();}
complete(true);}}
function clickHandler(event){var options=$.data(this,"ui-accordion").options;if(options.disabled)
return false;if(!event.target&&!options.alwaysOpen){options.active.parent().andSelf().toggleClass(options.selectedClass);var toHide=options.active.next(),data={instance:this,options:options,newHeader:jQuery([]),oldHeader:options.active,newContent:jQuery([]),oldContent:toHide},toShow=options.active=$([]);toggle.call(this,toShow,toHide,data);return false;}
var clicked=$(event.target);if(clicked.parents(options.header).length)
while(!clicked.is(options.header))
clicked=clicked.parent();var clickedActive=clicked[0]==options.active[0];if(options.running||(options.alwaysOpen&&clickedActive))
return false;if(!clicked.is(options.header))
return;options.active.parent().andSelf().toggleClass(options.selectedClass);if(!clickedActive){clicked.parent().andSelf().addClass(options.selectedClass);}
var toShow=clicked.next(),toHide=options.active.next(),data={instance:this,options:options,newHeader:clicked,oldHeader:options.active,newContent:toShow,oldContent:toHide},down=options.headers.index(options.active[0])>options.headers.index(clicked[0]);options.active=clickedActive?$([]):clicked;toggle.call(this,toShow,toHide,data,clickedActive,down);return false;};function findActive(headers,selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?$([]):headers.filter(":eq(0)");}
$.extend($.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:'slide',event:"click",header:"a",autoheight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return;}
var hideHeight=options.toHide.height(),showHeight=options.toShow.height(),difference=showHeight/hideHeight;options.toShow.css({height:0,overflow:'hidden'}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){var current=(hideHeight-now)*difference;if($.browser.msie||$.browser.opera){current=Math.ceil(current);}
options.toShow.height(current);},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoheight){options.toShow.css("height","auto");}
options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?1000:200});},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}});})(jQuery);
/*
 * 	Easy Slider 1.5 - jQuery plugin
 *	written by Alen Grakalic
 *	http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding
 *
 *	Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
 *	Dual licensed under the MIT (MIT-LICENSE.txt)
 *	and GPL (GPL-LICENSE.txt) licenses.
 *
 *	Built for jQuery library
 *	http://jquery.com
 *
 */

/*
 *	markup example for $("#slider").easySlider();
 *
 * 	<div id="slider">
 *		<ul>
 *			<li><img src="images/01.jpg" alt="" /></li>
 *			<li><img src="images/02.jpg" alt="" /></li>
 *			<li><img src="images/03.jpg" alt="" /></li>
 *			<li><img src="images/04.jpg" alt="" /></li>
 *			<li><img src="images/05.jpg" alt="" /></li>
 *		</ul>
 *	</div>
 *
 */

(function($) {

	$.fn.easySlider = function(options){

		// default configuration properties
		var defaults = {
			prevId: 		'prevBtn',
			prevText: 		'Previous',
			nextId: 		'nextBtn',
			nextText: 		'Next',
			controlsShow:	true,
			controlsBefore:	'',
			controlsAfter:	'',
			controlsFade:	true,
			firstId: 		'firstBtn',
			firstText: 		'First',
			firstShow:		false,
			lastId: 		'lastBtn',
			lastText: 		'Last',
			lastShow:		false,
			vertical:		false,
			speed: 			800,
			auto:			true,
			pause:			2000,
			continuous:		false
		};

		var options = $.extend(defaults, options);

		this.each(function() {
			var obj = $(this);
			var s = $("li", obj).length;
			var w = $("li", obj).width();
			var h = $("li", obj).height();
			obj.width(w);
			obj.height(h);
			obj.css("overflow","hidden");
			var ts = s-1;
			var t = 0;
			$("ul", obj).css('width',s*w);
			if(!options.vertical) $("li", obj).css('float','left');

			if(options.controlsShow){
				var html = options.controlsBefore;
				if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
				html += ' <span id="'+ options.prevId +'"><a href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';
				html += ' <span id="'+ options.nextId +'"><a href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';
				if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';
				html += options.controlsAfter;
				$(obj).after(html);
			};

			$("a","#"+options.nextId).click(function(){
				animate("next",true);
			});
			$("a","#"+options.prevId).click(function(){
				animate("prev",true);
			});
			$("a","#"+options.firstId).click(function(){
				animate("first",true);
			});
			$("a","#"+options.lastId).click(function(){
				animate("last",true);
			});
                        
                        $(".latestItems").hover(
                          function () {
                            //$(".latestItems ul")..stop();
                            /*animate("prev",false);
                            animate("next",false);
                            animate("last",false);
                            animate("first",false);*/

                          },
                          function () {
                            //$(".latestItems ul").animate().start();
                          }
                         );

			function animate(dir,clicked){
				var ot = t;
				switch(dir){
					case "next":
						t = (ot>=ts) ? (options.continuous ? 0 : ts) : t+1;
						break;
					case "prev":
						t = (t<=0) ? (options.continuous ? ts : 0) : t-1;
						break;
					case "first":
						t = 0;
						break;
					case "last":
						t = ts;
						break;
					default:
						break;
				};

				var diff = Math.abs(ot-t);
				var speed = diff*options.speed;
				if(!options.vertical) {
					p = (t*w*-1);
					$("ul",obj).animate(
						{ marginLeft: p },
						speed
					);
				} else {
					p = (t*h*-1);
					$("ul",obj).animate(
						{ marginTop: p },
						speed
					);
				};

				if(!options.continuous && options.controlsFade){
					if(t==ts){
						$("a","#"+options.nextId).hide();
						$("a","#"+options.lastId).hide();
					} else {
						$("a","#"+options.nextId).show();
						$("a","#"+options.lastId).show();
					};
					if(t==0){
						$("a","#"+options.prevId).hide();
						$("a","#"+options.firstId).hide();
					} else {
						$("a","#"+options.prevId).show();
						$("a","#"+options.firstId).show();
					};
				};

				if(clicked) clearTimeout(timeout);
				if(options.auto && dir=="next" && !clicked){;
					timeout = setTimeout(function(){
						animate("next",false);
					},diff*options.speed+options.pause);
				};

			};



                        
                             
			// init
			var timeout;
			if(options.auto){;
				timeout = setTimeout(function(){
					animate("next",false);
				},options.pause);
			};

			if(!options.continuous && options.controlsFade){
				$("a","#"+options.prevId).hide();
				$("a","#"+options.firstId).hide();
			};



		});
// returns the jQuery object to allow for chainability.
         return this;
	}
        


})(jQuery);


/**
 * Flash (http://jquery.lukelutman.com/plugins/flash)
 * A jQuery plugin for embedding Flash movies.
 *
 * Version 1.0
 * November 9th, 2006
 *
 * Copyright (c) 2006 Luke Lutman (http://www.lukelutman.com)
 * Dual licensed under the MIT and GPL licenses.
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.opensource.org/licenses/gpl-license.php
 *
 * Inspired by:
 * SWFObject (http://blog.deconcept.com/swfobject/)
 * UFO (http://www.bobbyvandersluis.com/ufo/)
 * sIFR (http://www.mikeindustries.com/sifr/)
 *
 * IMPORTANT:
 * The packed version of jQuery breaks ActiveX control
 * activation in Internet Explorer. Use JSMin to minifiy
 * jQuery (see: http://jquery.lukelutman.com/plugins/flash#activex).
 *
 **/
;(function(){

var $$;

/**
 *
 * @desc Replace matching elements with a flash movie.
 * @author Luke Lutman
 * @version 1.0.1
 *
 * @name flash
 * @param Hash htmlOptions Options for the embed/object tag.
 * @param Hash pluginOptions Options for detecting/updating the Flash plugin (optional).
 * @param Function replace Custom block called for each matched element if flash is installed (optional).
 * @param Function update Custom block called for each matched if flash isn't installed (optional).
 * @type jQuery
 *
 * @cat plugins/flash
 *
 * @example $('#hello').flash({ src: 'hello.swf' });
 * @desc Embed a Flash movie.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { version: 8 });
 * @desc Embed a Flash 8 movie.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { expressInstall: true });
 * @desc Embed a Flash movie using Express Install if flash isn't installed.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { update: false });
 * @desc Embed a Flash movie, don't show an update message if Flash isn't installed.
 *
**/
$$ = jQuery.fn.flash = function(htmlOptions, pluginOptions, replace, update) {

	// Set the default block.
	var block = replace || $$.replace;

	// Merge the default and passed plugin options.
	pluginOptions = $$.copy($$.pluginOptions, pluginOptions);

	// Detect Flash.
	if(!$$.hasFlash(pluginOptions.version)) {
		// Use Express Install (if specified and Flash plugin 6,0,65 or higher is installed).
		if(pluginOptions.expressInstall && $$.hasFlash(6,0,65)) {
			// Add the necessary flashvars (merged later).
			var expressInstallOptions = {
				flashvars: {
					MMredirectURL: location,
					MMplayerType: 'PlugIn',
					MMdoctitle: jQuery('title').text()
				}
			};
		// Ask the user to update (if specified).
		} else if (pluginOptions.update) {
			// Change the block to insert the update message instead of the flash movie.
			block = update || $$.update;
		// Fail
		} else {
			// The required version of flash isn't installed.
			// Express Install is turned off, or flash 6,0,65 isn't installed.
			// Update is turned off.
			// Return without doing anything.
			return this;
		}
	}

	// Merge the default, express install and passed html options.
	htmlOptions = $$.copy($$.htmlOptions, expressInstallOptions, htmlOptions);

	// Invoke $block (with a copy of the merged html options) for each element.
	return this.each(function(){
		block.call(this, $$.copy(htmlOptions));
	});

};
/**
 *
 * @name flash.copy
 * @desc Copy an arbitrary number of objects into a new object.
 * @type Object
 *
 * @example $$.copy({ foo: 1 }, { bar: 2 });
 * @result { foo: 1, bar: 2 };
 *
**/
$$.copy = function() {
	var options = {}, flashvars = {};
	for(var i = 0; i < arguments.length; i++) {
		var arg = arguments[i];
		if(arg == undefined) continue;
		jQuery.extend(options, arg);
		// don't clobber one flash vars object with another
		// merge them instead
		if(arg.flashvars == undefined) continue;
		jQuery.extend(flashvars, arg.flashvars);
	}
	options.flashvars = flashvars;
	return options;
};
/*
 * @name flash.hasFlash
 * @desc Check if a specific version of the Flash plugin is installed
 * @type Boolean
 *
**/
$$.hasFlash = function() {
	// look for a flag in the query string to bypass flash detection
	if(/hasFlash\=true/.test(location)) return true;
	if(/hasFlash\=false/.test(location)) return false;
	var pv = $$.hasFlash.playerVersion().match(/\d+/g);
	var rv = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) || String($$.pluginOptions.version).match(/\d+/g);
	for(var i = 0; i < 3; i++) {
		pv[i] = parseInt(pv[i] || 0);
		rv[i] = parseInt(rv[i] || 0);
		// player is less than required
		if(pv[i] < rv[i]) return false;
		// player is greater than required
		if(pv[i] > rv[i]) return true;
	}
	// major version, minor version and revision match exactly
	return true;
};
/**
 *
 * @name flash.hasFlash.playerVersion
 * @desc Get the version of the installed Flash plugin.
 * @type String
 *
**/
$$.hasFlash.playerVersion = function() {
	// ie
	try {
		try {
			// avoid fp6 minor version lookup issues
			// see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
			var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
			try { axo.AllowScriptAccess = 'always';	}
			catch(e) { return '6,0,0'; }
		} catch(e) {}
		return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
	// other browsers
	} catch(e) {
		try {
			if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
				return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
			}
		} catch(e) {}
	}
	return '0,0,0';
};
/**
 *
 * @name flash.htmlOptions
 * @desc The default set of options for the object or embed tag.
 *
**/
$$.htmlOptions = {
	height: 240,
	flashvars: {},
	pluginspage: 'http://www.adobe.com/go/getflashplayer',
	src: '#',
	type: 'application/x-shockwave-flash',
	width: 320
};
/**
 *
 * @name flash.pluginOptions
 * @desc The default set of options for checking/updating the flash Plugin.
 *
**/
$$.pluginOptions = {
	expressInstall: false,
	update: true,
	version: '6.0.65'
};
/**
 *
 * @name flash.replace
 * @desc The default method for replacing an element with a Flash movie.
 *
**/
$$.replace = function(htmlOptions) {
	this.innerHTML = '<div class="alt">'+this.innerHTML+'</div>';
	jQuery(this)
		.addClass('flash-replaced')
		.prepend($$.transform(htmlOptions));
};
/**
 *
 * @name flash.update
 * @desc The default method for replacing an element with an update message.
 *
**/
$$.update = function(htmlOptions) {
	var url = String(location).split('?');
	url.splice(1,0,'?hasFlash=true&');
	url = url.join('');
	var msg = '<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';
	this.innerHTML = '<span class="alt">'+this.innerHTML+'</span>';
	jQuery(this)
		.addClass('flash-update')
		.prepend(msg);
};
/**
 *
 * @desc Convert a hash of html options to a string of attributes, using Function.apply().
 * @example toAttributeString.apply(htmlOptions)
 * @result foo="bar" foo="bar"
 *
**/
function toAttributeString() {
	var s = '';
	for(var key in this)
		if(typeof this[key] != 'function')
			s += key+'="'+this[key]+'" ';
	return s;
};
/**
 *
 * @desc Convert a hash of flashvars to a url-encoded string, using Function.apply().
 * @example toFlashvarsString.apply(flashvarsObject)
 * @result foo=bar&foo=bar
 *
**/
function toFlashvarsString() {
	var s = '';
	for(var key in this)
		if(typeof this[key] != 'function')
			s += key+'='+encodeURIComponent(this[key])+'&';
	return s.replace(/&$/, '');
};
/**
 *
 * @name flash.transform
 * @desc Transform a set of html options into an embed tag.
 * @type String
 *
 * @example $$.transform(htmlOptions)
 * @result <embed src="foo.swf" ... />
 *
 * Note: The embed tag is NOT standards-compliant, but it
 * works in all current browsers. flash.transform can be
 * overwritten with a custom function to generate more
 * standards-compliant markup.
 *
**/
$$.transform = function(htmlOptions) {
	htmlOptions.toString = toAttributeString;
	if(htmlOptions.flashvars) htmlOptions.flashvars.toString = toFlashvarsString;
	return '<embed ' + String(htmlOptions) + '/>';
};

/**
 *
 * Flash Player 9 Fix (http://blog.deconcept.com/2006/07/28/swfobject-143-released/)
 *
**/
if (window.attachEvent) {
	window.attachEvent("onbeforeunload", function(){
		__flash_unloadHandler = function() {};
		__flash_savedUnloadHandler = function() {};
	});
}

})();
/* 
 * flowplayer.js 3.1.1. The Flowplayer API
 * 
 * Copyright 2009 Flowplayer Oy
 * 
 * This file is part of Flowplayer.
 * 
 * Flowplayer 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 3 of the License, or
 * (at your option) any later version.
 * 
 * Flowplayer 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 Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Date: 2009-02-25 16:24:29 -0500 (Wed, 25 Feb 2009)
 * Revision: 166 
 */
(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.substring(0,q)||"*";var o=s.substring(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).substring(2,10)}var h=function(t,r,s){var q=this;var p={};var u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.substring(0,v.length-1);var w="onBefore"+v.substring(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(v=="onStart"||v=="onUpdate"||v=="onResume"){i(A,y);if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var s={};var o=this;var u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var y=q._api().fp_getPlugin(p);if(!y){return}i(o,y);delete o.methods;if(!u){m(y.methods,function(){var A=""+this;o[A]=function(){var B=[].slice.call(arguments);var C=q._api().fp_invoke(p,A,B);return C=="undefined"?o:C}});u=true}}var z=s[w];if(z){z.apply(o,v);if(w.substring(0,1)=="_"){delete s[w]}}}})};function b(o,t,z){var E=this,y=null,x,u,p=[],s={},B={},r,v,w,D,A,q;i(E,{id:function(){return r},isLoaded:function(){return(y!==null)},getParent:function(){return o},hide:function(F){if(F){o.style.height="0px"}if(y){y.style.height="0px"}return E},show:function(){o.style.height=q+"px";if(y){y.style.height=A+"px"}return E},isHidden:function(){return y&&parseInt(y.style.height,10)===0},load:function(F){if(!y&&E._fireEvent("onBeforeLoad")!==false){m(a,function(){this.unload()});x=o.innerHTML;if(x&&!flashembed.isSupported(t.version)){o.innerHTML=""}flashembed(o,t,{config:z});if(F){F.cached=true;j(B,"onLoad",F)}}return E},unload:function(){try{if(!y||y.fp_isFullscreen()){return E}}catch(F){return E}if(x.replace(/\s/g,"")!==""){if(E._fireEvent("onBeforeUnload")===false){return E}y.fp_close();y=null;o.innerHTML=x;E._fireEvent("onUnload")}return E},getClip:function(F){if(F===undefined){F=D}return p[F]},getCommonClip:function(){return u},getPlaylist:function(){return p},getPlugin:function(F){var H=s[F];if(!H&&E.isLoaded()){var G=E._api().fp_getPlugin(F);if(G){H=new l(F,G,E);s[F]=H}}return H},getScreen:function(){return E.getPlugin("screen")},getControls:function(){return E.getPlugin("controls")},getConfig:function(F){return F?k(z):z},getFlashParams:function(){return t},loadPlugin:function(I,H,K,J){if(typeof K=="function"){J=K;K={}}var G=J?e():"_";E._api().fp_loadPlugin(I,H,K,G);var F={};F[G]=J;var L=new l(I,null,E,F);s[I]=L;return L},getState:function(){return y?y.fp_getState():-1},play:function(G,F){function H(){if(G!==undefined){E._api().fp_play(G,F)}else{E._api().fp_play()}}if(y){H()}else{E.load(function(){H()})}return E},getVersion:function(){var G="flowplayer.js 3.1.1";if(y){var F=y.fp_getVersion();F.push(G);return F}return G},_api:function(){if(!y){throw"Flowplayer "+E.id()+" not loaded when calling an API method"}return y},setClip:function(F){E.setPlaylist([F]);return E},getIndex:function(){return w}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error").split(","),function(){var F="on"+this;if(F.indexOf("*")!=-1){F=F.substring(0,F.length-1);var G="onBefore"+F.substring(2);E[G]=function(H){j(B,G,H);return E}}E[F]=function(H){j(B,F,H);return E}});m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip").split(","),function(){var F=this;E[F]=function(H,G){if(!y){return E}var I=null;if(H!==undefined&&G!==undefined){I=y["fp_"+F](H,G)}else{I=(H===undefined)?y["fp_"+F]():y["fp_"+F](H)}return I=="undefined"?E:I}});E._fireEvent=function(O){if(typeof O=="string"){O=[O]}var P=O[0],M=O[1],K=O[2],J=O[3],I=0;if(z.debug){g(O)}if(!y&&P=="onLoad"&&M=="player"){y=y||c(v);A=y.clientHeight;m(p,function(){this._fireEvent("onLoad")});m(s,function(Q,R){R._fireEvent("onUpdate")});u._fireEvent("onLoad")}if(P=="onLoad"&&M!="player"){return}if(P=="onError"){if(typeof M=="string"||(typeof M=="number"&&typeof K=="number")){M=K;K=J}}if(P=="onContextMenu"){m(z.contextMenu[M],function(Q,R){R.call(E)});return}if(P=="onPluginEvent"){var F=M.name||M;var G=s[F];if(G){G._fireEvent("onUpdate",M);G._fireEvent(K,O.slice(3))}return}if(P=="onPlaylistReplace"){p=[];var L=0;m(M,function(){p.push(new h(this,L++,E))})}if(P=="onClipAdd"){if(M.isInStream){return}M=new h(M,K,E);p.splice(K,0,M);for(I=K+1;I<p.length;I++){p[I].index++}}var N=true;if(typeof M=="number"&&M<p.length){D=M;var H=p[M];if(H){N=H._fireEvent(P,K,J)}if(!H||N!==false){N=u._fireEvent(P,K,J,H)}}m(B[P],function(){N=this.call(E,M,K);if(this.cached){B[P].splice(I,1)}if(N===false){return false}I++});return N};function C(){if($f(o)){$f(o).getParent().innerHTML="";w=$f(o).getIndex();a[w]=E}else{a.push(E);w=a.length-1}q=parseInt(o.style.height,10)||o.clientHeight;if(typeof t=="string"){t={src:t}}r=o.id||"fp"+e();v=t.id||r+"_api";t.id=v;z.playerId=r;if(typeof z=="string"){z={clip:{url:z}}}if(typeof z.clip=="string"){z.clip={url:z.clip}}z.clip=z.clip||{};if(o.getAttribute("href",2)&&!z.clip.url){z.clip.url=o.getAttribute("href",2)}u=new h(z.clip,-1,E);z.playlist=z.playlist||[z.clip];var F=0;m(z.playlist,function(){var H=this;if(typeof H=="object"&&H.length){H={url:""+H}}m(z.clip,function(I,J){if(J!==undefined&&H[I]===undefined&&typeof J!="function"){H[I]=J}});z.playlist[F]=H;H=new h(H,F,E);p.push(H);F++});m(z,function(H,I){if(typeof I=="function"){j(B,H,I);delete z[H]}});m(z.plugins,function(H,I){if(I){s[H]=new l(H,I,E)}});if(!z.plugins||z.plugins.controls===undefined){s.controls=new l("controls",null,E)}s.canvas=new l("canvas",null,E);t.bgcolor=t.bgcolor||"#000000";t.version=t.version||[9,0];t.expressInstall="http://www.flowplayer.org/swf/expressinstall.swf";function G(H){if(!E.isLoaded()&&E._fireEvent("onBeforeClick")!==false){E.load()}return f(H)}x=o.innerHTML;if(x.replace(/\s/g,"")!==""){if(o.addEventListener){o.addEventListener("click",G,false)}else{if(o.attachEvent){o.attachEvent("onclick",G)}}}else{if(o.addEventListener){o.addEventListener("click",f,false)}E.load()}}if(typeof o=="string"){flashembed.domReady(function(){var F=c(o);if(!F){throw"Flowplayer cannot access element: "+o}else{o=F;C()}})}else{C()}}var a=[];function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var r=arguments[1];var q=(arguments.length==3)?arguments[2]:{};if(typeof o=="string"){if(o.indexOf(".")!=-1){var t=[];m(n(o),function(){t.push(new b(this,k(r),k(q)))});return new d(t)}else{var s=c(o);return new b(s!==null?s:o,r,q)}}else{if(o){return new b(o,r,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.prototype.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var e=typeof jQuery=="function";function i(){if(c.done){return false}var k=document;if(k&&k.getElementsByTagName&&k.getElementById&&k.body){clearInterval(c.timer);c.timer=null;for(var j=0;j<c.ready.length;j++){c.ready[j].call()}c.ready=null;c.done=true}}var c=e?jQuery:function(j){if(c.done){return j()}if(c.timer){c.ready.push(j)}else{c.ready=[j];c.timer=setInterval(i,13)}};function f(k,j){if(j){for(key in j){if(j.hasOwnProperty(key)){k[key]=j[key]}}}return k}function g(j){switch(h(j)){case"string":j=j.replace(new RegExp('(["\\\\])',"g"),"\\$1");j=j.replace(/^\s?(\d+)%/,"$1pct");return'"'+j+'"';case"array":return"["+b(j,function(m){return g(m)}).join(",")+"]";case"function":return'"function()"';case"object":var k=[];for(var l in j){if(j.hasOwnProperty(l)){k.push('"'+l+'":'+g(j[l]))}}return"{"+k.join(",")+"}"}return String(j).replace(/\s/g," ").replace(/\'/g,'"')}function h(k){if(k===null||k===undefined){return false}var j=typeof k;return(j=="object"&&k.push)?"array":j}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function b(j,m){var l=[];for(var k in j){if(j.hasOwnProperty(k)){l[k]=m(j[k])}}return l}function a(q,s){var o=f({},q);var r=document.all;var m='<object width="'+o.width+'" height="'+o.height+'"';if(r&&!o.id){o.id="_"+(""+Math.random()).substring(9)}if(o.id){m+=' id="'+o.id+'"'}o.src+=((o.src.indexOf("?")!=-1?"&":"?")+Math.random());if(o.w3c||!r){m+=' data="'+o.src+'" type="application/x-shockwave-flash"'}else{m+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}m+=">";if(o.w3c||r){m+='<param name="movie" value="'+o.src+'" />'}o.width=o.height=o.id=o.w3c=o.src=null;for(var j in o){if(o[j]!==null){m+='<param name="'+j+'" value="'+o[j]+'" />'}}var n="";if(s){for(var l in s){if(s[l]!==null){n+=l+"="+(typeof s[l]=="object"?g(s[l]):s[l])+"&"}}n=n.substring(0,n.length-1);m+='<param name="flashvars" value=\''+n+"' />"}m+="</object>";return m}function d(l,o,k){var j=flashembed.getVersion();f(this,{getContainer:function(){return l},getConf:function(){return o},getVersion:function(){return j},getFlashvars:function(){return k},getApi:function(){return l.firstChild},getHTML:function(){return a(o,k)}});var p=o.version;var q=o.expressInstall;var n=!p||flashembed.isSupported(p);if(n){o.onFail=o.version=o.expressInstall=null;l.innerHTML=a(o,k)}else{if(p&&q&&flashembed.isSupported([6,65])){f(o,{src:q});k={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};l.innerHTML=a(o,k)}else{if(l.innerHTML.replace(/\s/g,"")!==""){}else{l.innerHTML="<h2>Flash version "+p+" or greater is required</h2><h3>"+(j[0]>0?"Your version is "+j:"You have no flash plugin installed")+"</h3>"+(l.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(l.tagName=="A"){l.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!n&&o.onFail){var m=o.onFail.call(this);if(typeof m=="string"){l.innerHTML=m}}if(document.all){window[o.id]=document.getElementById(o.id)}}window.flashembed=function(k,l,j){if(typeof k=="string"){var m=document.getElementById(k);if(m){k=m}else{c(function(){flashembed(k,l,j)});return}}if(!k){return}var n={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false};if(typeof l=="string"){l={src:l}}f(n,l);return new d(k,n,j)};f(window.flashembed,{getVersion:function(){var l=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var k=navigator.plugins["Shockwave Flash"].description;if(typeof k!="undefined"){k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var m=parseInt(k.replace(/^(.*)\..*$/,"$1"),10);var q=/r/.test(k)?parseInt(k.replace(/^.*r(.*)$/,"$1"),10):0;l=[m,q]}}else{if(window.ActiveXObject){try{var o=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(p){try{o=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");l=[6,0];o.AllowScriptAccess="always"}catch(j){if(l[0]==6){return}}try{o=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(n){}}if(typeof o=="object"){k=o.GetVariable("$version");if(typeof k!="undefined"){k=k.replace(/^\S+\s+(.*)$/,"$1").split(",");l=[parseInt(k[0],10),parseInt(k[2],10)]}}}}return l},isSupported:function(j){var l=flashembed.getVersion();var k=(l[0]>j[0])||(l[0]==j[0]&&l[1]>=j[1]);return k},domReady:c,asString:g,getHTML:a});if(e){jQuery.tools=jQuery.tools||{version:{}};jQuery.tools.version.flashembed="1.0.2";jQuery.fn.flashembed=function(k,j){var l=null;this.each(function(){l=flashembed(this,k,j)});return k.api===false?this:l}}})();
/*
* flowplayer.playlist 3.0.6. Flowplayer JavaScript plugin.
* 
* This file is part of Flowplayer, http://flowplayer.org
*
* Author: Tero Piirainen, <info@flowplayer.org>
* Copyright (c) 2008 Flowplayer Ltd
*
* Dual licensed under MIT and GPL 2+ licenses
* SEE: http://www.opensource.org/licenses
* 
* Date: 2009-02-16 06:51:28 -0500 (Mon, 16 Feb 2009)
* Revision: 1454 
*/
(function(a) { $f.addPlugin("playlist", function(d, o) { var n = this; var b = { playingClass: "playing", pausedClass: "paused", progressClass: "progress", template: '<a href="${url}">${title}</a>', loop: false, playOnClick: true, manual: false }; a.extend(b, o); d = a(d); var j = n.getPlaylist().length <= 1 || b.manual; var k = null; function e(q) { var p = m; a.each(q, function(r, s) { if (!a.isFunction(s)) { p = p.replace("${" + r + "}", s).replace("$%7B" + r + "%7D", s) } }); return p } function i() { k = d.children().unbind("click.playlist").bind("click.playlist", function() { return h(a(this), k.index(this)) }) } function c() { d.empty(); a.each(n.getPlaylist(), function() { d.append(e(this)) }); i() } function h(p, q) { if (p.hasClass(b.playingClass) || p.hasClass(b.pausedClass)) { n.toggle() } else { p.addClass(b.progressClass); n.play(q) } return false } function l() { if (j) { k = d.children() } k.removeClass(b.playingClass); k.removeClass(b.pausedClass); k.removeClass(b.progressClass) } function f(p) { return (j) ? k.filter("[href=" + p.url + "]") : k.eq(p.index) } if (!j) { var m = d.is(":empty") ? b.template : d.html(); c() } else { k = d.children(); if (a.isFunction(k.live)) { a(d.selector + "> *").live("click", function() { var p = a(this); return h(p, p.attr("href")) }) } else { k.click(function() { var p = a(this); return h(p, p.attr("href")) }) } var g = n.getClip(0); if (!g.url && b.playOnClick) { g.update({ url: k.eq(0).attr("href") }) } } n.onBegin(function(p) { l(); f(p).addClass(b.playingClass) }); n.onPause(function(p) { f(p).removeClass(b.playingClass).addClass(b.pausedClass) }); n.onResume(function(p) { f(p).removeClass(b.pausedClass).addClass(b.playingClass) }); if (!b.loop && !j) { n.onBeforeFinish(function(p) { if (!p.isInStream && p.index < k.length - 1) { return false } }) } if (j && b.loop) { n.onBeforeFinish(function(q) { var p = f(q); if (p.next().length) { p.next().click() } else { k.eq(0).click() } return false }) } n.onUnload(function() { l() }); if (!j) { n.onPlaylistReplace(function() { c() }) } n.onClipAdd(function(q, p) { k.eq(p).before(e(q)); i() }); return n }) })(jQuery);
/*
 * Copyright (c) 2009 Simo Kinnunen.
 * Licensed under the MIT license.
 */
var Cufon=(function(){var api=function(){return api.replace.apply(null,arguments);};var DOM=api.DOM={ready:(function(){var complete=false,readyStatus={loaded: 1,complete: 1};var queue=[],perform=function(){if(complete)return;complete=true;for(var fn;fn=queue.shift();fn());};if(document.addEventListener){document.addEventListener('DOMContentLoaded',perform,false);window.addEventListener('pageshow',perform,false);}if(!window.opera&&document.readyState)(function(){readyStatus[document.readyState]?perform(): setTimeout(arguments.callee,10);})();if(document.readyState&&document.createStyleSheet)(function(){try{document.body.doScroll('left');perform();}catch(e){setTimeout(arguments.callee,1);}})();addEvent(window,'load',perform);return function(listener){if(!arguments.length)perform();else complete?listener(): queue.push(listener);};})()};var CSS=api.CSS={Size: function(value,base){this.value=parseFloat(value);this.unit=String(value).match(/[a-z%]*$/)[0]||'px';this.convert=function(value){return value/base*this.value;};this.convertFrom=function(value){return value/this.value*base;};this.toString=function(){return this.value+this.unit;};},getStyle: function(el){var view=document.defaultView;if(view&&view.getComputedStyle)return new Style(view.getComputedStyle(el,null));if(el.currentStyle)return new Style(el.currentStyle);return new Style(el.style);},ready:(function(){var complete=false;var queue=[],perform=function(){complete=true;for(var fn;fn=queue.shift();fn());};var styleElements=Object.prototype.propertyIsEnumerable?elementsByTagName('style'):{length: 0};var linkElements=elementsByTagName('link');DOM.ready(function(){var linkStyles=0,link;for(var i=0,l=linkElements.length;link=linkElements[i],i<l;++i){if(!link.disabled&&link.rel.toLowerCase()=='stylesheet')++linkStyles;}if(document.styleSheets.length>=styleElements.length+linkStyles)perform();else setTimeout(arguments.callee,10);});return function(listener){if(complete)listener();else queue.push(listener);};})(),supports: function(property,value){var checker=document.createElement('span').style;if(checker[property]===undefined)return false;checker[property]=value;return checker[property]===value;},textAlign: function(word,style,position,wordCount){if(style.get('textAlign')=='right'){if(position>0)word=' '+word;}else if(position<wordCount-1)word+=' ';return word;},textDecoration: function(el,style){if(!style)style=this.getStyle(el);var types={underline: null,overline: null,'line-through': null};for(var search=el;search.parentNode&&search.parentNode.nodeType==1;){var foundAll=true;for(var type in types){if(types[type])continue;if(style.get('textDecoration').indexOf(type)!=-1)types[type]=style.get('color');foundAll=false;}if(foundAll)break;style=this.getStyle(search=search.parentNode);}return types;},textShadow: cached(function(value){if(value=='none')return null;var shadows=[],currentShadow={},result,offCount=0;var re=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(result=re.exec(value)){if(result[0]==','){shadows.push(currentShadow);currentShadow={},offCount=0;}else if(result[1]){currentShadow.color=result[1];}else{currentShadow[['offX','offY','blur'][offCount++]]=result[2];}}shadows.push(currentShadow);return shadows;}),color: cached(function(value){var parsed={};parsed.color=value.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function($0,$1,$2){parsed.opacity=parseFloat($2);return 'rgb('+$1+')';});return parsed;}),textTransform: function(text,style){return text[{uppercase: 'toUpperCase',lowercase: 'toLowerCase'}[style.get('textTransform')]||'toString']();}};function Font(data){var face=this.face=data.face;this.glyphs=data.glyphs;this.w=data.w;this.baseSize=parseInt(face['units-per-em'],10);this.family=face['font-family'].toLowerCase();this.weight=face['font-weight'];this.style=face['font-style']||'normal';this.viewBox=(function(){var parts=face.bbox.split(/\s+/);var box={minX: parseInt(parts[0],10),minY: parseInt(parts[1],10),maxX: parseInt(parts[2],10),maxY: parseInt(parts[3],10)};box.width=box.maxX-box.minX,box.height=box.maxY-box.minY;box.toString=function(){return[this.minX,this.minY,this.width,this.height].join(' ');};return box;})();this.ascent=-parseInt(face.ascent,10);this.descent=-parseInt(face.descent,10);this.height=-this.ascent+this.descent;}function FontFamily(){var styles={},mapping={oblique: 'italic',italic: 'oblique'};this.add=function(font){(styles[font.style]||(styles[font.style]={}))[font.weight]=font;};this.get=function(style,weight){var weights=styles[style]||styles[mapping[style]]||styles.normal||styles.italic||styles.oblique;if(!weights)return null;weight={normal: 400,bold: 700}[weight]||parseInt(weight,10);if(weights[weight])return weights[weight];var up={1: 1,99: 0}[weight%100],alts=[],min,max;if(up===undefined)up=weight>400;if(weight==500)weight=400;for(var alt in weights){alt=parseInt(alt,10);if(!min||alt<min)min=alt;if(!max||alt>max)max=alt;alts.push(alt);}if(weight<min)weight=min;if(weight>max)weight=max;alts.sort(function(a,b){return(up?(a>weight&&b>weight)?a<b : a>b :(a<weight&&b<weight)?a>b : a<b)?-1 : 1;});return weights[alts[0]];};}function HoverHandler(){function contains(node,anotherNode){if(node.contains)return node.contains(anotherNode);return node.compareDocumentPosition(anotherNode)&16;}function onOverOut(e){var related=e.relatedTarget;if(!related||contains(this,related))return;trigger(this);}function onEnterLeave(e){trigger(this);}function trigger(el){setTimeout(function(){api.replace(el,sharedStorage.get(el).options,true);},10);}this.attach=function(el){if(el.onmouseenter===undefined){addEvent(el,'mouseover',onOverOut);addEvent(el,'mouseout',onOverOut);}else{addEvent(el,'mouseenter',onEnterLeave);addEvent(el,'mouseleave',onEnterLeave);}};}function Storage(){var map={},at=0;function identify(el){return el.cufid||(el.cufid=++at);}this.get=function(el){var id=identify(el);return map[id]||(map[id]={});};}function Style(style){var custom={},sizes={};this.get=function(property){return custom[property]!=undefined?custom[property]: style[property];};this.getSize=function(property,base){return sizes[property]||(sizes[property]=new CSS.Size(this.get(property),base));};this.extend=function(styles){for(var property in styles)custom[property]=styles[property];return this;};}function addEvent(el,type,listener){if(el.addEventListener){el.addEventListener(type,listener,false);}else if(el.attachEvent){el.attachEvent('on'+type,function(){return listener.call(el,window.event);});}}function attach(el,options){var storage=sharedStorage.get(el);if(storage.options)return el;if(options.hover&&options.hoverables[el.nodeName.toLowerCase()]){hoverHandler.attach(el);}storage.options=options;return el;}function cached(fun){var cache={};return function(key){if(!cache.hasOwnProperty(key))cache[key]=fun.apply(null,arguments);return cache[key];};}function getFont(el,style){if(!style)style=CSS.getStyle(el);var families=style.get('fontFamily').split(/\s*,\s*/),family;for(var i=0,l=families.length;i<l;++i){family=families[i].replace(/^(["'])(.*?)\1$/,'$2').toLowerCase();if(fonts[family])return fonts[family].get(style.get('fontStyle'),style.get('fontWeight'));}return null;}function elementsByTagName(query){return document.getElementsByTagName(query);}function merge(){var merged={},key;for(var i=0,l=arguments.length;i<l;++i){for(key in arguments[i])merged[key]=arguments[i][key];}return merged;}function process(font,text,style,options,node,el){var separate=options.separate;if(separate=='none')return engines[options.engine].apply(null,arguments);var fragment=document.createDocumentFragment(),processed;var parts=text.split(separators[separate]),needsAligning=(separate=='words');if(needsAligning&&HAS_BROKEN_REGEXP){if(/^\s/.test(text))parts.unshift('');if(/\s$/.test(text))parts.push('');}for(var i=0,l=parts.length;i<l;++i){processed=engines[options.engine](font,needsAligning?CSS.textAlign(parts[i],style,i,l): parts[i],style,options,node,el,i<l-1);if(processed)fragment.appendChild(processed);}return fragment;}function replaceElement(el,options){var font,style,nextNode,redraw;for(var node=attach(el,options).firstChild;node;node=nextNode){nextNode=node.nextSibling;redraw=false;if(node.nodeType==1){if(!node.firstChild)continue;if(!/cufon/.test(node.className)){arguments.callee(node,options);continue;}else redraw=true;}if(!style)style=CSS.getStyle(el).extend(options);if(!font)font=getFont(el,style);if(!font)continue;if(redraw){engines[options.engine](font,null,style,options,node,el);continue;}var text=node.data;if(text==='')continue;var processed=process(font,text,style,options,node,el);if(processed)node.parentNode.replaceChild(processed,node);else node.parentNode.removeChild(node);}}var HAS_BROKEN_REGEXP=' '.split(/\s+/).length==0;var sharedStorage=new Storage();var hoverHandler=new HoverHandler();var replaceHistory=[];var engines={},fonts={},defaultOptions={enableTextDecoration: false,engine: null,hover: false,hoverables:{a: true},printable: true,selector:(window.Sizzle||window.jQuery||(window.dojo&&dojo.query)||(window.$$&&function(query){return $$(query);})||(window.$&&function(query){return $(query);})||(document.querySelectorAll&&function(query){return document.querySelectorAll(query);})||elementsByTagName),separate: 'words',textShadow: 'none'};var separators={words:/\s+/,characters: ''};api.now=function(){DOM.ready();return api;};api.refresh=function(){var currentHistory=replaceHistory.splice(0,replaceHistory.length);for(var i=0,l=currentHistory.length;i<l;++i){api.replace.apply(null,currentHistory[i]);}return api;};api.registerEngine=function(id,engine){if(!engine)return api;engines[id]=engine;return api.set('engine',id);};api.registerFont=function(data){var font=new Font(data),family=font.family;if(!fonts[family])fonts[family]=new FontFamily();fonts[family].add(font);return api.set('fontFamily',family);};api.replace=function(elements,options,ignoreHistory){options=merge(defaultOptions,options);if(!options.engine)return api;if(typeof options.textShadow=='string')options.textShadow=CSS.textShadow(options.textShadow);if(!ignoreHistory)replaceHistory.push(arguments);if(elements.nodeType||typeof elements=='string')elements=[elements];CSS.ready(function(){for(var i=0,l=elements.length;i<l;++i){var el=elements[i];if(typeof el=='string')api.replace(options.selector(el),options,true);else replaceElement(el,options);}});return api;};api.set=function(option,value){defaultOptions[option]=value;return api;};return api;})();Cufon.registerEngine('canvas',(function(){var check=document.createElement('canvas');if(!check||!check.getContext||!check.getContext.apply)return null;check=null;var HAS_INLINE_BLOCK=Cufon.CSS.supports('display','inline-block');var HAS_BROKEN_LINEHEIGHT=!HAS_INLINE_BLOCK&&(document.compatMode=='BackCompat'||/frameset|transitional/i.test(document.doctype.publicId));var styleSheet=document.createElement('style');styleSheet.type='text/css';styleSheet.appendChild(document.createTextNode('.cufon-canvas{text-indent:0}'+'@media screen,projection{'+'.cufon-canvas{display:inline;display:inline-block;position:relative;vertical-align:middle'+(HAS_BROKEN_LINEHEIGHT?'' : ';font-size:1px;line-height:1px')+'}.cufon-canvas .cufon-alt{position:absolute;left:-10000in;font-size:1px}'+(HAS_INLINE_BLOCK?'.cufon-canvas canvas{position:relative}' : '.cufon-canvas canvas{position:absolute}')+'}'+'@media print{'+'.cufon-canvas{padding:0!important}'+'.cufon-canvas canvas{display:none}'+'.cufon-canvas .cufon-alt{display:inline}'+'}'));document.getElementsByTagName('head')[0].appendChild(styleSheet);function generateFromVML(path,context){var atX=0,atY=0;var code=[],re=/([mrvxe])([^a-z]*)/g,match;generate: for(var i=0;match=re.exec(path);++i){var c=match[2].split(',');switch(match[1]){case 'v': code[i]={m: 'bezierCurveTo',a:[atX+~~c[0],atY+~~c[1],atX+~~c[2],atY+~~c[3],atX+=~~c[4],atY+=~~c[5]]};break;case 'r': code[i]={m: 'lineTo',a:[atX+=~~c[0],atY+=~~c[1]]};break;case 'm': code[i]={m: 'moveTo',a:[atX=~~c[0],atY=~~c[1]]};break;case 'x': code[i]={m: 'closePath'};break;case 'e': break generate;}context[code[i].m].apply(context,code[i].a);}return code;}function interpret(code,context){for(var i=0,l=code.length;i<l;++i){var line=code[i];context[line.m].apply(context,line.a);}}return function(font,text,style,options,node,el){var redraw=(text===null);var viewBox=font.viewBox;var size=style.getSize('fontSize',font.baseSize);var letterSpacing=style.get('letterSpacing');letterSpacing=(letterSpacing=='normal')?0 : size.convertFrom(parseInt(letterSpacing,10));var expandTop=0,expandRight=0,expandBottom=0,expandLeft=0;var shadows=options.textShadow,shadowOffsets=[];if(shadows){for(var i=0,l=shadows.length;i<l;++i){var shadow=shadows[i];var x=size.convertFrom(parseFloat(shadow.offX));var y=size.convertFrom(parseFloat(shadow.offY));shadowOffsets[i]=[x,y];if(y<expandTop)expandTop=y;if(x>expandRight)expandRight=x;if(y>expandBottom)expandBottom=y;if(x<expandLeft)expandLeft=x;}}var chars=Cufon.CSS.textTransform(redraw?node.alt : text,style).split('');var width=0,lastWidth=null;for(var i=0,l=chars.length;i<l;++i){var glyph=font.glyphs[chars[i]]||font.missingGlyph;if(!glyph)continue;width+=lastWidth=Number(glyph.w||font.w)+letterSpacing;}if(lastWidth===null)return null;expandRight+=(viewBox.width-lastWidth);expandLeft+=viewBox.minX;var wrapper,canvas;if(redraw){wrapper=node;canvas=node.firstChild;}else{wrapper=document.createElement('span');wrapper.className='cufon cufon-canvas';wrapper.alt=text;canvas=document.createElement('canvas');wrapper.appendChild(canvas);if(options.printable){var print=document.createElement('span');print.className='cufon-alt';print.appendChild(document.createTextNode(text));wrapper.appendChild(print);}}var wStyle=wrapper.style;var cStyle=canvas.style;var height=size.convert(viewBox.height-expandTop+expandBottom);var roundedHeight=Math.ceil(height);var roundingFactor=roundedHeight/height;canvas.width=Math.ceil(size.convert(width+expandRight-expandLeft)*roundingFactor);canvas.height=roundedHeight;expandTop+=viewBox.minY;cStyle.top=Math.round(size.convert(expandTop-font.ascent))+'px';cStyle.left=Math.round(size.convert(expandLeft))+'px';var wrapperWidth=Math.ceil(size.convert(width*roundingFactor))+'px';if(HAS_INLINE_BLOCK){wStyle.width=wrapperWidth;wStyle.height=size.convert(font.height)+'px';}else{wStyle.paddingLeft=wrapperWidth;wStyle.paddingBottom=(size.convert(font.height)-1)+'px';}var g=canvas.getContext('2d'),scale=roundedHeight/viewBox.height;g.scale(scale,scale);g.translate(-expandLeft,-expandTop);g.lineWidth=font.face['underline-thickness'];g.save();function line(y,color){g.strokeStyle=color;g.beginPath();g.moveTo(0,y);g.lineTo(width,y);g.stroke();}var textDecoration=options.enableTextDecoration?Cufon.CSS.textDecoration(el,style):{};if(textDecoration.underline)line(-font.face['underline-position'],textDecoration.underline);if(textDecoration.overline)line(font.ascent,textDecoration.overline);g.fillStyle=style.get('color');function renderText(){for(var i=0,l=chars.length;i<l;++i){var glyph=font.glyphs[chars[i]]||font.missingGlyph;if(!glyph)continue;g.beginPath();if(glyph.d){if(glyph.code)interpret(glyph.code,g);else glyph.code=generateFromVML('m'+glyph.d,g);}g.fill();g.translate(Number(glyph.w||font.w)+letterSpacing,0);}}if(shadows){for(var i=0,l=shadows.length;i<l;++i){var shadow=shadows[i];g.save();g.fillStyle=shadow.color;g.translate.apply(g,shadowOffsets[i]);renderText();g.restore();}}renderText();g.restore();if(textDecoration['line-through'])line(-font.descent,textDecoration['line-through']);return wrapper;};})());Cufon.registerEngine('vml',(function(){if(!document.namespaces)return;document.write('<!--[if vml]><script type="text/javascript">Cufon.vmlEnabled=true;</script><![endif]-->');if(!Cufon.vmlEnabled)return;if(document.namespaces['cvml']==null){document.namespaces.add('cvml','urn:schemas-microsoft-com:vml');document.write('<style type="text/css">'+'.cufon-vml-canvas{text-indent:0}'+'@media screen{'+'cvml\\:shape,cvml\\:group,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute}'+'.cufon-vml-canvas{position:absolute;text-align:left}'+'.cufon-vml{display:inline-block;position:relative;vertical-align:middle}'+'.cufon-vml .cufon-alt{position:absolute;left:-10000in;font-size:1px}'+'a .cufon-vml{cursor:pointer}'+'}'+'@media print{'+'.cufon-vml*{display:none}'+'.cufon-vml .cufon-alt{display:inline}'+'}'+'</style>');}function getFontSizeInPixels(el,value){return getSizeInPixels(el,/(?:em|ex|%)$/i.test(value)?'1em' : value);}function getSizeInPixels(el,value){if(/px$/i.test(value))return parseFloat(value);var style=el.style.left,runtimeStyle=el.runtimeStyle.left;el.runtimeStyle.left=el.currentStyle.left;el.style.left=value;var result=el.style.pixelLeft;el.style.left=style;el.runtimeStyle.left=runtimeStyle;return result;}return function(font,text,style,options,node,el,hasNext){var redraw=(text===null);if(redraw)text=node.alt;var viewBox=font.viewBox;var size=style.computedFontSize||(style.computedFontSize=new Cufon.CSS.Size(getFontSizeInPixels(el,style.get('fontSize'))+'px',font.baseSize));var letterSpacing=style.computedLSpacing;if(letterSpacing==undefined){letterSpacing=style.get('letterSpacing');style.computedLSpacing=letterSpacing=(letterSpacing=='normal')?0 :~~size.convertFrom(getSizeInPixels(el,letterSpacing));}var wrapper,canvas;if(redraw){wrapper=node;canvas=node.firstChild;}else{wrapper=document.createElement('span');wrapper.className='cufon cufon-vml';wrapper.alt=text;canvas=document.createElement('span');canvas.className='cufon-vml-canvas';wrapper.appendChild(canvas);if(options.printable){var print=document.createElement('span');print.className='cufon-alt';print.appendChild(document.createTextNode(text));wrapper.appendChild(print);}if(!hasNext)wrapper.appendChild(document.createElement('cvml:group'));}var wStyle=wrapper.style;var cStyle=canvas.style;var height=size.convert(viewBox.height),roundedHeight=Math.ceil(height);var roundingFactor=roundedHeight/height;var minX=viewBox.minX,minY=viewBox.minY;cStyle.height=roundedHeight;cStyle.top=Math.round(size.convert(minY-font.ascent));cStyle.left=Math.round(size.convert(minX));wStyle.height=size.convert(font.height)+'px';var textDecoration=options.enableTextDecoration?Cufon.CSS.textDecoration(el,style):{};var color=style.get('color');var chars=Cufon.CSS.textTransform(text,style).split('');var width=0,offsetX=0,advance=null;var glyph,shape,shadows=options.textShadow;for(var i=0,k=0,l=chars.length;i<l;++i){glyph=font.glyphs[chars[i]]||font.missingGlyph;if(glyph)width+=advance=~~(glyph.w||font.w)+letterSpacing;}if(advance===null)return null;var fullWidth=-minX+width+(viewBox.width-advance);var shapeWidth=size.convert(fullWidth*roundingFactor),roundedShapeWidth=Math.round(shapeWidth);var coordSize=fullWidth+','+viewBox.height,coordOrigin;var stretch='r'+coordSize+'nsnf';for(i=0;i<l;++i){glyph=font.glyphs[chars[i]]||font.missingGlyph;if(!glyph)continue;if(redraw){shape=canvas.childNodes[k];if(shape.firstChild)shape.removeChild(shape.firstChild);}else{shape=document.createElement('cvml:shape');canvas.appendChild(shape);}shape.stroked='f';shape.coordsize=coordSize;shape.coordorigin=coordOrigin=(minX-offsetX)+','+minY;shape.path=(glyph.d?'m'+glyph.d+'xe' : '')+'m'+coordOrigin+stretch;shape.fillcolor=color;var sStyle=shape.style;sStyle.width=roundedShapeWidth;sStyle.height=roundedHeight;if(shadows){var shadow1=shadows[0],shadow2=shadows[1];var color1=Cufon.CSS.color(shadow1.color),color2;var shadow=document.createElement('cvml:shadow');shadow.on='t';shadow.color=color1.color;shadow.offset=shadow1.offX+','+shadow1.offY;if(shadow2){color2=Cufon.CSS.color(shadow2.color);shadow.type='double';shadow.color2=color2.color;shadow.offset2=shadow2.offX+','+shadow2.offY;}shadow.opacity=color1.opacity||(color2&&color2.opacity)||1;shape.appendChild(shadow);}offsetX+=~~(glyph.w||font.w)+letterSpacing;++k;}wStyle.width=Math.max(Math.ceil(size.convert(width*roundingFactor)),0);return wrapper;};})());

