window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=!!(a[b]in l);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return a.getContext&&a.getContext("2d")},r.canvastext=function(){return e.canvas&&C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return"ontouchstart"in a||w("@media ("+o.join("touch-enabled),(")+"modernizr)")},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;){var d=p[b].toLowerCase();if(a[d+"_indexedDB"]||a[d+"IndexedDB"])return!0}return!1},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return !!(a.history&&history.pushState)},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){var a,c,d=h||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return!1}};e.type="text/css",d.insertBefore(e,d.firstChild),a=e.sheet||e.styleSheet;var i=f.hasFeature("CSS2","")?function(b){if(!a||!b)return!1;var c=!1;try{a.insertRule(b,0),c=/src/i.test(a.cssRules[0].cssText),a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!a||!b)return!1;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c=i('@font-face { font-family: "font"; src: url(data:,); }'),d.removeChild(e);return c},r.video=function(){var a=b.createElement("video"),c=!!a.canPlayType;if(c){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c},r.audio=function(){var a=b.createElement("audio"),c=!!a.canPlayType;c&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;"));return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webWorkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document);


/*
 * jQuery kAnim animation Plugin 
 *
 * Copyright (c) 2009 Keith Philpott
 * Licensed under the MIT license.
 *
 */
(function($){
	$.fn.kAnim = function(animParams,duration,order,callback,overlap){

		//if already animated, commit suicide, but still provide jquery object
		if( $(this).is(":animated") ){
			return $(this);
		}

		var 
			opts = {
				"duration": duration ? duration : 1000 ,
				"order":order ? order : "normal", //normal, reverse, or random
				"callback": callback ? callback : function(){},
				"overlap": overlap < 1 && overlap >=0 ? 1-overlap : .5 //(1 - .5)
			},

			obj = this,
			n = obj.size(),
			overlapFreq = ( opts.duration / n ) * opts.overlap ,
			//trying to get the actual total duration as close as possible to opts.duration	
			overlapDuration = opts.duration - ( (n - 1) * overlapFreq ),
			
			//determine order
			arOrder = (function(){
				var arRet = [];
				if(opts.order==="random"){
					var tn; // testnumber
					//can't use indexOf because of IE
					function checkIndex(ar,val){
						for(var i=0; i<ar.length; i++){
				   		if(ar[i]==val){
				    			return i;
				   		}
				  		}
						return -1;
					}
					while (arRet.length < n){
						tn = Math.floor( Math.random() * n);
						//can't use indexOf because of IE
						if(checkIndex(arRet,tn) === -1){
							arRet.push(tn);
						}
					}
					
					return arRet;
				}
				else{
					for(var ind = 0;ind < n; ind++){
						arRet.push(ind);
					}
					if( opts.order === "reverse"){
						arRet.reverse();
					}
				}
				return arRet;
			})(),
			
			//can be set in presets below
			presetCallback = null, 
			//if string is entered instead of obj in anim parameters, it looks here
			presets = {
				
				"appear" : function(){
					//any prep css
					obj.css( {"opacity":"0","display":"block"} );				
					animParams = {"opacity":1};					
					return true;
				},
				
				"disappear": function(){
					var 
						alphas  = $.map(obj,function(item){return $(item).css("opacity")});
					
					//from initial arguments
					presetCallback = function(){
						obj.each(function(i){
							//restore opacities
							$(this).hide().css( { "opacity":alphas[i] } );
						});
						return true;
					};
					
					//from initial arguments
					animParams = {"opacity":0};
					return true;
				},

				
				"horizontalAppear": function(){
					presets["hSlideIn"](true);
					return true;
				},

				"horizontalSlideIn": function(){
					presets["hSlideIn"](false);
					return true;
				},
				
				"hSlideIn": function(fade){
					var 
						highW = 0,
						orig = {
							oFlow: [],
							maxW: []
						},
						cssParams = {};

					obj.each(function(i){ 
						highW = Math.max( $(this).width(), highW );
						orig.maxW.push( $(this).css("maxWidth") );
						orig.oFlow.push( $(this).css("overflow") );
					});

					presetCallback = function(){
						obj.each(function(i){
							//opera retarded
							var mx = orig.maxW[i];
							if(mx == "-1px"){
								mx = "none";
							}
							$(this).css({"maxWidth":mx,"overflow":orig.oFlow[i] });
						});
						return true;
					}

					cssParams = {
						"display":"block",
						"maxWidth":0,
						"overflow":"hidden"			
					}
					
					//from initial arguments
					animParams = {
						"maxWidth":highW
					}
					//from this function's arguments
					if(fade){
						cssParams["opacity"] = 0;
						animParams["opacity"] = 1;
					}
					obj.css( cssParams );
					return true;
				},


				"verticalAppear": function(){
					presets["vSlideIn"](true);
					return true;
				},

				"verticalSlideIn": function(){
					presets["vSlideIn"](false);
					return true;
				},
				
				"vSlideIn": function(fade){
					var 
						highH = 0,
						orig = {
							oFlow: [],
							maxH: [],
							display:[]
						},
						cssParams={};

					obj.each(function(i){ 
						//get Stats
						highH = Math.max( $(this).height(), highH ); 
						orig.oFlow.push( $(this).css("overflow") );
						orig.maxH.push( $(this).css("maxHeight") );
					});

					presetCallback = function(){
						obj.each(function(i){
							//opera retarded
							var mx = orig.maxH[i];
							if(mx == "-1px"){
								mx = "none";
							}
							$(this).css({"maxHeight":mx,"overflow":orig.oFlow[i] });
						});
						return true;
					}

					cssParams = {
						"display":"block",
						"maxHeight":0,
						"overflow":"hidden"		
					}
					//from initial arguments
					animParams = {
						"maxHeight":highH
					}
					//from this function's arguments
					if(fade){
						cssParams["opacity"] = 0;
						animParams["opacity"] = 1;			
					}
					obj.css( cssParams )
				},
				
				
				"horizontalSlideOut" : function(){
					presets["hSlideOut"](false);
				},

				"horizontalDisappear" : function(){
					presets["hSlideOut"](true);
				},

				"hSlideOut" : function (fade){
					var 
						highW = 0,
						orig = {
							oFlow: [],
							maxW: [],
							alpha:[]
						},
						cssParams = {};

					obj.each(function(i){ 
						highW = Math.max( $(this).width(), highW );
						orig.maxW.push( $(this).css("maxWidth") );
						orig.oFlow.push( $(this).css("overflow") );
						orig.alpha.push( $(this).css("opacity") );
					});
					//from defined in the main function arguments
					presetCallback = function(){
						obj.each(function(i){
							//opera retarded
							var mx = orig.maxW[i];
							if(mx == "-1px"){
								mx = "none";
							}
							$(this).hide().css({"maxWidth":mx,"overflow":orig.oFlow[i],"opacity":orig.alpha[i] });
						});
						return true
					}

					cssParams = {
						"maxWidth":highW,
						"overflow":"hidden"			
					}
					//from initial arguments
					animParams = {
						"maxWidth":0
					}
					//from function arguments
					if(fade){
						animParams["opacity"] = 0;
					}
					obj.css( cssParams );
					return true;
				},


				"verticalSlideOut" : function(){
					presets["vSlideOut"](false);
				},

				"verticalDisappear" : function(){
					presets["vSlideOut"](true);
				},


				"vSlideOut" : function (fade){
					var 
						highH = 0,
						orig = {
							oFlow: [],
							maxH: [],
							alpha:[]
						},
						cssParams = {};
						
					obj.each(function(i){ 
						highH = Math.max( $(this).height(), highH );
						orig.maxH.push( $(this).css("maxHeight") );
						orig.oFlow.push( $(this).css("overflow") );
						orig.alpha.push( $(this).css("opacity") );
					});
					//from defined in the main function arguments
					presetCallback = function(){
						obj.each(function(i){
							//opera retarded
							var mx = orig.maxH[i];
							if(mx == "-1px"){
								mx = "none";
							}
							$(this).hide().css({"maxHeight":mx,"overflow":orig.oFlow[i],"opacity":orig.alpha[i] });
						});
						return true;
					}

					cssParams = {
						"maxHeight":highH,
						"overflow":"hidden"			
					}
					//from initial arguments
					animParams = {
						"maxHeight":0
					}
					//from function arguments
					if(fade){
						animParams["opacity"] = 0;
					}
					
					obj.css( cssParams );
					return true;
				}
				
			},

			i = 0, // index for iteration (before func)
			j = 0; // goes at different speed (callback)
		
			
		try{
			//if it's a string, it will call the appropriate function
			presets[animParams]();
			run();
		}catch(e){
			try{
				//if not a string, assume parameters
				run();
			}catch(e){
				return obj;
			}
		}
		
		function run(){
			obj.eq( arOrder[i] ).animate(animParams, overlapDuration,"swing",function(){
				/*
					BUG - have to use setTimeout to kill the .is(":animate") == true ...
					this makes sure animation ends. JQUERY BUG SOMEWHERE..?
				*/
				setTimeout(function(){ 
					j++;
					if( j === n ){
						//obj.stop();
						presetCallback ? presetCallback() : null;//doesn't need .call() because obj used in presetCallback functions
						opts.callback.call(obj);
					}
				},0);
			});
			i++;
			if(i < n){
				setTimeout(run, overlapFreq );
			}
		}

		return obj;//returns jquery obj
	}

})(jQuery);

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic: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},easeOutElastic: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},easeInOutElastic: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},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)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},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce: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}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});

(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]}})(jQuery);

/**
 * Cookie Plugin
 */

jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires='; expires='+date.toUTCString()}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};

/**

 * jQuery.ScrollTo - Easy element scrolling using jQuery.

 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com

 * Dual licensed under MIT and GPL.

 * Date: 5/25/2009

 * @author Ariel Flesler

 * @version 1.4.2

 *

 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html

 */

;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);



/*

 * jQuery.SerialScroll - Animated scrolling of series

 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com

 * Dual licensed under MIT and GPL.

 * Date: 06/14/2009

 * @author Ariel Flesler

 * @version 1.2.2

 * http://flesler.blogspot.com/2008/02/jqueryserialscroll.html

 */

;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);

/* ------------------------------------------------------------------------
 * Class: prettyPhoto
 * Use: Lightbox clone for jQuery
 * Author: Stephane Caron (http://www.no-margin-for-errors.com)
 * Version: 3.0.2
 * ------------------------------------------------------------------------- */

(function($){$.prettyPhoto={version:'3.0.2'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({animation_speed:'fast',slideshow:false,autoplay_slideshow:false,opacity:0.80,show_title:true,allow_resize:true,default_width:500,default_height:344,counter_separator_label:'/',theme:'facebook',hideflash:false,wmode:'opaque',autoplay:true,modal:false,overlay_gallery:true,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder"> \
      <div class="ppt">&nbsp;</div> \
      <div class="pp_top"> \
       <div class="pp_left"></div> \
       <div class="pp_middle"></div> \
       <div class="pp_right"></div> \
      </div> \
      <div class="pp_content_container"> \
       <div class="pp_left"> \
       <div class="pp_right"> \
        <div class="pp_content"> \
         <div class="pp_loaderIcon"></div> \
         <div class="pp_fade"> \
          <a href="#" class="pp_expand" title="Expand the image">Expand</a> \
          <div class="pp_hoverContainer"> \
           <a class="pp_next" href="#">next</a> \
           <a class="pp_previous" href="#">previous</a> \
          </div> \
          <div id="pp_full_res"></div> \
          <div class="pp_details clearfix"> \
           <p class="pp_description"></p> \
           <a class="pp_close" href="#">Close</a> \
           <div class="pp_nav"> \
            <a href="#" class="pp_arrow_previous">Previous</a> \
            <p class="currentTextHolder">0/0</p> \
            <a href="#" class="pp_arrow_next">Next</a> \
           </div> \
          </div> \
         </div> \
        </div> \
       </div> \
       </div> \
      </div> \
      <div class="pp_bottom"> \
       <div class="pp_left"></div> \
       <div class="pp_middle"></div> \
       <div class="pp_right"></div> \
      </div> \
     </div> \
     <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \
        <a href="#" class="pp_arrow_previous">Previous</a> \
        <ul> \
         {gallery} \
        </ul> \
        <a href="#" class="pp_arrow_next">Next</a> \
       </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline clearfix">{content}</div>',custom_markup:''},pp_settings);var matchedObjects=this,percentBased=false,pp_dimensions,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){_center_overlay();_resize_overlay();});if(pp_settings.keyboard_shortcuts){$(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){if(typeof $pp_pic_holder!='undefined'){if($pp_pic_holder.is(':visible')){switch(e.keyCode){case 37:$.prettyPhoto.changePage('previous');e.preventDefault();break;case 39:$.prettyPhoto.changePage('next');e.preventDefault();break;case 27:if(!settings.modal)
$.prettyPhoto.close();e.preventDefault();break;};};};});}
$.prettyPhoto.initialize=function(){settings=pp_settings;if($.browser.msie&&parseInt($.browser.version)==6)settings.theme="light_square";theRel=$(this).attr('rel');galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return $(n).attr('href');}):$.makeArray($(this).attr('href'));pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).find('img').attr('alt'))?$(n).find('img').attr('alt'):"";}):$.makeArray($(this).find('img').attr('alt'));pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(this).attr('title'));_buildOverlay(this);if(settings.allow_resize)
$(window).bind('scroll.prettyphoto',function(){_center_overlay();});set_position=jQuery.inArray($(this).attr('href'),pp_images);$.prettyPhoto.open();return false;}
$.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;if($.browser.msie&&$.browser.version==6)settings.theme="light_square";_buildOverlay(event.target);pp_images=$.makeArray(arguments[0]);pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pp_images.length>1)?true:false;set_position=0;}
if($.browser.msie&&$.browser.version==6)$('select').css('visibility','hidden');if(settings.hideflash)$('object,embed').css('visibility','hidden');_checkPosition($(pp_images).size());$('.pp_loaderIcon').show();if($ppt.is(':hidden'))$ppt.css('opacity',0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pp_images).size());$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html('&nbsp;');movie_width=(parseFloat(grab_param('width',pp_images[set_position])))?grab_param('width',pp_images[set_position]):settings.default_width.toString();movie_height=(parseFloat(grab_param('height',pp_images[set_position])))?grab_param('height',pp_images[set_position]):settings.default_height.toString();if(movie_height.indexOf('%')!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);percentBased=true;}
if(movie_width.indexOf('%')!=-1){movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;}
$pp_pic_holder.fadeIn(function(){imgPreloader="";switch(_getFileType(pp_images[set_position])){case'image':imgPreloader=new Image();nextImage=new Image();if(isSet&&set_position<$(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image();if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.onerror=function(){alert('Image cannot be loaded. Make sure the path is correct and image exist.');$.prettyPhoto.close();};imgPreloader.src=pp_images[set_position];break;case'youtube':pp_dimensions=_fitToViewport(movie_width,movie_height);movie='http://www.youtube.com/v/'+grab_param('v',pp_images[set_position]);if(settings.autoplay)movie+="&autoplay=1";toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case'vimeo':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http:\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie='http://player.vimeo.com/video/'+match[2]+'?title=0&amp;byline=0&amp;portrait=0';if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=pp_dimensions['width']+'/embed/?moog_width='+pp_dimensions['width'];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);break;case'quicktime':pp_dimensions=_fitToViewport(movie_width,movie_height);pp_dimensions['height']+=15;pp_dimensions['contentHeight']+=15;pp_dimensions['containerHeight']+=15;toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case'flash':pp_dimensions=_fitToViewport(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars')+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf('?'));toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);break;case'iframe':pp_dimensions=_fitToViewport(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);break;case'custom':pp_dimensions=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case'inline':myClone=$(pp_images[set_position]).clone().css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo($('body')).show();doresize=false;pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());doresize=true;$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break;};if(!imgPreloader){$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();};});return false;};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=='previous'){set_position--;if(set_position<0){set_position=0;return;};}else if(direction=='next'){set_position++;if(set_position>$(pp_images).size()-1){set_position=0;}}else{set_position=direction;};if(!doresize)doresize=true;$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');_hideContent(function(){$.prettyPhoto.open();});};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=='next'){currentGalleryPage++;if(currentGalleryPage>totalPage){currentGalleryPage=0;};}else if(direction=='previous'){currentGalleryPage--;if(currentGalleryPage<0){currentGalleryPage=totalPage;};}else{currentGalleryPage=direction;};itemsToSlide=(currentGalleryPage==totalPage)?pp_images.length-((totalPage)*itemsPerPage):itemsPerPage;$pp_pic_holder.find('.pp_gallery li').each(function(i){$(this).animate({'left':(i*itemWidth)-((itemsToSlide*itemWidth)*currentGalleryPage)});});};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=='undefined'){$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){$.prettyPhoto.stopSlideshow();return false;});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);}else{$.prettyPhoto.changePage('next');};}
$.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});clearInterval(pp_slideshow);pp_slideshow=undefined;}
$.prettyPhoto.close=function(){$.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');$('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){$(this).remove();});$pp_overlay.fadeOut(settings.animation_speed,function(){if($.browser.msie&&$.browser.version==6)$('select').css('visibility','visible');if(settings.hideflash)$('object,embed').css('visibility','visible');$(this).remove();$(window).unbind('scroll');settings.callback();doresize=true;pp_open=false;delete settings;});};function _showContent(){$('.pp_loaderIcon').hide();$ppt.fadeTo(settings.animation_speed,1);projectedTop=scroll_pos['scrollTop']+((windowHeight/2)-(pp_dimensions['containerHeight']/2));if(projectedTop<0)projectedTop=0;$pp_pic_holder.find('.pp_content').animate({height:pp_dimensions['contentHeight'],width:pp_dimensions['contentWidth']},settings.animation_speed);$pp_pic_holder.animate({'top':projectedTop,'left':(windowWidth/2)-(pp_dimensions['containerWidth']/2),width:pp_dimensions['containerWidth']},settings.animation_speed,function(){$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);$pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed);if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find('.pp_hoverContainer').show();}else{$pp_pic_holder.find('.pp_hoverContainer').hide();}
if(pp_dimensions['resized']){$('a.pp_expand,a.pp_contract').show();}else{$('a.pp_expand,a.pp_contract').hide();}
if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();settings.changepicturecallback();pp_open=true;});_insert_gallery();};function _hideContent(callback){$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){$('.pp_loaderIcon').show();callback();});};function _checkPosition(setCount){(setCount>1)?$('.pp_nav').show():$('.pp_nav').hide();};function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pp_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else if((pp_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;};pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;};_getDimensions(imageWidth,imageHeight);};return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth)+40,contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized};};function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find('.pp_details');$pp_details.width(width);detailsHeight=parseFloat($pp_details.css('marginTop'))+parseFloat($pp_details.css('marginBottom'));$pp_details=$pp_details.clone().appendTo($('body')).css({'position':'absolute','top':-10000});detailsHeight+=$pp_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;if($.browser.msie&&$.browser.version==7)detailsHeight+=8;$pp_details.remove();$pp_title=$pp_pic_holder.find('.ppt');$pp_title.width(width);titleHeight=parseFloat($pp_title.css('marginTop'))+parseFloat($pp_title.css('marginBottom'));$pp_title=$pp_title.clone().appendTo($('body')).css({'position':'absolute','top':-10000});titleHeight+=$pp_title.height();$pp_title.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+titleHeight+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height();pp_containerWidth=width;}
function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)){return'youtube';}else if(itemSrc.match(/vimeo\.com/i)){return'vimeo';}else if(itemSrc.match(/\b.mov\b/i)){return'quicktime';}else if(itemSrc.match(/\b.swf\b/i)){return'flash';}else if(itemSrc.match(/\biframe=true\b/i)){return'iframe';}else if(itemSrc.match(/\bcustom=true\b/i)){return'custom';}else if(itemSrc.substr(0,1)=='#'){return'inline';}else{return'image';};};function _center_overlay(){if(doresize&&typeof $pp_pic_holder!='undefined'){scroll_pos=_get_scroll();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos['scrollTop']-(contentHeight/2);if(projectedTop<0)projectedTop=0;$pp_pic_holder.css({'top':projectedTop,'left':(windowWidth/2)+scroll_pos['scrollLeft']-(contentwidth/2)});};};function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};};function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height()).width(windowWidth);};function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=(settings.theme=="facebook")?58:38;itemsPerPage=Math.floor((pp_dimensions['containerWidth']-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage<pp_images.length)?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').hide();}else{$pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').show();};galleryWidth=itemsPerPage*itemWidth+navWidth;$pp_pic_holder.find('.pp_gallery').width(galleryWidth).css('margin-left',-(galleryWidth/2));$pp_pic_holder.find('.pp_gallery ul').width(itemsPerPage*itemWidth).find('li.selected').removeClass('selected');goToPage=(Math.ceil((set_position+1)/itemsPerPage)<totalPage)?Math.ceil((set_position+1)/itemsPerPage):totalPage;$.prettyPhoto.changeGalleryPage(goToPage);$pp_pic_holder.find('.pp_gallery ul li:eq('+set_position+')').addClass('selected');}else{$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');$pp_pic_holder.find('.pp_gallery').hide();}}
function _buildOverlay(caller){$('body').append(settings.markup);$pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname='default';}else{classname='';}
toInject+="<li class='"+classname+"'><a href='#'><img src='"+pp_images[i]+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_pic_holder.find('.pp_gallery .pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_gallery .pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_pic_holder.find('.pp_gallery ul li').each(function(i){$(this).css({'position':'absolute','left':i*itemWidth});$(this).find('a').unbind('click').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
$pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});}
$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);

/**
 * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch and iPad, should also work with Android mobile phones (not tested yet!)
 * Common usage: wipe images (left and right to show the previous or next image)
 *
 * @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de)
 * @version 1.1.1 (9th December 2010) - fix bug (older IE's had problems)
 * @version 1.1 (1st September 2010) - support wipe up and wipe down
 * @version 1.0 (15th July 2010)
 */
(function($){$.fn.touchwipe=function(settings){var config={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:true};if(settings)$.extend(config,settings);this.each(function(){var startX;var startY;var isMoving=false;function cancelTouch(){this.removeEventListener('touchmove',onTouchMove);startX=null;isMoving=false}function onTouchMove(e){if(config.preventDefaultEvents){e.preventDefault()}if(isMoving){var x=e.touches[0].pageX;var y=e.touches[0].pageY;var dx=startX-x;var dy=startY-y;if(Math.abs(dx)>=config.min_move_x){cancelTouch();if(dx>0){config.wipeLeft()}else{config.wipeRight()}}else if(Math.abs(dy)>=config.min_move_y){cancelTouch();if(dy>0){config.wipeDown()}else{config.wipeUp()}}}}function onTouchStart(e){if(e.touches.length==1){startX=e.touches[0].pageX;startY=e.touches[0].pageY;isMoving=true;this.addEventListener('touchmove',onTouchMove,false)}}if('ontouchstart'in document.documentElement){this.addEventListener('touchstart',onTouchStart,false)}});return this}})(jQuery);


/*
 * Copyright (c) 2009 Simo Kinnunen.
 * Licensed under the MIT license.
 *
 * @version 1.09i
 */
var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(function(E){var D=[],C=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,B;while(B=C.exec(E)){D.push(B[3]||B[1])}return D}),recognizesMedia:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},textAlign:function(E,D,B,C){if(D.get("textAlign")=="right"){if(B>0){E=" "+E}}else{if(B<C-1){E+=" "}}return E},textShadow:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),textTransform:(function(){var B={uppercase:function(C){return C.toUpperCase()},lowercase:function(C){return C.toLowerCase()},capitalize:function(C){return C.replace(/\b./g,function(D){return D.toUpperCase()})}};return function(E,D){var C=B[D.get("textTransform")];return C?C(E):E}})(),whiteSpace:(function(){var D={inline:1,"inline-block":1,"run-in":1};var C=/^\s+/,B=/\s+$/;return function(H,F,G,E){if(E){if(E.nodeName.toLowerCase()=="br"){H=H.replace(C,"")}}if(D[F.get("display")]){return H}if(!G.previousSibling){H=H.replace(C,"")}if(!G.nextSibling){H=H.replace(B,"")}return H}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.recognizesMedia(P||"all")){return true}if(!M||M.disabled){return false}try{var Q=M.cssRules,O;if(Q){search:for(var L=0,K=Q.length;O=Q[L],L<K;++L){switch(O.type){case 2:break;case 3:if(!G(O.styleSheet,O.media.mediaText)){return false}break;default:break search}}}}catch(N){}return true}function F(){if(document.createStyleSheet){return true}var L,K;for(K=0;L=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(D){var C=this.face=D.face,B={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=D.glyphs;this.w=D.w;this.baseSize=parseInt(C["units-per-em"],10);this.family=C["font-family"].toLowerCase();this.weight=C["font-weight"];this.style=C["font-style"]||"normal";this.viewBox=(function(){var F=C.bbox.split(/\s+/);var E={minX:parseInt(F[0],10),minY:parseInt(F[1],10),maxX:parseInt(F[2],10),maxY:parseInt(F[3],10)};E.width=E.maxX-E.minX;E.height=E.maxY-E.minY;E.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return E})();this.ascent=-parseInt(C.ascent,10);this.descent=-parseInt(C.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}this.add=function(F,E){D[F]=C.push(E)-1};this.repeat=function(){var E=arguments.length?B(arguments):C,F;for(var G=0;F=E[G++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return !!B}}function q(C,B,D){if(C.addEventListener){C.addEventListener(B,D,false)}else{if(C.attachEvent){C.attachEvent("on"+B,function(){return D.call(C,window.event)})}}}function v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},w={autoDetect:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},ignore:{applet:1,canvas:1,col:1,colgroup:1,head:1,iframe:1,map:1,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:true,selector:(window.Sizzle||(window.jQuery&&function(B){return jQuery(B)})||(window.dojo&&dojo.query)||(window.Ext&&Ext.query)||(window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query)||(window.$$&&function(B){return $$(B)})||(window.$&&function(B){return $(B)})||(document.querySelectorAll&&function(B){return document.querySelectorAll(B)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("vml",(function(){var e=document.namespaces;if(!e){return}e.add("cvml","urn:schemas-microsoft-com:vml");e=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize){return}b=null;var h=(document.documentMode||0)<8;document.write(('<style type="text/css">cufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(e?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(a?"cufon canvas{position:relative;}":"cufon canvas{position:absolute;}")+"}@media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(f);function d(p,h){var n=0,m=0;var g=[],o=/([mrvxe])([^a-z]*)/g,k;generate:for(var j=0;k=o.exec(p);++j){var l=k[2].split(",");switch(k[1]){case"v":g[j]={m:"bezierCurveTo",a:[n+~~l[0],m+~~l[1],n+~~l[2],m+~~l[3],n+=~~l[4],m+=~~l[5]]};break;case"r":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(m,k){for(var j=0,h=m.length;j<h;++j){var g=m[j];k[g.m].apply(k,g.a)}}return function(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());


Cufon.registerFont({"w":293,"face":{"font-family":"Helvetica Neue","font-weight":700,"font-stretch":"expanded","units-per-em":"360","panose-1":"2 11 8 5 0 0 0 0 0 0","ascent":"283","descent":"-77","x-height":"7","bbox":"-24 -287 414 77","underline-thickness":"18","underline-position":"-18","stemh":"45","stemv":"63","unicode-range":"U+0020-U+007E"},"glyphs":{" ":{"w":133},"\u00a0":{"w":133},"!":{"d":"42,-83r-10,-174r70,0r-11,174r-49,0xm32,0r0,-61r70,0r0,61r-70,0","w":133},"\"":{"d":"122,-130r0,-127r44,0r0,127r-44,0xm47,-130r0,-127r44,0r0,127r-44,0","w":213},"#":{"d":"69,0r9,-63r-30,0r0,-40r36,0r6,-44r-30,0r0,-39r36,0r9,-64r39,0r-9,64r41,0r9,-64r39,0r-9,64r31,0r0,39r-36,0r-7,44r31,0r0,40r-36,0r-9,63r-40,0r9,-63r-40,0r-9,63r-40,0xm164,-103r6,-44r-40,0r-7,44r41,0"},"$":{"d":"163,-99r0,62v26,-3,38,-15,38,-33v0,-19,-15,-25,-38,-29xm136,-157r0,-55v-20,0,-45,5,-45,27v0,19,12,23,45,28xm136,-37r0,-66v-50,-10,-113,-3,-113,-75v0,-57,53,-78,113,-79r0,-30r27,0r0,30v49,4,101,22,104,80r-72,0v-3,-21,-16,-30,-32,-33r0,57v54,7,112,21,112,74v0,47,-26,83,-112,86r0,39r-27,0r0,-39v-82,-4,-115,-29,-118,-86r75,0v1,28,20,39,43,42"},"%":{"d":"14,-187v0,-43,21,-70,73,-70v52,0,74,27,74,70v0,43,-22,70,-74,70v-52,0,-73,-27,-73,-70xm56,-187v0,17,4,39,31,39v27,0,31,-22,31,-39v0,-17,-4,-39,-31,-39v-27,0,-31,22,-31,39xm213,-63v0,-43,21,-69,73,-69v52,0,74,26,74,69v0,43,-22,70,-74,70v-52,0,-73,-27,-73,-70xm255,-63v0,17,4,39,31,39v27,0,31,-22,31,-39v0,-17,-4,-39,-31,-39v-27,0,-31,22,-31,39xm87,7r164,-264r35,0r-164,264r-35,0","w":373},"&":{"d":"195,-55r-72,-66v-17,6,-35,21,-35,40v0,54,76,53,107,26xm254,0r-26,-24v-61,51,-209,43,-207,-50v0,-40,29,-65,70,-75v-16,-14,-26,-25,-26,-47v-1,-87,174,-77,173,-4v0,32,-27,50,-55,58r55,51v12,-11,27,-31,32,-44r39,19v-10,23,-18,38,-36,55r66,61r-85,0xm154,-220v-42,0,-25,48,-5,54v14,-6,32,-15,32,-32v0,-14,-15,-22,-27,-22","w":333},"(":{"d":"141,68r-44,0v-92,-84,-92,-241,0,-325r44,0v-66,95,-67,230,0,325","w":159},")":{"d":"63,68r-45,0v68,-95,67,-230,0,-325r45,0v90,84,91,241,0,325","w":159},"*":{"d":"23,-137r33,-38r-47,-15r12,-36r45,18r-2,-49r39,0r-2,49r45,-18r12,36r-47,15r33,38r-29,23r-31,-40r-32,40","w":167},"+":{"d":"86,0r0,-69r-69,0r0,-44r69,0r0,-69r44,0r0,69r69,0r0,44r-69,0r0,69r-44,0","w":216},",":{"d":"32,0r0,-61r70,0v4,70,-5,120,-70,127r0,-25v23,-6,30,-17,32,-41r-32,0","w":133},"-":{"d":"22,-78r0,-49r129,0r0,49r-129,0","w":173},"\u00ad":{"d":"22,-78r0,-49r129,0r0,49r-129,0","w":173},".":{"d":"32,0r0,-61r70,0r0,61r-70,0","w":133},"\/":{"d":"-1,7r107,-271r48,0r-106,271r-49,0","w":153},"0":{"d":"83,-125v0,45,16,85,64,85v48,0,64,-40,64,-85v0,-45,-16,-85,-64,-85v-48,0,-64,40,-64,85xm15,-125v0,-84,48,-131,132,-131v84,0,132,47,132,131v0,79,-44,131,-132,131v-84,0,-132,-47,-132,-131"},"1":{"d":"89,0r0,-159r-76,0r0,-45v55,-1,77,-6,91,-46r50,0r0,250r-65,0","w":200},"2":{"d":"91,-49r181,0r0,49r-257,0v6,-150,187,-112,187,-174v0,-21,-18,-36,-48,-36v-28,0,-56,12,-60,48r-72,0v3,-72,61,-94,129,-94v91,0,123,43,123,83v0,80,-134,73,-183,124"},"3":{"d":"110,-108r0,-44v35,1,88,4,85,-28v-4,-44,-98,-42,-102,3r-70,0v7,-64,69,-79,129,-79v82,0,115,31,115,72v1,27,-18,42,-41,49v31,6,51,29,51,59v0,41,-27,82,-134,82v-76,0,-125,-23,-128,-88r70,0v-2,58,120,53,118,6v-2,-40,-53,-31,-93,-32"},"4":{"d":"172,-93r0,-106r-93,106r93,0xm172,0r0,-48r-158,0r0,-47r140,-155r80,0r0,157r45,0r0,45r-45,0r0,48r-62,0"},"5":{"d":"26,-109r24,-141r208,0r0,47r-163,0r-8,49v70,-31,188,-21,188,69v0,64,-61,91,-130,91v-53,0,-127,-15,-130,-81r72,0v6,27,28,35,58,35v41,0,61,-14,61,-43v0,-57,-80,-54,-114,-26r-66,0"},"6":{"d":"273,-183r-69,0v-9,-23,-31,-27,-52,-27v-48,0,-64,27,-65,70v56,-45,192,-36,192,57v0,59,-51,89,-124,89v-104,0,-136,-56,-136,-130v0,-69,30,-132,139,-132v49,0,109,15,115,73xm148,-121v-36,0,-55,15,-55,41v0,19,15,40,62,40v31,0,54,-15,54,-40v0,-18,-11,-41,-61,-41"},"7":{"d":"8,-201r0,-49r254,0r0,55v-54,54,-112,114,-127,195r-85,0v13,-84,79,-147,140,-201r-182,0","w":273},"8":{"d":"147,-113v-35,0,-60,11,-60,36v0,26,25,37,60,37v36,0,60,-11,60,-37v0,-25,-24,-36,-60,-36xm147,6v-68,0,-132,-18,-132,-80v-1,-32,22,-52,51,-62v-26,-9,-41,-25,-41,-52v0,-58,71,-68,122,-68v51,0,120,10,120,68v0,28,-15,42,-39,53v31,8,51,30,51,61v0,62,-64,80,-132,80xm147,-152v39,0,51,-14,51,-30v0,-21,-27,-28,-51,-28v-36,0,-52,11,-52,28v0,18,15,30,52,30"},"9":{"d":"21,-67r69,0v9,23,31,27,52,27v48,0,64,-26,65,-69v-58,43,-192,35,-192,-58v0,-59,51,-89,124,-89v104,0,136,56,136,130v0,69,-30,132,-139,132v-49,0,-109,-15,-115,-73xm146,-129v36,0,55,-15,55,-41v0,-19,-15,-40,-62,-40v-31,0,-54,15,-54,40v0,18,11,41,61,41"},":":{"d":"32,-132r0,-61r70,0r0,61r-70,0xm32,0r0,-61r70,0r0,61r-70,0","w":133},";":{"d":"32,0r0,-61r70,0v4,70,-5,120,-70,127r0,-25v23,-6,30,-17,32,-41r-32,0xm32,-132r0,-61r70,0r0,61r-70,0","w":133},"<":{"d":"17,-72r0,-38r182,-75r0,45r-122,49r122,49r0,45","w":216},"=":{"d":"17,-108r0,-45r182,0r0,45r-182,0xm17,-30r0,-44r182,0r0,44r-182,0","w":216},">":{"d":"199,-110r0,38r-182,75r0,-45r122,-49r-122,-49r0,-45","w":216},"?":{"d":"165,-83r-63,0v0,-68,84,-58,84,-102v0,-20,-22,-32,-47,-32v-28,0,-51,14,-54,46r-68,0v-4,-126,239,-113,239,-12v0,64,-85,61,-91,100xm99,0r0,-61r69,0r0,61r-69,0","w":273},"@":{"d":"149,-163v-41,-2,-61,72,-15,77v41,2,63,-74,15,-77xm190,-176r5,-19r32,0r-24,106v0,5,3,7,7,7v16,0,39,-23,39,-63v0,-53,-44,-86,-99,-86v-61,0,-102,46,-102,103v0,59,46,102,105,102v33,0,59,-10,79,-24r33,0v-66,105,-257,52,-257,-79v0,-77,64,-135,142,-135v67,0,130,44,130,111v0,77,-68,104,-91,104v-14,1,-21,-8,-24,-19v-32,35,-98,19,-98,-43v0,-64,81,-126,123,-65","w":288},"A":{"d":"190,-100r-40,-102r-40,102r80,0xm230,0r-21,-53r-118,0r-21,53r-75,0r113,-257r84,0r113,257r-75,0","w":300,"k":{"y":6,"w":6,"v":6,"Y":20,"W":6,"V":13,"T":20}},"B":{"d":"94,-110r0,61r103,0v22,0,30,-14,30,-30v-1,-50,-86,-25,-133,-31xm24,0r0,-257r193,0v37,0,73,17,73,65v1,21,-12,42,-34,52v30,5,45,34,45,62v0,34,-15,78,-93,78r-184,0xm94,-210r0,55r98,0v16,0,26,-9,26,-28v2,-42,-83,-23,-124,-27","w":320},"C":{"d":"317,-160r-75,0v-6,-37,-38,-55,-74,-55v-66,0,-80,51,-80,86v0,35,14,87,80,87v34,0,67,-16,74,-57r76,0v-9,75,-70,106,-152,106v-94,0,-152,-41,-152,-136v0,-95,58,-135,152,-135v62,0,141,15,151,104","w":326},"D":{"d":"94,-208r0,159r78,0v46,0,67,-28,67,-82v0,-48,-20,-77,-73,-77r-72,0xm24,0r0,-257r161,0v88,0,126,51,126,128v0,77,-39,129,-120,129r-167,0","w":326},"E":{"d":"24,0r0,-257r241,0r0,49r-171,0r0,53r162,0r0,47r-162,0r0,59r172,0r0,49r-242,0","w":280},"F":{"d":"24,0r0,-257r230,0r0,49r-160,0r0,56r150,0r0,49r-150,0r0,103r-70,0","w":259,"k":{"A":13,".":46,",":46}},"G":{"d":"187,-99r0,-44r131,0r0,143r-35,0r-9,-30v-24,26,-63,37,-108,37v-94,0,-152,-41,-152,-136v0,-80,55,-135,152,-135v71,0,138,20,151,91r-78,0v-10,-33,-40,-42,-65,-42v-63,0,-86,46,-86,86v0,40,23,87,86,87v38,0,67,-15,75,-57r-62,0","w":339},"H":{"d":"24,0r0,-257r70,0r0,96r145,0r0,-96r70,0r0,257r-70,0r0,-112r-145,0r0,112r-70,0","w":333},"I":{"d":"24,0r0,-257r70,0r0,257r-70,0","w":118},"J":{"d":"152,-91r0,-166r70,0r0,157v0,44,-2,107,-104,107v-66,0,-122,-22,-115,-105r70,0v-3,34,8,58,38,58v36,0,41,-21,41,-51","w":246},"K":{"d":"94,-147r120,-110r94,0r-118,103r127,154r-95,0r-87,-111r-41,35r0,76r-70,0r0,-257r70,0r0,110","w":313},"L":{"d":"24,0r0,-257r70,0r0,206r157,0r0,51r-227,0","w":259,"k":{"y":13,"Y":33,"W":27,"V":27,"T":33}},"M":{"d":"203,-72r77,-185r102,0r0,257r-67,0r-1,-206r-81,206r-59,0r-82,-206r0,206r-68,0r0,-257r103,0","w":406},"N":{"d":"240,-78v4,-56,0,-120,1,-179r68,0r0,257r-76,0r-141,-179r0,179r-68,0r0,-257r81,0","w":333},"O":{"d":"10,-129v0,-54,22,-135,160,-135v138,0,160,81,160,135v0,54,-22,136,-160,136v-138,0,-160,-82,-160,-136xm84,-129v0,40,23,87,86,87v63,0,86,-47,86,-87v0,-40,-23,-86,-86,-86v-63,0,-86,46,-86,86","w":339},"P":{"d":"94,-210r0,71v50,-8,122,24,122,-35v0,-62,-72,-27,-122,-36xm24,0r0,-257r173,0v73,0,91,43,91,78v0,55,-28,87,-85,87r-109,0r0,92r-70,0","w":299,"k":{"A":20,".":46,",":46}},"Q":{"d":"195,-45r-20,-18r32,-35r30,26v39,-56,21,-143,-67,-143v-63,0,-86,46,-86,86v0,47,42,101,111,84xm292,40r-49,-43v-20,7,-44,10,-73,10v-138,0,-160,-82,-160,-136v0,-54,22,-135,160,-135v138,0,160,81,160,135v0,32,-7,73,-42,102r36,32","w":339},"R":{"d":"94,-208r0,65v49,-7,126,22,126,-33v0,-55,-78,-24,-126,-32xm24,0r0,-257r187,0v71,0,83,44,83,70v0,31,-12,52,-41,62v54,16,20,84,48,125r-76,0v-6,-12,-7,-22,-7,-49v2,-72,-69,-37,-124,-45r0,94r-70,0","w":306},"S":{"d":"276,-183r-78,0v-3,-53,-110,-46,-112,-6v0,14,12,21,30,24v68,15,170,8,170,86v0,48,-33,86,-134,86v-63,0,-143,-8,-144,-88r78,0v-2,57,121,53,121,9v0,-38,-72,-31,-107,-39v-44,-10,-88,-20,-88,-73v0,-57,47,-80,128,-80v53,0,131,8,136,81"},"T":{"d":"95,0r0,-208r-95,0r0,-49r260,0r0,49r-95,0r0,208r-70,0","w":259,"k":{"y":27,"w":27,"u":27,"s":27,"r":27,"o":33,"i":13,"e":33,"c":33,"a":33,"A":13,";":27,":":27,".":33,"-":40,",":33}},"U":{"d":"22,-92r0,-165r69,0r0,148v0,25,2,67,66,67v64,0,65,-42,65,-67r0,-148r70,0r0,165v0,29,-4,99,-135,99v-131,0,-135,-70,-135,-99","w":313},"V":{"d":"106,0r-114,-257r77,0r74,196r75,-196r76,0r-114,257r-74,0","w":286,"k":{"y":6,"u":13,"r":13,"o":20,"i":6,"e":20,"a":20,"A":20,";":13,":":13,".":33,"-":20,",":33}},"W":{"d":"80,0r-81,-257r70,0r50,187r53,-187r70,0r53,187r50,-187r69,0r-81,257r-72,0r-55,-183r-54,183r-72,0","w":413,"k":{"u":6,"r":6,"o":13,"e":13,"a":13,"A":6,";":13,":":13,".":20,"-":13,",":20}},"X":{"d":"-6,0r109,-132r-100,-125r84,0r56,80r57,-80r84,0r-100,125r109,132r-87,0r-63,-87r-62,87r-87,0","w":286},"Y":{"d":"105,0r0,-90r-114,-167r82,0r67,112r67,-112r82,0r-114,167r0,90r-70,0","w":280,"k":{"v":6,"u":13,"q":20,"p":13,"o":27,"i":6,"e":20,"a":20,"A":20,";":20,":":20,".":46,"-":33,",":46}},"Z":{"d":"6,0r0,-45r170,-163r-159,0r0,-49r250,0r0,45r-169,163r169,0r0,49r-261,0","w":273},"[":{"d":"29,68r0,-325r119,0r0,45r-58,0r0,236r58,0r0,44r-119,0","w":159},"\\":{"d":"105,7r-106,-271r49,0r106,271r-49,0","w":153},"]":{"d":"131,-257r0,325r-119,0r0,-44r57,0r0,-236r-57,0r0,-45r119,0","w":159},"^":{"d":"65,-111r-45,0r67,-139r42,0r67,139r-45,0r-43,-90","w":216},"_":{"d":"0,45r0,-18r180,0r0,18r-180,0","w":180},"a":{"d":"118,-30v38,-1,74,-19,67,-64v-29,18,-107,-5,-107,37v0,17,16,27,40,27xm84,-134r-62,0v8,-59,62,-66,114,-66v164,0,89,91,118,200r-64,0v-2,-7,-4,-14,-4,-21v-49,43,-178,44,-176,-34v2,-71,84,-58,147,-65v19,-2,26,-5,26,-20v0,-15,-12,-23,-49,-23v-27,0,-41,2,-50,29","w":266},"b":{"d":"83,-95v0,37,27,55,59,55v32,0,60,-18,60,-55v0,-37,-28,-56,-60,-56v-32,0,-59,19,-59,56xm22,0r0,-261r63,0r1,92v12,-17,38,-29,74,-29v61,0,107,41,107,104v0,98,-121,134,-184,70r0,24r-61,0","w":280},"c":{"d":"258,-122r-65,0v-17,-58,-124,-38,-115,26v-10,69,108,79,115,19r65,0v-12,68,-60,84,-123,84v-73,0,-122,-30,-122,-103v0,-73,51,-104,127,-104v49,0,106,14,118,78","w":266},"d":{"d":"78,-95v0,37,28,55,60,55v32,0,59,-18,59,-55v0,-37,-27,-56,-59,-56v-32,0,-60,19,-60,56xm197,0r0,-24v-60,64,-184,29,-184,-70v0,-63,46,-104,107,-104v37,-1,61,13,75,29r0,-92r63,0r0,261r-61,0","w":280},"e":{"d":"191,-58r67,0v-32,98,-247,90,-247,-38v0,-73,51,-104,127,-104v86,0,126,43,124,120r-186,1v0,18,19,47,62,47v26,0,44,-9,53,-26xm76,-118v36,2,85,2,121,0v0,-10,-14,-43,-60,-43v-50,0,-61,38,-61,43","w":272},"f":{"d":"42,0r0,-150r-40,0r0,-43r40,0v-11,-74,43,-73,115,-71r0,40v-27,0,-58,-12,-52,31r51,0r0,43r-51,0r0,150r-63,0","w":153},"g":{"d":"78,-100v0,44,33,52,61,52v28,0,60,-8,60,-52v0,-44,-32,-53,-60,-53v-28,0,-61,9,-61,53xm201,-170v3,-5,0,-16,1,-23r61,0r0,178v0,67,-43,92,-124,92v-48,0,-112,-6,-118,-64r67,0v4,16,16,24,53,24v36,0,63,-18,58,-70v-18,20,-45,28,-77,28v-76,0,-109,-47,-109,-97v0,-53,33,-96,114,-96v28,0,57,7,74,28","w":280},"h":{"d":"22,0r0,-261r63,0r1,96v28,-42,159,-58,159,36r0,129r-63,0v-7,-58,25,-149,-43,-149v-30,0,-54,15,-54,56r0,93r-63,0","w":266},"i":{"d":"22,0r0,-193r63,0r0,193r-63,0xm22,-217r0,-44r63,0r0,44r-63,0","w":106},"j":{"d":"22,-6r0,-187r63,0r0,192v0,46,-6,73,-70,73v-12,0,-23,-2,-33,-2r0,-47v25,5,40,4,40,-29xm22,-217r0,-44r63,0r0,44r-63,0","w":106},"k":{"d":"22,0r0,-261r63,0r0,140r84,-72r88,0r-92,73r98,120r-84,0r-63,-80r-31,25r0,55r-63,0","w":259},"l":{"d":"22,0r0,-261r63,0r0,261r-63,0","w":106},"m":{"d":"322,0r0,-116v0,-26,-21,-33,-39,-33v-26,0,-48,15,-48,45r0,104r-63,0r0,-116v0,-26,-20,-33,-38,-33v-27,0,-49,15,-49,45r0,104r-63,0r0,-193r61,0v1,9,-2,21,1,28v12,-16,41,-33,78,-33v37,0,57,14,67,36v34,-49,156,-58,156,31r0,131r-63,0","w":406},"n":{"d":"182,0v-7,-58,25,-149,-43,-149v-30,0,-54,15,-54,56r0,93r-63,0r0,-193r61,0v1,9,-2,21,1,28v31,-41,161,-59,161,36r0,129r-63,0","w":266},"o":{"d":"13,-96v0,-73,51,-104,127,-104v76,0,127,31,127,104v0,73,-51,103,-127,103v-76,0,-127,-30,-127,-103xm78,-96v0,38,23,59,62,59v39,0,62,-21,62,-59v0,-38,-23,-60,-62,-60v-39,0,-62,22,-62,60","w":280},"p":{"d":"83,-95v0,37,27,55,59,55v32,0,60,-18,60,-55v0,-37,-28,-56,-60,-56v-32,0,-59,19,-59,56xm22,72r0,-265r61,0v1,8,-2,20,1,26v62,-67,183,-25,183,71v0,63,-46,103,-107,103v-37,1,-61,-13,-75,-29r0,94r-63,0","w":280},"q":{"d":"78,-95v0,37,28,55,60,55v32,0,59,-18,59,-55v0,-37,-27,-56,-59,-56v-32,0,-60,19,-60,56xm197,-193r61,0r0,265r-63,0r-1,-94v-12,17,-38,29,-74,29v-61,0,-107,-40,-107,-103v0,-97,122,-136,184,-71r0,-26","w":280},"r":{"d":"22,0r0,-193r61,0v1,12,-2,28,1,38v27,-36,51,-48,100,-41r0,59v-48,-17,-99,3,-99,54r0,83r-63,0","w":186,"k":{".":27,"-":13,",":27}},"s":{"d":"10,-60r70,0v3,17,14,28,47,28v51,0,69,-34,10,-41v-51,-6,-121,-4,-121,-62v0,-52,53,-65,106,-65v89,0,110,29,114,65r-70,0v-4,-20,-25,-26,-43,-26v-17,0,-41,2,-41,21v-4,19,54,20,76,23v64,8,85,26,85,59v0,57,-64,65,-119,65v-73,0,-111,-21,-114,-67","w":253},"t":{"d":"42,-193r0,-60r63,0r0,60r52,0r0,43r-52,0r0,90v-4,27,32,19,53,18r0,43v-12,1,-36,3,-50,3v-102,4,-56,-80,-66,-154r-40,0r0,-43r40,0","w":159},"u":{"d":"184,0v-1,-8,2,-20,-1,-26v-32,41,-161,59,-161,-36r0,-131r63,0v7,58,-26,151,43,151v71,0,52,-86,54,-151r63,0r0,193r-61,0","w":266},"v":{"d":"84,0r-88,-193r72,0r52,135r53,-135r72,0r-89,193r-72,0","w":240,"k":{".":27,",":27}},"w":{"d":"72,0r-72,-193r70,0r45,132r44,-132r62,0r45,132r44,-132r70,0r-72,193r-76,0r-42,-125r-42,125r-76,0","w":380,"k":{".":20,",":20}},"x":{"d":"130,-134r45,-59r79,0r-82,93r89,100r-82,0r-50,-64r-49,64r-81,0r88,-100r-81,-93r79,0","w":259},"y":{"d":"171,-193r68,0r-105,225v-18,46,-60,41,-113,38r0,-44v36,7,56,-6,64,-33r-91,-186r69,0r55,127","w":233,"k":{".":27,",":33}},"z":{"d":"9,0r0,-40r122,-106r-115,0r0,-47r204,0r0,40r-122,106r126,0r0,47r-215,0","w":233},"{":{"d":"142,-217v-75,-9,5,112,-69,123v43,3,35,53,35,97v0,20,11,29,34,26r0,39v-49,2,-95,2,-95,-48v0,-42,11,-99,-33,-99r0,-31v43,1,33,-57,33,-98v0,-48,45,-52,95,-49r0,40","w":159},"|":{"d":"18,7r0,-271r44,0r0,271r-44,0","w":79},"}":{"d":"18,29v74,8,-6,-113,69,-124v-44,-3,-36,-51,-36,-96v0,-20,-10,-29,-33,-26r0,-40v50,-2,95,-1,95,49v0,42,-11,98,33,98r0,31v-44,-1,-33,57,-33,99v0,48,-45,51,-95,48r0,-39","w":159},"~":{"d":"69,-126v32,-1,50,23,77,25v14,0,28,-16,32,-25r13,39v-10,18,-23,30,-44,30v-32,1,-50,-22,-77,-24v-14,0,-28,15,-32,24r-13,-38v10,-18,23,-31,44,-31","w":216},"'":{"d":"44,-130r0,-127r45,0r0,127r-45,0","w":133},"`":{"d":"28,-217r-52,-51r77,0r32,51r-57,0","w":93}}});

jQuery(function($){

	var form = $('#formContainer form');

	form.zinePretifyForm();

	form.submit(handleFormSubmit);
	form.find('input[type=submit]').click(handleFormSubmit);

	var submitFlag = false;

	function handleFormSubmit(){
		if(submitFlag){
			return false;
		}
		overlay.show();
		submitFlag = true;

		$.post('./',form.serialize(),function(msg){
			submitFlag = false;
			overlay.hide();
			$('span.errorIcon').remove();

			if(msg.success){
				$('#formContainer').fadeOut(function(){
					form.get(0).reset();
					$('#thankYou').fadeIn();
				});
			}
			else {
				$.each(msg,function(k,v){

					var errorIcon = $('<span>',{className:'errorIcon'});
					var errorTip = $('<span>',{className:'errorTip',text:v}).hide().appendTo(errorIcon);

					errorIcon.hover(function(){
						errorTip.stop().fadeIn(function(){
							errorTip.css('opacity',1);
						});
					},function(){
						errorTip.stop().fadeOut('slow',function(){
							errorTip.hide().css('opacity',1);
						});
					});

					form.find('[name='+k+']').closest('.formRow').append(errorIcon);

					if($(window).width() - errorIcon.offset().left > 240){
						errorTip.css('left',30);
					}
					else {
						errorTip.css('right',30);
					}
				});
			}
		},'json');

		return false;
	}

	var overlay = {
		show	: function(){
			$('body').append('<div id="overlay"></div><div id="preloader">Working..</div>');
		},
		hide	: function(){
			$('#overlay,#preloader').remove();
		}
	}

	function displayOverlay(){
	}

});

(function($){

	$.fn.zinePretifyForm = function(){
		return this.each(function(){

			var form = $(this);

			form.find('input[type=button],input[type=submit]').each(function(){

				var originalButton = $(this),
					button = $('<span>',{
						className	: 'button',
						html		: originalButton.val()+'<span></span>'
					});

				button.insertAfter(originalButton.hide());

				button.click(function(){
					originalButton.click();
				});

			});

			form.find('input[type=checkbox]').each(function(){

				var originalCheckBox = $(this),
					checkBox = $('<span>',{
						className	: 'checkBox '+(this.checked?'checked':'')
					});

				checkBox.insertAfter(originalCheckBox.hide());

				checkBox.click(function(){
					checkBox.toggleClass('checked');
					originalCheckBox.attr('checked',checkBox.hasClass('checked'));
				});

			});

			form.find('input[type=radio]').each(function(){

				var originalRadio = $(this),
					radio = $('<span>',{
						className	: 'radio '+(this.checked?'checked':'')
					});

				radio.insertAfter(originalRadio.hide());

				radio.click(function(){
					$('input[type=radio][name='+originalRadio.attr('name')+']').each(function(){
						$(this).next().removeClass('checked');
					});

					radio.addClass('checked');
					originalRadio.attr('checked',true);
				});

			});

			form.find('select').each(function(i){

				var select = $(this);

				var selectBoxContainer = $('<span>',{
					width		: select.outerWidth(),
					className	: 'selectContainer',
					html		: '<div class="selectBox"></div><span></span>',
					css			: {zIndex : 1000-i}
				});

				var dropDown = $('<ul>',{className:'dropDown'});
				var selectBox = selectBoxContainer.find('.selectBox');

				select.find('option').each(function(i){
					var option = $(this);

					if(i==select.attr('selectedIndex')){
						selectBox.html(option.text());
					}

					var li = $('<li>',{
						html:	option.html()
					});

					li.click(function(){

						selectBox.html(option.text());
						dropDown.trigger('hide');

						select.val(option.val());
						return false;
					});

					dropDown.append(li);
				});

				selectBoxContainer.append(dropDown.hide());
				select.hide().after(selectBoxContainer);

				dropDown.bind('show',function(){

					if(dropDown.is(':animated')){
						return false;
					}

					selectBox.addClass('expanded');
					dropDown.slideDown('fast');

				}).bind('hide',function(){

					if(dropDown.is(':animated')){
						return false;
					}

					selectBox.removeClass('expanded');
					dropDown.slideUp('fast');

				}).bind('toggle',function(){
					if(selectBox.hasClass('expanded')){
						dropDown.trigger('hide');
					}
					else dropDown.trigger('show');
				});

				selectBoxContainer.click(function(){
					dropDown.trigger('toggle');
					return false;
				});

				$(document).click(function(){
					dropDown.trigger('hide');
				});
			});

		});
	}

})(jQuery);


