/*
 * jQuery Tools 1.2.5 - The missing UI library for the Web
 * 
 * [tooltip, scrollable, toolbox.mousewheel]
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 * jquery.event.wheel.js - rev 1 
 * Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
 * Liscensed under the MIT License (MIT-LICENSE.txt)
 * http://www.opensource.org/licenses/mit-license.php
 * Created: 2008-07-01 | Updated: 2008-07-14
 * 
 * -----
 * 
 * File generated: Tue Oct 05 09:31:24 GMT 2010
 */
(function(f){
	function p(a,b,c){
		var h=c.relative?a.position().top:a.offset().top,d=c.relative?a.position().left:a.offset().left,i=c.position[0];
		h-=b.outerHeight()-c.offset[0];
		d+=a.outerWidth()+c.offset[1];
		if(/iPad/i.test(navigator.userAgent))h-=f(window).scrollTop();
		var j=b.outerHeight()+a.outerHeight();if(i=="center")h+=j/2;
		if(i=="bottom")h+=j;
		i=c.position[1];
		a=b.outerWidth()+a.outerWidth();
		if(i=="center")d-=a/2;
		if(i=="left")d-=a;
		return{top:h,left:d}
	}
	function u(a,b){
		var c=this,h=a.add(c),d,i=0,j=0,m=a.attr("title"),q=a.attr("data-tooltip"),r=o[b.effect],l,s=a.is(":input"),v=s&&a.is(":checkbox, :radio, select, :button, :submit"),t=a.attr("type"),k=b.events[t]||b.events[s?v?"widget":"input":"def"];
		if(!r)throw'Nonexistent effect "'+b.effect+'"';
		k=k.split(/,\s*/);
		if(k.length!=2)throw"Tooltip: bad events configuration for "+t;
		a.bind(k[0],function(e){
			clearTimeout(i);
			if(b.predelay)j=setTimeout(function(){
				c.show(e)
			},b.predelay);
			else c.show(e)}).bind(k[1],function(e){
				clearTimeout(j);
				if(b.delay)i=setTimeout(function(){
					c.hide(e)
				},b.delay);
				else c.hide(e)
			});
			if(m&&b.cancelDefault){
				a.removeAttr("title");
				a.data("title",m)
				}
			f.extend(c,{show:function(e){
					if(!d){if(q)
						d=f(q);
					else if(b.tip)
						d=f(b.tip).eq(0);
					else if(m)
						d=f(b.layout).addClass(b.tipClass).appendTo(document.body).hide().append(m);
					else{
						d=a.next();
						d.length||(d=a.parent().next())
					}
					if(!d.length)throw"Cannot find tooltip for "+a;}
					
					if(c.isShown())return c;
					d.stop(true,true);
					var g=p(a,d,b);
					b.tip&&d.html(a.data("title"));
					e=e||f.Event();
					e.type="onBeforeShow";
					h.trigger(e,[g]);
					if(e.isDefaultPrevented())return c;
					g=p(a,d,b);
					d.css({position:"absolute",top:g.top,left:g.left});
					l=true;
					r[0].call(c,function(){
						e.type="onShow";
						l="full";
						h.trigger(e)
					});
					g=b.events.tooltip.split(/,\s*/);
					if(!d.data("__set")){
						d.bind(g[0],function(){
							clearTimeout(i);
							clearTimeout(j)
						});
						g[1]&&!a.is("input:not(:checkbox, :radio), textarea")&&d.bind(g[1],function(n){
							n.relatedTarget!=a[0]&&a.trigger(k[1].split(" ")[0])
						});
						d.data("__set",true)}return c},hide:function(e){
							if(!d||!c.isShown())return c;
							e=e||f.Event();
							e.type="onBeforeHide";
							h.trigger(e);
							if(!e.isDefaultPrevented()){
								l=false;
								o[b.effect][1].call(c,function(){
									e.type="onHide";
									h.trigger(e)
								});
								return c}},isShown:function(e){
									return e?l=="full":l},getConf:function(){
										return b},getTip:function(){
											return d},getTrigger:function(){
												return a}});
			f.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(e,g){
				f.isFunction(b[g])&&f(c).bind(g,b[g]);
				c[g]=function(n){n&&f(c).bind(g,n);
				return c}})}f.tools=f.tools||{version:"1.2.5"};
				f.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,b,c){o[a]=[b,c]}};
				var o={toggle:[function(a){
					var b=this.getConf(),c=this.getTip();
					b=b.opacity;
					b<1&&c.css({opacity:b});
					c.show();
					a.call()
				},function(a){
					this.getTip().hide();
					a.call()}],fade:[function(a){
						var b=this.getConf();
						this.getTip().fadeTo(b.fadeInSpeed,b.opacity,a)},function(a){
							this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};
				f.fn.tooltip=function(a){
					var b=this.data("tooltip");
					if(b)return b;
					a=f.extend(true,{},f.tools.tooltip.conf,a);
					if(typeof a.position=="string")a.position=a.position.split(/,?\s/);
					this.each(function(){
						b=new u(f(this),a);
						f(this).data("tooltip",b)
					});
					return a.api?b:this}
				})(jQuery);
(function(e){
	function p(f,c){
		var b=e(c);
		return b.length<2?b:f.parent().find(c)}function u(f,c){
			var xx = -1;
			var b=this,n=f.add(b),g=f.children(),l=0,j=c.vertical;
			k||(k=b);
			if(g.length>1)g=e(c.items,f);
			e.extend(b,{getConf:function(){
				return c
			},getIndex:function(){
				return l
			},getSize:function(){
				return b.getItems().size()
			},getNaviButtons:function(){
				return o.add(q)
			},getRoot:function(){
				return f
			},getItemWrap:function(){
				return g
			},getItems:function(){
				return g.children(c.item).not("."+c.clonedClass)
			},move:function(a,d){
				return b.seekTo(l+a,d)
			},next:function(a){
				return b.move(1,a)
			},prev:function(a){
				return b.move(-1,a)
			},begin:function(a){
				return b.seekTo(0,a)
			},end:function(a){
				return b.seekTo(b.getSize()-1,a)
			},focus:function(){
				return k=b
			},addItem:function(a){
				a=e(a);
				if(c.circular){
					g.children("."+c.clonedClass+":last").before(a);
					g.children("."+c.clonedClass+":first").replaceWith(a.clone().addClass(c.clonedClass))
				}else g.append(a);
				
				n.trigger("onAddItem",[a]);
				return b
			},seekTo:function(a,d,h){
				if(c.circular&&a===0&&l==-1&&d!==0){
					return b;
				}
				
				var visibleItems = Math.round($('#slidesContainer').width() / 480);
				
				
				if(!c.circular&&a<0||a>b.getSize()-visibleItems||a<-1){
					if(a>b.getSize()-visibleItems){
						$('#rightControl').hide();
				    	$('#rightControlTrans').show();
					}else{
						$('#leftControl').hide();
						$('#leftControlTrans').show();
					}
					return b;
				}
				
				var dir = 1;
				
				if(xx < a){
					dir = 1;
				}else{
					dir=-1;
				}
				
				a = Math.abs(Math.round($('#slideInner').position().left / 480)) + dir;
				$('#leftControl').show();
				$('#leftControlTrans').hide();
				$('#rightControl').show();
		    	$('#rightControlTrans').hide();
				
				var i=a;
				if(a.jquery)
					a=b.getItems().index(a);
				else i=b.getItems().eq(a);
				 
					
				var r=e.Event("onBeforeSeek");
				if(!h){
					n.trigger(r,[a,d]);
					if(r.isDefaultPrevented()||!i.length){
						return b
					}
				}
				
			
				i=j?{top:-i.position().top}:{left:-i.position().left};
				l=a;
				k=b;
				if(d===undefined)
					d=c.speed;
				
				g.animate(i,d,c.easing,h||function(){
					n.trigger("onSeek",[a]);
					
				});
				
				xx = a;
				
				return b
			}
		});
			e.each(["onBeforeSeek","onSeek","onAddItem"],function(a,d){
				e.isFunction(c[d])&&e(b).bind(d,c[d]);
				b[d]=function(h){
					h&&e(b).bind(d,h);
					return b
				}
			});
			if(c.circular){
				var s=b.getItems().slice(-1).clone().prependTo(g),t=b.getItems().eq(1).clone().appendTo(g);
				s.add(t).addClass(c.clonedClass);
				b.onBeforeSeek(function(a,d,h){
					if(!a.isDefaultPrevented())
						if(d==-1){
							b.seekTo(s,h,function(){
								b.end(0)
							});
							return a.preventDefault()
						}else d==b.getSize()&&b.seekTo(t,h,function(){
							b.begin(0)
							})
				});
				b.seekTo(0,0,function(){})
			}
			var o=p(f,c.prev).click(function(){
				b.prev()
				}),q=p(f,c.next).click(function(){
					b.next()
				});
			if(!c.circular&&b.getSize()>1){
				b.onBeforeSeek(function(a,d){
					setTimeout(function(){
						if(!a.isDefaultPrevented()){
							o.toggleClass(c.disabledClass,d<=0);
							q.toggleClass(c.disabledClass,d>=b.getSize()-1)
						}
					},1)
				});
				c.initialIndex||o.addClass(c.disabledClass)
			}c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(a,d){
				if(c.mousewheel){
						b.move(d<0?1:-1,c.wheelSpeed||300);
						return false
					}
				});
			if(c.touch){
				var m={};
				g[0].ontouchstart=function(a){
					a=a.touches[0];
					m.x=a.clientX;m.y=a.clientY
				};
				g[0].ontouchmove=function(a){
					if(a.touches.length==1&&!g.is(":animated")){
						var d=a.touches[0],h=m.x-d.clientX;
						d=m.y-d.clientY;
						b[j&&d>0||!j&&h>0?"next":"prev"]();
						a.preventDefault()
					}
				}
			}c.keyboard&&e(document).bind("keydown.scrollable",function(a){
				if(!(!c.keyboard||a.altKey||a.ctrlKey||e(a.target).is(":input")))
					if(!(c.keyboard!="static"&&k!=b)){
						var d=a.keyCode;
						if(j&&(d==38||d==40)){
							b.move(d==38?-1:1);
							return a.preventDefault()
						}
						if(!j&&(d==37||d==39)){
							b.move(d==37?-1:1);
							return a.preventDefault()
						}
					}
				});
			c.initialIndex&&b.seekTo(c.initialIndex,0,function(){})}e.tools=e.tools||{version:"1.2.5"};
			e.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};
			var k;
			e.fn.scrollable=function(f){
				var c=this.data("scrollable");
				if(c)
					return c;
				f=e.extend({},e.tools.scrollable.conf,f);
				this.each(function(){
					c=new u(e(this),f);
					e(this).data("scrollable",c)
				});
				return f.api?c:this
			}})(jQuery);
(function(b){
	function c(a){
		switch(a.type){
			case "mousemove":return b.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});
			case "DOMMouseScroll":b.extend(a,a.data);
			a.delta=-a.detail/3;
			break;
			case "mousewheel":a.delta=a.wheelDelta/120;
			break
		}
		a.type="wheel";
		return b.event.handle.call(this,a,a.delta)
	}
	b.fn.mousewheel=function(a){
		return this[a?"bind":"trigger"]("wheel",a)
	};
	b.event.special.wheel={
			setup:function(){
				b.event.add(this,d,c,{})
			},teardown:function(){
				b.event.remove(this,d,c)
			}
		};
	var d=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":"")
	})(jQuery);

