//** Featured Content Slider script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** May 2nd, 08'- Script rewritten and updated to 2.0.
//** June 12th, 08'- Script updated to v 2.3, which adds the following features:
			//1) Changed behavior of script to actually collapse the previous content when the active one is shown, instead of just tucking it underneath the later.
			//2) Added setting to reveal a content either via "click" or "mouseover" of pagination links (default is former).
			//3) Added public function for jumping to a particular slide within a Featured Content instance using an arbitrary link, for example.

//** July 11th, 08'- Script updated to v 2.4:
			//1) Added ability to select a particular slide when the page first loads using a URL parameter (ie: mypage.htm?myslider=4 to select 4th slide in "myslider")
			//2) Fixed bug where the first slide disappears when the mouse clicks or mouses over it when page first loads.

var featuredcontentslider={

//3 variables below you can customize if desired:
ajaxloadingmsg: '<div style="margin: 20px 0 0 20px"><img src="loading.gif" alt="" /> Fetching slider Contents. Please wait...</div>',
bustajaxcache: true, //bust caching of external ajax page after 1st request?
enablepersist: true, //persist to last content viewed when returning to page?

settingcaches: {}, //object to cache "setting" object of each script instance

jumpTo:function(fcsid, pagenumber){ //public function to go to a slide manually.
	this.turnpage(this.settingcaches[fcsid], pagenumber)
},

ajaxconnect:function(setting){
	var page_request = false
	if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken)
		try {
		page_request = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try{
			page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else if (window.XMLHttpRequest) // if Mozilla, Safari etc
		page_request = new XMLHttpRequest()
	else
		return false
	var pageurl=setting.contentsource[1]
	page_request.onreadystatechange=function(){
		featuredcontentslider.ajaxpopulate(page_request, setting)
	}
	document.getElementById(setting.id).innerHTML=this.ajaxloadingmsg
	var bustcache=(!this.bustajaxcache)? "" : (pageurl.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
	page_request.open('GET', pageurl+bustcache, true)
	page_request.send(null)
},

ajaxpopulate:function(page_request, setting){
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
		document.getElementById(setting.id).innerHTML=page_request.responseText
		this.buildpaginate(setting)
	}
},

buildcontentdivs:function(setting){
	var alldivs=document.getElementById(setting.id).getElementsByTagName("div")
	for (var i=0; i<alldivs.length; i++){
		if (this.css(alldivs[i], "contentdiv", "check")){ //check for DIVs with class "contentdiv"
			setting.contentdivs.push(alldivs[i])
				alldivs[i].style.display="none" //collapse all content DIVs to begin with
		}
	}
},

buildpaginate:function(setting){
	this.buildcontentdivs(setting)
	var sliderdiv=document.getElementById(setting.id)
	var pdiv=document.getElementById("paginate-"+setting.id)
	var phtml=""
	var toc=setting.toc
	var nextprev=setting.nextprev
	if (typeof toc=="string" && toc!="markup" || typeof toc=="object"){
		for (var i=1; i<=setting.contentdivs.length; i++){
			phtml+='<a href="#'+i+'" class="toc">'+(typeof toc=="string"? toc.replace(/#increment/, i) : toc[i-1])+'</a> '
		}
		phtml=(nextprev[0]!=''? '<a href="#prev" class="prev">'+nextprev[0]+'</a> ' : '') + phtml + (nextprev[1]!=''? '<a href="#next" class="next">'+nextprev[1]+'</a>' : '')
		pdiv.innerHTML=phtml
	}
	var pdivlinks=pdiv.getElementsByTagName("a")
	var toclinkscount=0 //var to keep track of actual # of toc links
	for (var i=0; i<pdivlinks.length; i++){
		if (this.css(pdivlinks[i], "toc", "check")){
			if (toclinkscount>setting.contentdivs.length-1){ //if this toc link is out of range (user defined more toc links then there are contents)
				pdivlinks[i].style.display="none" //hide this toc link
				continue
			}
			pdivlinks[i].setAttribute("rel", ++toclinkscount) //store page number inside toc link
			pdivlinks[i][setting.revealtype]=function(){
				featuredcontentslider.turnpage(setting, this.getAttribute("rel"))
				return false
			}
			setting.toclinks.push(pdivlinks[i])
		}
		else if (this.css(pdivlinks[i], "prev", "check") || this.css(pdivlinks[i], "next", "check")){ //check for links with class "prev" or "next"
			pdivlinks[i].onclick=function(){
				featuredcontentslider.turnpage(setting, this.className)
				return false
			}
		}
	}
	this.turnpage(setting, setting.currentpage, true)
	if (setting.autorotate[0]){ //if auto rotate enabled
		pdiv[setting.revealtype]=function(){
			featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id])
		}
		sliderdiv["onclick"]=function(){ //stop content slider when slides themselves are clicked on
			featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id])
		}
		setting.autorotate[1]=setting.autorotate[1]+(1/setting.enablefade[1]*50) //add time to run fade animation (roughly) to delay between rotation
	 this.autorotate(setting)
	}
},

urlparamselect:function(fcsid){
	var result=window.location.search.match(new RegExp(fcsid+"=(\\d+)", "i")) //check for "?featuredcontentsliderid=2" in URL
	return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index
},

turnpage:function(setting, thepage, autocall){
	var currentpage=setting.currentpage //current page # before change
	var totalpages=setting.contentdivs.length
	var turntopage=(/prev/i.test(thepage))? currentpage-1 : (/next/i.test(thepage))? currentpage+1 : parseInt(thepage)
	turntopage=(turntopage<1)? totalpages : (turntopage>totalpages)? 1 : turntopage //test for out of bound and adjust
	if (turntopage==setting.currentpage && typeof autocall=="undefined") //if a pagination link is clicked on repeatedly
		return
	setting.currentpage=turntopage
	setting.contentdivs[turntopage-1].style.zIndex=++setting.topzindex
	this.cleartimer(setting, window["fcsfade"+setting.id])
	setting.cacheprevpage=setting.prevpage
	if (setting.enablefade[0]==true){
		setting.curopacity=0
		this.fadeup(setting)
	}
	if (setting.enablefade[0]==false){ //if fade is disabled, fire onChange event immediately (verus after fade is complete)
		setting.contentdivs[setting.prevpage-1].style.display="none" //collapse last content div shown (it was set to "block")
		setting.onChange(setting.prevpage, setting.currentpage)
	}
	setting.contentdivs[turntopage-1].style.visibility="visible"
	setting.contentdivs[turntopage-1].style.display="block"
	if (setting.prevpage<=setting.toclinks.length) //make sure pagination link exists (may not if manually defined via "markup", and user omitted)
		this.css(setting.toclinks[setting.prevpage-1], "selected", "remove")
	if (turntopage<=setting.toclinks.length) //make sure pagination link exists (may not if manually defined via "markup", and user omitted)
		this.css(setting.toclinks[turntopage-1], "selected", "add")
	setting.prevpage=turntopage
	if (this.enablepersist)
		this.setCookie("fcspersist"+setting.id, turntopage)
},

setopacity:function(setting, value){ //Sets the opacity of targetobject based on the passed in value setting (0 to 1 and in between)
	var targetobject=setting.contentdivs[setting.currentpage-1]
	if (targetobject.filters && targetobject.filters[0]){ //IE syntax
		if (typeof targetobject.filters[0].opacity=="number") //IE6
			targetobject.filters[0].opacity=value*100
		else //IE 5.5
			targetobject.style.filter="alpha(opacity="+value*100+")"
	}
	else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax
		targetobject.style.MozOpacity=value
	else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax
		targetobject.style.opacity=value
	setting.curopacity=value
},

fadeup:function(setting){
	if (setting.curopacity<1){
		this.setopacity(setting, setting.curopacity+setting.enablefade[1])
		window["fcsfade"+setting.id]=setTimeout(function(){featuredcontentslider.fadeup(setting)}, 50)
	}
	else{ //when fade is complete
		if (setting.cacheprevpage!=setting.currentpage) //if previous content isn't the same as the current shown div (happens the first time the page loads/ script is run)
			setting.contentdivs[setting.cacheprevpage-1].style.display="none" //collapse last content div shown (it was set to "block")
		setting.onChange(setting.cacheprevpage, setting.currentpage)
	}
},

cleartimer:function(setting, timervar){
	if (typeof timervar!="undefined"){
		clearTimeout(timervar)
		clearInterval(timervar)
		if (setting.cacheprevpage!=setting.currentpage){ //if previous content isn't the same as the current shown div
			setting.contentdivs[setting.cacheprevpage-1].style.display="none"
		}
	}
},

css:function(el, targetclass, action){
	var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")
	if (action=="check")
		return needle.test(el.className)
	else if (action=="remove")
		el.className=el.className.replace(needle, "")
	else if (action=="add")
		el.className+=" "+targetclass
},

autorotate:function(setting){
 window["fcsautorun"+setting.id]=setInterval(function(){featuredcontentslider.turnpage(setting, "next")}, setting.autorotate[1])
},

getCookie:function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return null
},

setCookie:function(name, value){
	document.cookie = name+"="+value

},


init:function(setting){
	var persistedpage=this.getCookie("fcspersist"+setting.id) || 1
	var urlselectedpage=this.urlparamselect(setting.id) //returns null or index from: mypage.htm?featuredcontentsliderid=index
	this.settingcaches[setting.id]=setting //cache "setting" object
	setting.contentdivs=[]
	setting.toclinks=[]
	setting.topzindex=0
	setting.currentpage=urlselectedpage || ((this.enablepersist)? persistedpage : 1)
	setting.prevpage=setting.currentpage
	setting.revealtype="on"+(setting.revealtype || "click")
	setting.curopacity=0
	setting.onChange=setting.onChange || function(){}
	if (setting.contentsource[0]=="inline")
		this.buildpaginate(setting)
	if (setting.contentsource[0]=="ajax")
		this.ajaxconnect(setting)
}

};
/**
 * jQuery Lint
 * ---
 * VERSION 1.01
 * ---
 * jQuery lint creates a thin blanket over jQuery that'll
 * report any potentially erroneous activity to the console.
 * ---
 * Idea from:
 *      http://markmail.org/message/wzkosk2s5jklpkv4
 *      http://groups.google.com/group/jquery-dev/browse_thread/thread/9a15cca62ceb2444
 * ---
 * @author James Padolsey
 * @contributors Paul Irish, Zoran Zaric
 * ---
 * Dual licensed under the MIT and GPL licenses.
 *    - http://www.opensource.org/licenses/mit-license.php
 *    - http://www.gnu.org/copyleft/gpl.html
 */

(function(){
    
    var _jQuery = window['jQuery']; // Change as needed
    
    if (!_jQuery) {
        return;
    }
    
    var glob = window,
        
        langs = {
            en: {
                incorrectCall: '%0(...) called incorrectly',
                specialCheckFailed: '%0(...) special check failed',
                moreInfo: 'More info:',
                youPassed: 'You passed: ',
                collection: 'Collection:',
                availableSigsInclude: 'Available signatures include: ',
                errorThrown: 'When I called %0(...) with your args, an error was thrown!',
                repeatSelector: "You've used the same selector more than once.",
                info: 'Info',
                selector: 'Selector: ',
                selectorAdvice: "You should only use the same selector more than once when you know the returned collection will be different. For example, if you've added more elements to the page that may comply with the selector",
                noElementsFound: 'No elements were found with the selector: "%0"',
                combineCalls: 'Why not combine these calls by passing an object? E.g. \n%0(%1)',
                methodTwice: "You've called %0(...) more than once on the same jQuery object",
                triggeredBy: 'Triggered by %0 event',
                event: 'Event:',
                handler: 'Handler:',
                location: 'Location:',
                invalidFilters: 'Selector: %0\nYou used invalid filters (aka Pseudo classes):\n%1',
                badReadyCall: "Don't use jQuery().ready() - use jQuery(document).ready() instead. The former is likely to be deprecated in the future.",
                browser: "Don't use jQuery.browser",
                browserSafari: "Don't use jQuery.browser.safari - it's deprecated. If you have to use browser detection, then use jQuery.browser.webkit.",
                featureDetection: 'The jQuery team recommends against using jQuery.browser, please try to use feature detection instead (see jQuery.support).',
                boxModel: "Don't use jQuery.boxModel.",
                boxModelDeprecated: 'Deprecated in jQuery 1.3 (see jQuery.support)'
            },

            de: {
                incorrectCall: '%0(...) falsch aufgerufen',
                specialCheckFailed: '%0(...) Spezial-Check fehlgeschlagen',
                moreInfo: 'Mehr Informationen:',
                youPassed: 'Du hast Ã¼bergeben: ',
                collection: 'Sammlung:',
                availableSigsInclude: 'VerfÃ¼gbare Signaturen enthalten: ',
                errorThrown: 'Als ich %0(...) mit deinen Argumenten aufgerufen habe, wurde ein Fehler geworfen!',
                repeatSelector: "Du hast den selben Selektor mehrmals verwendet.",
                info: 'Info',
                selector: 'Selektor: ',
                selectorAdvice: "Du solltest den selben Selektor nur dann verwenden, wenn du weiÃŸt dass sich das Ergebnis Ã¤ndert. Zum Beispiel, wenn du Elemente zu einer Seite hinzufÃ¼gst, die den Selektor erfÃ¼llen",
                noElementsFound: 'Keine Elemente gefunden fÃ¼r den Selektor: "%0"',
                combineCalls: 'Warum kombinierst du diese Aufrufen nicht, indem du ein Objekt Ã¼bergibst? z.B. \n%0(%1)',
                methodTwice: "Du hast %0(...) mehr als ein mal auf dem selben jQuery-Objekt aufgerufen",
                triggeredBy: 'Vom %0-Event getriggert',
                event: 'Event:',
                handler: 'Handler:',
                location: 'Location:',
                invalidFilters: 'Selektor: %0\nDu hast fehlerhafte Filter verwendet (aka Pseudo Klassen):\n%1',
                badReadyCall: "Verwende jQuery().ready() nicht - verwende stattdessen jQuery(document).ready(). Ersteres wird wahrscheinlich in der Zukunft deprecated.",
                browser: "Verwende jQuery.browser nicht",
                browserSafari: "Verwende jQuery.browser.safari nicht - es ist deprecated. Wenn du eine Browser-Erkennung verwenden musst, nimm jQuery.browser.webkit.",
                featureDetection: 'Das jQuery-Team empfiehlt jQuery.browser nicht zu verwenden. Verwende lieber Feature-Erkennung (siehe jQuery.support).',
                boxModel: "Verwende jQuery.boxModel nicht.",
                boxModelDeprecated: 'Deprecated in jQuery 1.3 (siehe jQuery.support)'
            }
        },
        
        // Define console if not defined
        // Access it via jQuery.LINT.console
        emptyFn = function(){},
        _console = {
            
            warn: glob.console && console.warn ?
                function(){
                    console.warn.apply(console, arguments);
                } : emptyFn,
                
            group: glob.console && console.group ?
                function(){
                    console.group.apply(console, arguments);
                } : emptyFn,
                
            groupEnd: glob.console && console.groupEnd ?
                function(){
                    console.groupEnd();
                } : emptyFn,
                
            groupCollapsed: glob.console && console.groupCollapsed ?
                function(){
                    console.groupCollapsed.apply(console, arguments);
                } : emptyFn,
                
            log: glob.console && console.log ?
                function(){
                    console.log.apply(console, arguments);
                } : emptyFn
                
        },
        
        // Add specific checks
        // This is the best place to bring up bad practices
        checks = [
            {/* Level 0 */},
            {/* Level 1 */},
            {/* Level 2 */},
            {/* Level 3 */}
        ],
        
        addCheck = function(methodName, level, check) {
            
            level = Math.min(3, ~~level);
            
            (checks[level][methodName] || (checks[level][methodName] = [])).push(check);
            
            return lint;
        
        },
        
        lint = {
            version: '1.01',
            level: 3,
            checks: checks,
            special: checks, // Support decrecated API
            addCheck: addCheck,
            lang: 'en',
            langs: langs,
            console: _console,
            throwErrors: false,
            enabledReports: {
                // True to report, false to supress
                noElementsFound: true,
                repeatSelector: true,
                browserSniffing: true,
                invalidFilters: true
            },
            api: {"jQuery.proxy":[{added:"1.4",arg:[{name:"function",type:"Function"},{name:"scope",type:"Object",optional:true}]},{added:"1.4",arg:[{name:"scope",type:"Object"},{name:"name",type:"String"}]}],focusout:[{added:"1.4",arg:[{name:"handler(eventObject)",type:"Function"}]}],focusin:[{added:"1.4",arg:[{name:"handler(eventObject)",type:"Function"}]}],has:[{added:"1.4",arg:[{name:"selector",type:"String"}]},{added:"1.4",arg:[{name:"contained",type:"Element"}]},{added:"1.1.4"}],"jQuery.contains":[{added:"1.4",arg:[{name:"container",type:"Element"},{name:"contained",type:"Element"}]}],"jQuery.noop":[{added:"1.4"}],delay:[{added:"1.4",arg:[{name:"duration",type:"Integer"},{name:"queueName",type:"String",optional:true}]}],parentsUntil:[{added:"1.4",arg:[{name:"selector",type:"Selector",optional:true}]}],prevUntil:[{added:"1.4",arg:[{name:"selector",type:"Selector",optional:true}]}],nextUntil:[{added:"1.4",arg:[{name:"selector",type:"Selector",optional:true}]}],"event.isImmediatePropagationStopped":[{added:"1.3"}],"event.stopImmediatePropagation":[{added:"1.3"}],"event.isPropagationStopped":[{added:"1.3"}],"event.stopPropagation":[{added:"1.0"}],"event.isDefaultPrevented":[{added:"1.3"}],"event.preventDefault":[{added:"1.0"}],"event.timeStamp":[{added:"1.2.6"}],"event.result":[{added:"1.3"}],"event.which":[{added:"1.1.3"}],"event.pageY":[{added:"1.0.4"}],"event.pageX":[{added:"1.0.4"}],"event.currentTarget":[{added:"1.3"}],"event.relatedTarget":[{added:"1.1.4"}],"event.data":[{added:"1.1"}],"event.target":[{added:"1.0"}],"event.type":[{added:"1.0"}],"jQuery.fx.off":[{added:"1.3"}],each:[{added:"1.0",arg:[{name:"function(index, Element)",type:"Function"},{name:'args',type:'Array',optional:true}]}],"jQuery.pushStack":[{added:"1.0",arg:[{name:"elements",type:"Array"}]},{added:"1.3",arg:[{name:"elements",type:"Array"},{name:"name",type:"String"},{name:"arguments",type:"Array"}]}],"jQuery.globalEval":[{added:"1.0.4",arg:[{name:"code",type:"String"}]}],"jQuery.isXMLDoc":[{added:"1.1.4",arg:[{name:"node",type:"Element"}]}],"jQuery.removeData":[{added:"1.2.3",arg:[{type:'Element',name:'elem'},{name:"name",type:"String",optional:true}]}],"jQuery.data":[{added:"1.2.3",arg:[{name:"element",type:"Element"},{name:"key",type:"String"},{name:"value",type:"*"}]},{added:"1.2.3",arg:[{name:"element",type:"Element"},{name:"key",type:"String"}]},{added:"1.4",arg:[{name:'element',type:'Element'}]}],"jQuery.dequeue":[{added:"1.3",arg:[{name:"queueName",type:"String",optional:true}]}],"jQuery.queue":[{added:"1.3",arg:[{type:'Element',name:'elem'},{name:"queueName",type:"String",optional:true}]},{added:"1.3",arg:[{type:'Element',name:'elem'},{name:"queueName",type:"String",optional:true},{name:"newQueue",type:"Array"}]},{added:"1.3",arg:[{type:'Element',name:'elem'},{name:"queueName",type:"String",optional:true},{name:"callback()",type:"Function"}]}],clearQueue:[{added:"1.4",arg:[{name:"queueName",type:"String",optional:true}]}],toArray:[{added:"1.4"}],"jQuery.isEmptyObject":[{added:"1.4",arg:[{name:"object",type:"Object"}]}],"jQuery.isPlainObject":[{added:"1.4",arg:[{name:"object",type:"Object"}]}],keydown:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],index:[{added:"1.4"},{added:"1.4",arg:[{name:"selector",type:"Selector"}]},{added:"1.0",arg:[{name:"element",type:"Element, jQuery"}]}],removeData:[{added:"1.2.3",arg:[{name:"name",type:"String",optional:true}]}],data:[{added:"1.2.3",arg:[{name:"key",type:"String"},{name:"value",type:"*"}]},{added:"1.4",arg:[{name:"obj",type:"Object"}]},{added:"1.2.3",arg:[{name:"key",type:"String"}]},{added:"1.4"}],get:[{added:"1.0",arg:[{name:"index",type:"Number",optional:true}]}],size:[{added:"1.0"}],"jQuery.noConflict":[{added:"1.0",arg:[{name:"removeAll",type:"Boolean",optional:true}]}],selected:[{added:"1.0"}],checked:[{added:"1.0"}],disabled:[{added:"1.0"}],enabled:[{added:"1.0"}],file:[{added:"1.0"}],button:[{added:"1.0"}],reset:[{added:"1.0"}],image:[{added:"1.0"}],submit:[{added:"1.0"},{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],checkbox:[{added:"1.0"}],radio:[{added:"1.0"}],password:[{added:"1.0"}],text:[{added:"1.0"},{added:"1.0"},{added:"1.0",arg:[{name:"textString",type:"String"}]},{added:"1.4",arg:[{name:"function(index, text)",type:"Function"}]}],input:[{added:"1.0"}],"only-child":[{added:"1.1.4"}],"last-child":[{added:"1.1.4"}],"first-child":[{added:"1.1.4"}],"nth-child":[{added:"1.1.4",arg:[{name:"index",type:"Number/String"}]}],attributeContainsPrefix:[{added:"1.0",arg:[{name:"attribute",type:"String"},{name:"value",type:"String"}]}],attributeContainsWord:[{added:"1.0",arg:[{name:"attribute",type:"String"},{name:"value",type:"String"}]}],attributeMultiple:[{added:"1.0",arg:[{name:"attributeFilter1",type:"Selector"},{name:"attributeFilter2",type:"Selector"},{name:"attributeFilterN",type:"Selector",optional:true}]}],attributeContains:[{added:"1.0",arg:[{name:"attribute",type:"String"},{name:"value",type:"String"}]}],attributeEndsWith:[{added:"1.0",arg:[{name:"attribute",type:"String"},{name:"value",type:"String"}]}],attributeStartsWith:[{added:"1.0",arg:[{name:"attribute",type:"String"},{name:"value",type:"String"}]}],attributeNotEqual:[{added:"1.0",arg:[{name:"attribute",type:"String"},{name:"value",type:"String"}]}],attributeEquals:[{added:"1.0",arg:[{name:"attribute",type:"String"},{name:"value",type:"String"}]}],attributeHas:[{added:"1.0",arg:[{name:"attribute",type:"String"}]}],visible:[{added:"1.0"}],hidden:[{added:"1.0"}],parent:[{added:"1.0"},{added:"1.0",arg:[{name:"selector",type:"Selector",optional:true}]}],empty:[{added:"1.0"},{added:"1.0"}],contains:[{added:"1.1.4"}],animated:[{added:"1.2"}],header:[{added:"1.2"}],lt:[{added:"1.0",arg:[{name:"index",type:"Number"}]}],gt:[{added:"1.0"}],eq:[{added:"1.0",arg:[{name:"index",type:"Number"}]},{added:"1.1.2",arg:[{name:"index",type:"Integer"}]}],odd:[{added:"1.0"}],even:[{added:"1.0"}],not:[{added:"1.0",arg:[{name:"selector",type:"Selector"}]},{added:"1.0",arg:[{name:"selector",type:"Selector"}]},{added:"1.0",arg:[{name:"elements",type:"Elements"}]},{added:"1.0",arg:[{name:"function(index)",type:"Function"}]}],last:[{added:"1.0"},{added:"1.2"}],first:[{added:"1.0"},{added:"1.2"}],"next siblings":[{added:"1.0",arg:[{name:"prev",type:"Selector"},{name:"siblings",type:"Selector"}]}],"next adjacent":[{added:"1.0",arg:[{name:"prev",type:"Selector"},{name:"next",type:"Selector"}]}],child:[{added:"1.0",arg:[{name:"parent",type:"Selector"},{name:"child",type:"Selector"}]}],descendant:[{added:"1.0",arg:[{name:"ancestor",type:"Selector"},{name:"descendant",type:"Selector"}]}],multiple:[{added:"1.0",arg:[{name:"selector1",type:"Selector"},{name:"selector2",type:"Selector"},{name:"selectorN",type:"Selector",optional:true}]}],all:[{added:"1.0"}],"class":[{added:"1.0",arg:[{name:"class",type:"String"}]}],element:[{added:"1.0",arg:[{name:"element",type:"String"}]}],id:[{added:"1.0",arg:[{name:"id",type:"String"}]}],scroll:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],resize:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],dequeue:[{added:"1.2",arg:[{name:"queueName",type:"String",optional:true}]}],queue:[{added:"1.2",arg:[{name:"queueName",type:"String",optional:true}]},{added:"1.2",arg:[{name:"queueName",type:"String",optional:true},{name:"newQueue",type:"Array"}]},{added:"1.2",arg:[{name:"queueName",type:"String",optional:true},{name:"callback( next )",type:"Function"}]}],keyup:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],keypress:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],select:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],change:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],blur:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],focus:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],mousemove:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],hover:[{added:"1.0",arg:[{name:"handlerIn(eventObject)",type:"Function"},{name:"handlerOut(eventObject)",type:"Function"}]},{added:'1.4',arg:[{name:'handlerInOut(eventObject)',type:'Function'}]}],mouseleave:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],mouseenter:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],mouseout:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],mouseover:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],dblclick:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],click:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],mouseup:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],mousedown:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0"}],error:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]}],unload:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]}],load:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"}]},{added:"1.0",arg:[{name:"url",type:"String"},{name:"data",type:"Map, String",optional:true},{name:"success(responseText, textStatus, XMLHttpRequest)",type:"Function",optional:true}]}],ready:[{added:"1.0",arg:[{name:"handler",type:"Function"}]}],die:[{added:"1.3",arg:[{name:"eventType",type:"String"},{name:"handler",type:"String",optional:true}]}],"jQuery.browser":[{added:"1.0"}],"jQuery.browser.version":[{added:"1.1.3"}],live:[{added:"1.3",arg:[{name:"eventType",type:"String"},{name:"handler",type:"Function"}]},{added:"1.4",arg:[{name:"eventType",type:"String"},{name:"eventData",type:"Object",optional:true},{name:"handler",type:"Function"}]}],triggerHandler:[{added:"1.2",arg:[{name:"eventType",type:"String"},{name:"extraParameters",type:"Array",optional:true}]}],trigger:[{added:"1.0",arg:[{name:"eventType",type:"String"},{name:"extraParameters",type:"Array",optional:true}]}],ajaxComplete:[{added:"1.0",arg:[{name:"handler(event, XMLHttpRequest, ajaxOptions)",type:"Function"}]}],one:[{added:"1.1",arg:[{name:"eventType",type:"String"},{name:"eventData",type:"notFunction",optional:true},{name:"handler(eventObject)",type:"Function"}]},{added:"1.4",arg:[{name:"events",type:"Object"}]}],serializeArray:[{added:"1.2"}],serialize:[{added:"1.0"}],"jQuery.ajaxSetup":[{added:"1.1",arg:[{name:"options",type:"Options"}]}],ajaxSuccess:[{added:"1.0",arg:[{name:"handler(event, XMLHttpRequest, ajaxOptions)",type:"Function"}]}],ajaxStop:[{added:"1.0",arg:[{name:"handler()",type:"Function"}]}],ajaxStart:[{added:"1.0",arg:[{name:"handler()",type:"Function"}]}],ajaxSend:[{added:"1.0",arg:[{name:"handler(event, XMLHttpRequest, ajaxOptions)",type:"Function"}]}],ajaxError:[{added:"1.0",arg:[{name:"handler(event, XMLHttpRequest, ajaxOptions, thrownError)",type:"Function"}]}],unbind:[{added:"1.0",arg:[{name:"eventType",type:"String"},{name:"handler(eventObject)",type:"Function",optional:true}]},{added:"1.4",arg:[{name:"events",type:"Object"}]}],bind:[{added:"1.0",arg:[{name:"eventType",type:"String"},{name:"eventData",type:"notFunction",optional:true},{name:"handler(eventObject)",type:"Function"}]},{added:"1.4",arg:[{name:"events",type:"Object"}]}],slice:[{added:"1.1.4",arg:[{name:"start",type:"Integer"},{name:'end',type:'Integer',optional:true}]},{added:"1.1.4",arg:[{name:"end",type:"Integer",optional:true}]}],jQuery:[{added:"1.0",arg:[{name:"selector",type:"selector"},{name:"context",type:"Element, jQuery",optional:true}]},{added:"1.0",arg:[{name:"element",type:"Element"}]},{added:"1.0",arg:[{name:"elementArray",type:"Array"}]},{added:"1.0",arg:[{name:"jQuery object",type:"Object"}]},{added:"1.4"},{added:"1.0",arg:[{name:"html",type:"String"},{name:"ownerDocument",type:"document",optional:true}]},{added:"1.4",arg:[{name:"html",type:"String"},{name:"props",type:"Object"}]},{added:"1.0",arg:[{name:"callback",type:"Function"}]}],stop:[{added:"1.2",arg:[{name:"clearQueue",type:"Boolean",optional:true},{name:"jumpToEnd",type:"Boolean",optional:true}]}],end:[{added:"1.0"}],andSelf:[{added:"1.2"}],siblings:[{added:"1.0",arg:[{name:"selector",type:"Selector",optional:true}]}],animate:[{added:"1.0",arg:[{name:"properties",type:"Options"},{name:"duration",type:"String,Number",optional:true},{name:"easing",type:"String",optional:true},{name:"callback",type:"Callback",optional:true}]},{added:"1.0",arg:[{name:"properties",type:"Options"},{name:"options",type:"Options"}]}],prevAll:[{added:"1.2",arg:[{name:"selector",type:"Selector",optional:true}]}],prev:[{added:"1.0",arg:[{name:"selector",type:"Selector",optional:true}]}],fadeTo:[{added:"1.0",arg:[{name:"duration",type:"String,Number"},{name:"opacity",type:"Number"},{name:"callback",type:"Callback",optional:true}]}],fadeOut:[{added:"1.0",arg:[{name:"duration",type:"String,Number",optional:true},{name:"callback",type:"Callback",optional:true}]}],parents:[{added:"1.0",arg:[{name:"selector",type:"Selector",optional:true}]}],fadeIn:[{added:"1.0",arg:[{name:"duration",type:"String,Number",optional:true},{name:"callback",type:"Callback",optional:true}]}],offsetParent:[{added:"1.26"}],slideToggle:[{added:"1.0",arg:[{name:"duration",type:"String,Number",optional:true},{name:"callback",type:"Callback",optional:true}]}],"jQuery.post":[{added:"1.0",arg:[{name:"url",type:"String"},{name:"data",type:"Map, String",optional:true},{name:"success(data, textStatus)",type:"Function",optional:true},{name:"dataType",type:"String",optional:true}]}],slideUp:[{added:"1.0",arg:[{name:"duration",type:"String,Number",optional:true},{name:"callback",type:"Callback",optional:true}]}],nextAll:[{added:"1.2",arg:[{name:"selector",type:"String",optional:true}]}],next:[{added:"1.0",arg:[{name:"selector",type:"Selector",optional:true}]}],slideDown:[{added:"1.0",arg:[{name:"duration",type:"String,Number",optional:true},{name:"callback",type:"Callback",optional:true}]}],find:[{added:"1.0",arg:[{name:"selector",type:"Selector"}]}],"jQuery.getScript":[{added:"1.0",arg:[{name:"url",type:"String"},{name:"success(data, textStatus)",type:"Function",optional:true}]}],contents:[{added:"1.2"}],closest:[{added:"1.3",arg:[{name:"selector",type:"Selector"}]},{added:"1.4",arg:[{name:"selector",type:"Selector"},{name:"context",type:"Element",optional:true}]},{added:"1.4",arg:[{name:"selectors",type:"Array"},{name:"context",type:"Element",optional:true}]}],"jQuery.getJSON":[{added:"1.0",arg:[{name:"url",type:"String"},{name:"data",type:"Map",optional:true},{name:"callback(data, textStatus)",type:"Function",optional:true}]}],"jQuery.get":[{added:"1.0",arg:[{name:"url",type:"String"},{name:"data",type:"Map, String",optional:true},{name:"callback(data, textStatus, XMLHttpRequest)",type:"Function",optional:true},{name:"dataType",type:"String",optional:true}]}],"jQuery.ajax":[{added:"1.0",arg:[{name:"settings",type:"Map"}]}],length:[{added:"1.0"}],children:[{added:"1.0",arg:[{name:"selector",type:"Selector",optional:true}]}],selector:[{added:"1.3"}],add:[{added:"1.0",arg:[{name:"selector",type:"Selector"}]},{added:"1.0",arg:[{name:"elements",type:"Elements"}]},{added:"1.0",arg:[{name:"html",type:"HTML"}]},{added:"1.4",arg:[{name:"selector",type:"Selector"},{name:"context",type:"Element"}]}],context:[{added:"1.3"}],outerWidth:[{added:"1.2.6",arg:[{name:"includeMargin",type:"Boolean",optional:true}]}],outerHeight:[{added:"1.2.6",arg:[{name:"includeMargin",type:"Boolean",optional:true}]}],toggle:[{added:"1.0",arg:[{name:"handler(eventObject)",type:"Function"},{name:"handler(eventObject)",type:"Function"},{name:"handler(eventObject)",type:"Function",optional:true}]},{added:"1.0",arg:[{name:"duration",type:"String,Number",optional:true},{name:"callback",type:"Callback",optional:true}]},{added:"1.3",arg:[{name:"showOrHide",type:"Boolean"}]}],innerWidth:[{added:"1.2.6"}],innerHeight:[{added:"1.2.6"}],"jQuery.param":[{added:"1.2",arg:[{name:"obj",type:"Array, Object"}]},{added:"1.4",arg:[{name:"obj",type:"Array, Object"},{name:"traditional",type:"Boolean"}]}],hide:[{added:"1.0"},{added:"1.0",arg:[{name:"duration",type:"String,Number"},{name:"callback",type:"",optional:true}]}],width:[{added:"1.0"},{added:"1.0",arg:[{name:"value",type:"String, Number"}]}],height:[{added:"1.0"},{added:"1.0",arg:[{name:"value",type:"String, Number"}]}],show:[{added:"1.0"},{added:"1.0",arg:[{name:"duration",type:"String,Number"},{name:"callback",type:"Callback",optional:true}]}],scrollLeft:[{added:"1.2.6"},{added:"1.2.6",arg:[{name:"value",type:"Number"}]}],"jQuery.trim":[{added:"1.0"}],"jQuery.isFunction":[{added:"1.2"}],"jQuery.isArray":[{added:"1.3",arg:[{name:"obj",type:"Object"}]}],"jQuery.unique":[{added:"1.1.3",arg:[{name:"array",type:"Array"}]}],"jQuery.merge":[{added:"1.0",arg:[{name:"first",type:"Array"},{name:"second",type:"Array"}]}],"jQuery.inArray":[{added:"1.2",arg:[{name:"value",type:"Any"},{name:"array",type:"Array"}]}],"jQuery.map":[{added:"1.0",arg:[{name:"array",type:"Array"},{name:"callback(elementOfArray, indexInArray)",type:"Function"}]}],"jQuery.makeArray":[{added:"1.2",arg:[{name:"obj",type:"Object"}]}],"jQuery.grep":[{added:"1.0",arg:[{name:"array",type:"Array"},{name:"function(elementOfArray, indexInArray)",type:"Function"},{name:"invert",type:"Boolean",optional:true}]}],"jQuery.extend":[{added:"1.0",arg:[{name:"target",type:"Object, Function"},{name:"object1",type:"Object",optional:true},{name:"objectN",type:"Object",optional:true}]},{added:"1.1.4",arg:[{name:"deep",type:"Boolean",optional:true},{name:"target",type:"Object, Function"},{name:"object1",type:"Object"},{name:"objectN",type:"Object",optional:true}]}],"jQuery.each":[{added:"1.0",arg:[{name:"object",type:"Object, Array"},{name:"callback(indexInArray, valueOfElement)",type:"Function"},{name:'args',type:'Array',optional:true}]}],"jQuery.boxModel":[{added:"1.0"}],scrollTop:[{added:"1.2.6"},{added:"1.2.6",arg:[{name:"value",type:"Number"}]}],"jQuery.support":[{added:"1.3"}],position:[{added:"1.2"}],offset:[{added:"1.2"},{added:"1.4",arg:[{name:"coordinates",type:"Object"}]},{added:"1.4",arg:[{name:"function(index, coords)",type:"Function"}]}],css:[{added:"1.0",arg:[{name:"propertyName",type:"String"}]},{added:"1.0",arg:[{name:"propertyName",type:"String"},{name:"value",type:"String, Number"}]},{added:"1.4",arg:[{name:"propertyName",type:"String"},{name:"function(index, value)",type:"Function"}]},{added:"1.0",arg:[{name:"map",type:"Map"}]}],unwrap:[{added:"1.4"}],detach:[{added:"1.4",arg:[{name:"selector",type:"Selector",optional:true}]}],clone:[{added:"1.0",arg:[{name:"withDataAndEvents",type:"Boolean",optional:true}]}],remove:[{added:"1.0",arg:[{name:"selector",type:"String",optional:true}]}],replaceAll:[{added:"1.2"}],replaceWith:[{added:"1.2",arg:[{name:"newContent",type:"String, Element, jQuery"}]},{added:"1.4",arg:[{name:"function",type:"Function"}]}],wrapInner:[{added:"1.2",arg:[{name:"wrappingElement",type:"String"}]},{added:"1.4",arg:[{name:"wrappingFunction",type:"Function"}]}],wrapAll:[{added:"1.2",arg:[{name:"wrappingElement",type:"String, Selector, Element, jQuery"}]}],wrap:[{added:"1.0",arg:[{name:"wrappingElement",type:"String, Selector, Element, jQuery"}]},{added:"1.4",arg:[{name:"wrappingFunction",type:"Function"}]}],insertBefore:[{added:"1.0",arg:[{name:"target",type:"Selector, Element, jQuery"}]}],before:[{added:"1.0",arg:[{name:"content",type:"String, Element, jQuery"}]},{added:"1.4",arg:[{name:"function",type:"Function"}]}],insertAfter:[{added:"1.0",arg:[{name:"target",type:"Selector, Element, jQuery"}]}],after:[{added:"1.0",arg:[{name:"content",type:"String, Element, jQuery"}]},{added:"1.4",arg:[{name:"function",type:"Function"}]}],prependTo:[{added:"1.0",arg:[{name:"target",type:"Selector, Element, jQuery"}]}],prepend:[{added:"1.0",arg:[{name:"content",type:"String, Element, jQuery",multiple:true}]},{added:"1.4",arg:[{name:"function(index, html)",type:"Function"}]}],appendTo:[{added:"1.0",arg:[{name:"target",type:"Selector, Element, jQuery"}]}],append:[{added:"1.0",arg:[{name:"content",type:"String, Element, jQuery",multiple:true}]},{added:"1.4",arg:[{name:"function(index, html)",type:"Function"}]}],val:[{added:"1.0"},{added:"1.0",arg:[{name:"value",type:"String"}]},{added:"1.4",arg:[{name:"function",type:"Function"}]}],html:[{added:"1.0"},{added:"1.0",arg:[{name:"htmlString",type:"String"}]},{added:"1.4",arg:[{name:"function(index, html)",type:"Function"}]}],map:[{added:"1.2",arg:[{name:"callback(index, domElement)",type:"Function"}]}],is:[{added:"1.0",arg:[{name:"selector",type:"Selector"}]}],filter:[{added:"1.0",arg:[{name:"selector",type:"Selector"}]},{added:"1.0",arg:[{name:"function(index)",type:"Function"}]}],toggleClass:[{added:"1.0",arg:[{name:"className",type:"String"}]},{added:"1.3",arg:[{name:"className",type:"String"},{name:"switch",type:"Boolean"}]},{added:"1.4",arg:[{name:"function(index, class)",type:"Function"},{name:"switch",type:"Boolean",optional:true}]}],removeClass:[{added:"1.0",arg:[{name:"className",type:"String",optional:true}]},{added:"1.4",arg:[{name:"function(index, class)",type:"Function"}]}],hasClass:[{added:"1.2",arg:[{name:"className",type:"String"}]}],removeAttr:[{added:"1.0",arg:[{name:"attributeName",type:"String"}]}],attr:[{added:"1.0",arg:[{name:"attributeName",type:"String"}]},{added:"1.0",arg:[{name:"attributeName",type:"String"},{name:"value",type:"*"}]},{added:"1.0",arg:[{name:"map",type:"Map"}]},{added:"1.1",arg:[{name:"attributeName",type:"String"},{name:"function(index, attr)",type:"Function"}]}],addClass:[{added:"1.0",arg:[{name:"className",type:"String"}]},{added:"1.4",arg:[{name:"function(index, class)",type:"Function"}]}]}
        },
        
        api = lint.api,
        
        // Only cover certain fns under the jQ namespace
        coveredNamespace = /^(getJSON|extend|ajax|get|post|proxy|each|map|queue|ajax|ajaxSetup|removeData|data|pushStack)$/,
    
        version = _jQuery.fn.jquery,
        map = _jQuery.map,
        each = _jQuery.each,
        extend = _jQuery.extend,
        find = _jQuery.find,
        
        undefined,
        
        arrSlice = Array.prototype.slice,
        slice = function(a,s,e) {
            return a.length ? arrSlice.call(a, s || 0, e || a.length) : [];
        },
        
        compare = function(a,b) {
            
            // Compare two arrays
            
            var i = a.length;
            
            if (a.length !== b.length) {
                return false;
            }
            
            while (i--) {
                if (a[i] !== b[i]) {
                    return false;
                }
            }
            
            return true;
        
        },
        
        isFunction = function(obj) {
            return toString.call(obj) === "[object Function]";
        },
        
        isArray = function(obj) {
            return toString.call(obj) === "[object Array]";   
        },
        
        toString = Object.prototype.toString,
        
        typeToString = function(o) {
            
            if (!o) { return ""; }
            
            if (typeof o === 'string') {
                return '"' + o.replace(/"/g,'\\"') + '"';
            }
            
            if (isFunction(o)) {
                return 'function(){...}';
            }
            
            return o.toString();
        },
        
        shaveArray = function(arr) {
            
            arr = slice(arr);
            
            // Shave "undefined" off the end of args
            for (var i = arr.length; i--;) {
                if (arr[i] === undefined) {
                    arr.splice(i, 1);
                } else {
                    break;
                }
            }
            return arr;
        },
        
        // Type map
        types = {
            '*': function() {
                return true;
            },
            selector: function(o) {
                return this.string(o);
            },
            element: function(o) {
                return o && (!!o.nodeName || o === window);
            },
            elements: function(o) {
                return this.element(o) || this.jquery(o) || this.array(o);
            },
            array: function(o) {
                // Just check that it's "array-like"
                return o && o.length !== undefined
                        && typeof o !== 'string' && !isFunction(o);
            },
            jquery: function(o) {
                return o instanceof _jQuery;
            },
            object: function(o) {
                return toString.call(o) === '[object Object]';
            },
            'function': function(o) {
                return isFunction(o);
            },
            notfunction: function(o) {
                return !this['function'](o);
            },
            callback: function(o) {
                return isFunction(o);
            },
            string: function(o) {
                return typeof o === 'string';
            },
            number: function(o) {
                return typeof o === 'number' && !isNaN(o);
            },
            integer: function(o) {
                return this.number(o) && ~~o === o;
            },
            map: function(o) {
                return this.object(o);
            },
            options: function(o) {
                return this.object(o);
            },
            'null': function(o) {
                return o === null;
            },
            'boolean': function(o) {
                return typeof o === 'boolean';
            }
        },
        
        selectorCache = {},
        jQueryMethods = extend({}, _jQuery.fn),
        internal = false,
        fromInit = false;
        
    function logLocation() {
        
        // Attempt to log line number of error
        
        try {
            throw new Error();
        } catch(e) {
            if (e.stack) {
                lint.console.groupCollapsed(lint.langs[lint.lang].location);
                lint.console.log(
                    e.stack
                        // Remove everything before the file name and line number
                        // plus, get rid of errors from jQuery.lint.js & any libs
                        // from google's CDN (not perfect but should narrow it down)
                        .replace(/^.+?\n|.+?(jquery\.lint\.js|http:\/\/ajax\.googleapis\.com).+?(\n|$)|.+?(?=@)/g, '')
                        // Remove duplicates
                        .replace(/(^|\n)(.+?)\n(?=\2(?:\n|$)|[\s\S]+?\n\2(?:\n|$))/g, '$1')
                );
                lint.console.groupEnd();
            }
        }
        
    }
            
    function isValidArgumentList(args, sig) {
        
        // Determine if argument list complies with
        // signature outlined in API.
        
        var matches = false,
            sigArg,
            argLength = args.length,
            nextIsOptional = false;
        
        if (version < sig.added) {
            // Too new
            return false;
        }
        
        if (!sig.arg) {
            return 0 === args.length;
        }
        
        if (!sig.arg[0] && (args.length > 1)) {
            return false;
        }
        
        for (
                var sigIndex = 0,
                    argIndex = 0,
                    fullLength = Math.max(argLength, sig.arg.length || 1);
                sigIndex < fullLength || argIndex < argLength;
                ++sigIndex
            ) {
            
            sigArg = sigIndex === 0 ? sig.arg[0] || sig.arg : sig.arg[sigIndex];
            
            if (!sigArg) {
                // Too many args
                return false;
            }
            
            matches = isValidType(sigArg.type, args[argIndex]);
            
            if (!matches) {
                if (sigArg.optional) {
                    if (args[argIndex] === undefined || args[argIndex] === null) {
                        ++argIndex;
                        matches = true;
                    }
                    continue;
                } else {
                    // Sig isn't optional
                    return false;
                }
            }
            
            if (sigArg.multiple) {
                
                // If it's multiple, then carry on with the same
                // signature, but check that there are remaining
                // arguments
                
                --sigIndex;
                if (argIndex + 1 >= argLength) {
                    break;
                }
            }
            
            ++argIndex;
            
        }
        
        return matches;
        
    }
    
    function isValidType(type, arg) {
        
        // Check that argument is of the right type
        // The types are specified within the API data
        
        var split = type.split(/,\s?/g),
            i = split.length,
            cur;
            
        if (arg === undefined) {
            return false;
        }
        
        while (i--) {
            cur = split[i].toLowerCase();
            if (types[cur] && types[cur](arg)) {
                return true;
            }
        }
            
        return false;
            
    }
    
    function runFunction(fn, args, isInternal, thisObj) {
        
        // Runs a function, while enabling/disabling
        // the 'internal' flag as necessary.
        
        var wasInternal = internal, ret;
        
        internal = isInternal;
        
        try {
            ret = fn.apply(thisObj, args);
        } catch(e) {
            internal = wasInternal;
            throw e;
        }
        
        internal = wasInternal;
        
        return ret;
        
    }
    
    function registerMethod(name, methodAPI) {
        
        var obj = /^jQuery\./.test(name) ? _jQuery : _jQuery.fn,
            methodName = name.replace(/^jQuery\./, '');
            
        obj[methodName] = (function(meth, name){
            return extend(function() {
                
                var args = slice(arguments),
                    _internal = internal;
                
                // Cover functions so that the internal flag
                // is disabled before they are called
                
                each(args, function(i, fn){
                    if (typeof fn == 'function') {
                        args[i] = function() {
                            // Run it as non-internal
                            return runFunction(fn, arguments, _internal, this);
                        };
                    }
                });
                
                return coverMethod.call(this, name, function(){
                    
                    // Run it as internal
                    return runFunction(meth, args, true, this);
                    
                }, args);
                
            }, meth);
        })(obj[methodName], name);
        
        if (methodAPI) {
            api[name] = methodAPI;
        }
        
    }
    
    lint.registerMethod = registerMethod;
    
    function coverMethod(name, meth, args) {
        
        args = shaveArray(args);
        
        var locale = lint.langs[lint.lang],
            sigs = api[name],
            _console = lint.console,
            self = this,
            i = 0,
            sig,
            specialCheckResults = (function(){
                
                // Perform special checks for current level and
                // all levels below current level.
                
                var lvl = lint.level + 1,
                    results = [],
                    check;
                    
                while (lvl--) {
                    if (checks[lvl] && (check = checks[lvl][name])) {
                        if (types.array(check)) {
                            each(check, function(i, chk){
                                results.push(
                                    chk.apply(self, args)
                                );
                            })
                        } else {
                            results.push(
                                check.apply(self, args)
                            );
                        }
                    }
                }
                
                return results;
                
            }()),
            signatureMatch = false,
            sliced = slice(this, 0, 10);
        
        if (!sigs || !lint.level || internal) {
            return meth.apply(this, args);
        }
        
        if (this.length > 10) {
            sliced.push('...');
        }
        
        // Check all arguments passed to method for compliance
        // against the corresponding signature.
        while ((sig = sigs[i++])) {
            if ( isValidArgumentList(args, sig) ) {
                signatureMatch = true;
                break;
            }
        }
        
        if (!signatureMatch) {
            
            // Args !== signature
            
            _console.warn(locale.incorrectCall.replace(/%0/, name));
            _console.groupCollapsed(locale.moreInfo);
                if (this instanceof _jQuery) {
                    _console.log(locale.collection, sliced);
                }
                logLocation();
                _console.log(locale.youPassed, args);
                _console.group(locale.availableSigsInclude);
                    each(sigs, function(i, sig){
                        if (version < sig.added) {
                            return;
                        }
                        var sigArgs = sig.arg;
                        _console.log(
                            name + '(' +
                            (sigArgs ?
                                 sigArgs[0] ?
                                    map(sigArgs, function(sig, i){
                                        return sig ? sig.optional ? '[' + sig.name + ']' : sig.multiple ? sig.name + ',[...]' : sig.name : [];
                                    }).join(', ') :
                                    sigArgs.name
                            : '') + ')'
                        );
                    });
                _console.groupEnd();
            _console.groupEnd();
            
        }
        
        if (specialCheckResults.length) {
            each(specialCheckResults, function(i, checkResult){
                if (checkResult && checkResult !== true) {
                    if (isFunction(checkResult)) {
                        checkResult(_console);
                    } else {
                        _console.warn(locale.specialCheckFailed.replace(/%0/, name));
                        _console.groupCollapsed(locale.moreInfo);
                            _console.log(checkResult);
                            _console.log(locale.collection, sliced);
                            logLocation();
                        _console.groupEnd();
                    }
                }
            });
        }
        
        if (lint.throwErrors) {
            return meth.apply(this, args);
        }
        
        try {
            return meth.apply(this, args);
        } catch(e) {
                
            _console.warn(
                locale.errorThrown.replace(/%0/, name), e
            );
            
            _console.groupCollapsed(locale.moreInfo);
            
                logLocation();
                _console.log(locale.youPassed, args);
                
            _console.groupEnd();
            
            return this;
        }
        
    }
    
    // "Cover" init constructor
    // Reports when no elements found, and when selector
    // used more than once to no effect.
    _jQuery.fn.init = (function(_init){
        
        return function(selector, context) {
            
            var locale = lint.langs[lint.lang],
                ret = coverMethod.call(this, 'jQuery', function(){
                    
                    return runFunction(function(){
                        return new _init(selector, context);
                    }, [], true, this)
                
                }, arguments),
                _console = lint.console;
                
            // Deal with situations where no elements are returned
            // and for the same selector being used more than once
            // to no effect
            
            if (!internal && typeof selector === 'string' && lint.level > 1) {
                
                if (ret[0]) {
                        
                    // Check for identical collection already in cache.
                    if ( lint.enabledReports.repeatSelector && selectorCache[selector] && compare(selectorCache[selector], ret) ) {
                        
                        _console.warn(locale.repeatSelector);
                        _console.groupCollapsed(locale.info);
                            logLocation();
                            _console.log(locale.selector + '"' + selector + '"');
                            _console.log(locale.selectorAdvice);
                        _console.groupEnd();
                        
                    }
                    
                } else {
                    
                    if (lint.enabledReports.noElementsFound) {
                        lint.console.warn(lint.langs[lint.lang].noElementsFound.replace(/%0/, selector));
                        logLocation();
                    }
                    
                }
                
                selectorCache[selector] = ret;
                
            }
            
            return ret;
        
        };
        
    })(_jQuery.fn.init);
    
    for (var i in _jQuery.fn) {
        
        if (i !== 'init' && isFunction(_jQuery.fn[i])) {
            registerMethod(i);
        }
        
    }
    
    for (var i in _jQuery) {
        
        if ( coveredNamespace.test(i) && isFunction(_jQuery[i]) ) {
            registerMethod('jQuery.' + i);
        }
        
    }
    
    _jQuery.LINT = lint;
    
    /////////////////////////
    // Some special checks //
    /////////////////////////
    
    addCheck('jQuery', 2, function(selector) {
        
        var locale = locale = lint.langs[lint.lang];
        
        // Find invalid filters (e.g. :hover, :active etc.)
        // suggested by Paul Irish
        
        if (!internal && lint.enabledReports.invalidFilters && typeof selector === 'string' && !/^[^<]*(<[\w\W]+>)[^>]*$/.test(selector)) {
            
            // It's a string, and NOT html - must be a selector
            
            var invalidFilters = [];
            
            selector.replace(/('|")(?:\\\1|[^\1])+?\1/g, '').replace(/:(\w+)/g, function(m, filter){
                if (!/^(contains|not)$/.test(filter) && !((filter in _jQuery.expr[':']) || (filter in _jQuery.expr.setFilters))) {
                    invalidFilters.push(m);
                }
            });
            
            if (invalidFilters.length) {
                return locale.invalidFilters.replace(/%0/, selector).replace(/%1/, invalidFilters.join('\n'));
            }
            
        }
        
    });
    
    addCheck('jQuery', 2, function() {
        
        // Set flag for ready() method, so we can check
        // for $().ready() - which should be $(document).ready()
        // suggested by Paul Irish
        
        if (!arguments.length) {
            this._lint_noArgs = true;
        }
        
    });
    
    addCheck('ready', 2, function(){
        
        // If _lint_noArgs is set then this object
        // was instantiated with no args. I.e. $().ready()
        
        if (this._lint_noArgs) {
            return lint.langs[lint.lang].badReadyCall;
        }
        
    });
    
    // Check for calls like css().css().css()
    // May as well use css({...})
    each(['css','attr','bind','one'], function(i, methodName){
        
        addCheck(methodName, 3, function(){
            
            var args = arguments,
                hoc = this,
                locale = lint.langs[lint.lang],
                sliced = slice(hoc, 0, 10),
                _console = lint.console;
            
            if (hoc.length > 10) {
                sliced.push('...');
            }
            
            if (
                !internal &&
                lint.level > 2 &&
                !types.object(args[0]) &&
                (
                    (/^(css|attr)$/.test(methodName) && args[1] !== undefined) ||
                    (/^(bind|one)$/.test(methodName) && version >= '1.4' && /* Data no passed as [1] */!isFunction(args[2]))
                )
               ) {
                
                if (this._lastMethodCalled === methodName) {
                    
                    _console.warn(locale.methodTwice.replace(/%0/, methodName));
                    
                    _console.groupCollapsed(locale.moreInfo);
                    
                        _console.log(locale.collection, sliced);
                        _console.log(args);
                        _console.log(
                            locale.combineCalls
                                .replace(/%0/, methodName)
                                .replace(/%1/, '{\n' +
                                    map([args, hoc._lastMethodArgs], function(a){
                                        return '  "' + a[0] + '": ' + typeToString(a[1]);
                                    }).join(',\n')
                                + '\n}')
                        );
                        
                    _console.groupEnd();
                    
                }
                
                hoc._lastMethodCalled = methodName;
                hoc._lastMethodArgs = args;
                
                setTimeout(function(){
                    hoc._lastMethodCalled = null;
                    hoc._lastMethodArgs = null;
                }, 0);
                
            }
        });
        
    });

    each(
        ['find', 'children', 'parent', 'parents',
         'next', 'nextAll', 'prev', 'prevAll',
         'first', 'last', 'closest', 'siblings',
         'parentsUntil', 'nextUntil', 'prevUntil'],
        function(i, methodName) {
            
            var pureMethod = jQueryMethods[methodName];
            
            addCheck(methodName, 2, function(selector){
                
                if ( !internal && lint.enabledReports.noElementsFound &&  !runFunction(pureMethod, arguments, true, this).length ) {
                    
                    if (types['function'](selector)) {
                        selector = '[FUNCTION]';
                    }
                    
                     lint.console.warn(lint.langs[lint.lang].noElementsFound.replace(/%0/, selector));
                     logLocation();
                    
                }
                
            });
            
        }
    )
   
})();
;
/*jslint eqeqeq: true, regexp: true */
/*global document, window, setInterval, clearInterval, handler, jQuery */

/*
 * Scrollbar - a jQuery plugin for custom scrollbars
 *
 * @author     Thomas Duerr, me@thomd.net
 * @date       03.2010
 * @requires   jquery v1.4.2 
 *
 *
 * Usage:
 *
 *    Append scrollbar to an arbitrary container with overflowed content:
 *
 *         $('selector').scrollbar();
 *
 *
 *    Append scrollbar without arrows on top/bottom:
 *
 *         $('selector').scrollbar({
 *            arrows: false
 *         });
 *
 *
 *
 * A vertical scrollbar is based on the following box model:
 *
 *    +----------------------------------|
 *    |            <----------------------------- content container
 *    |  +-----------------+  +------+   |
 *    |  |                 |  |   <-------------- handle arrow up
 *    |  |                 |  |      |   |
 *    |  |                 |  +------+   |
 *    |  |                 |  | +--+ |   |
 *    |  |                 |  | |  | |   |
 *    |  |                 | Â | | <-------------- handle
 *    |  |                 | Â | |  | |   |
 *    |  |                 | Â | |  | |   |
 *    |  |                 | Â | |  | |   |
 *    |  |                 | Â | +--+ |   |
 *    |  |                 | Â |      |   |
 *    |  |                 | Â |   <-------------- handle container
 *    |  |                 | Â |      |   |
 *    |  |         <----------------------------- pane
 *    |  |                 | Â |      |   |
 *    |  |                 | Â |      |   |
 *    |  |                 | Â +------+   |
 *    |  |                 | Â |      |   |
 *    |  |                 | Â |   <-------------- handle arrow down
 *    |  +-----------------+Â  +------+   |
 *    |                                  |
 *    +----------------------------------|
 *
 *
 */
(function($, document){

    $.fn.scrollbar = function(opts){

        // Extend default options
        var options = $.extend({}, $.fn.scrollbar.defaults, opts);

        
        //
        // append scrollbar to selected overflowed containers and return jquery object for chainability
        //
        return this.each(function(){

            var container = $(this), 
                props = {
                    arrows: options.arrows
                };

            // set new container height if explicitly set by an option
            if(options.containerHeight){
                container.height(options.containerHeight);
            }

            // determine container height
            props.containerHeight = container.height();

            // determine inner content height
            props.contentHeight = 0;
            container.children().each(function(){
                props.contentHeight += $(this).outerHeight();
            });

            // do nothing and return if a scrollbar is not neccessary
            if(props.contentHeight <= props.containerHeight){
                return true;
            }

            // create scrollbar
            var scrollbar = new $.fn.scrollbar.Scrollbar(container, props, options);
            return scrollbar;
        });
    };



    //
    // default options
    //
    $.fn.scrollbar.defaults = {
        containerHeight:   null,       // height of content container. If set to null, the current height before DOM manipulation is used
        
        arrows:            true,       // render up- and down-arrows
        handleMinHeight:   30,         // min-height of handle [px]
        
        scrollSpeed:       50,         // speed of handle while mousedown on arrows [milli sec]
        scrollStep:        20,         // handle increment between two mousedowns on arrows [px]
        
        scrollSpeedArrows: 40,         // speed of handle while mousedown within the handle container [milli sec]
        scrollStepArrows:  3           // handle increment between two mousedowns within the handle container [px]
    };



    //
    // Scrollbar class properties
    //
    $.fn.scrollbar.Scrollbar = function(container, props, options){

        // set object properties
        this.container = container;
        this.props =     props;
        this.opts =      options;
        this.mouse =     {};

        // disable arrows via class attribute 'no-arrows' on a container
        this.props.arrows = this.container.hasClass('no-arrows') ? false : this.props.arrows;

        // initialize
        this.buildHtml();
        this.initHandle();
        this.appendEvents();
    };

    //
    // Scrollbar class methods
    //
    $.fn.scrollbar.Scrollbar.prototype = {

        //
        // build DOM nodes for pane and scroll-handle
        //
        //   from:
        //
        //      <div class="scrollbar">                             --> arbitrary element with class="scrollbar"
        //          [...]
        //      </div>
        //
        //   to:
        //
        //      <div class="scrollbar">                             --> this.container
        //          <div class="scrollbar-pane">                    --> this.pane
        //              [...]
        //          </div>
        //          <div class="scrollbar-handle-container">        --> this.handleContainer
        //              <div class="scrollbar-handle"></div>        --> this.handle
        //          </div>
        //          <div class="scrollbar-handle-up"></div>         --> this.handleArrows
        //          <div class="scrollbar-handle-down"></div>       --> this.handleArrows
        //      </div>
        //
        //
        // TODO: use detach-transform-attach or DOMfragment
        //
        buildHtml: function(){

            // build some DOM nodes
            this.container.children().wrapAll('<div class="scrollbar-pane"/>');
            this.container.append('<div class="scrollbar-handle-container"><div class="scrollbar-handle"/></div>');
            if(this.props.arrows){
                this.container.append('<div class="scrollbar-handle-up"/>').append('<div class="scrollbar-handle-down"/>');
            }

            // save height of container to re-set it after some DOM manipulations
            var height = this.container.height();

            // set scrollbar-object properties
            this.pane =            this.container.find('.scrollbar-pane');
            this.handle =          this.container.find('.scrollbar-handle');
            this.handleContainer = this.container.find('.scrollbar-handle-container');
            this.handleArrows =    this.container.find('.scrollbar-handle-up, .scrollbar-handle-down');
            this.handleArrowUp =   this.container.find('.scrollbar-handle-up');
            this.handleArrowDown = this.container.find('.scrollbar-handle-down');

            // set some default CSS attributes (may be overwritten by CSS definitions)
            this.pane.defaultCss({
                'top':      0,
                'left':     0
            });
            this.handleContainer.defaultCss({
                'right':    0
            });
            this.handle.defaultCss({
                'top':      0,
                'right':    0
            });
            this.handleArrows.defaultCss({
                'right':    0
            });
            this.handleArrowUp.defaultCss({
                'top':      0
            });
            this.handleArrowDown.defaultCss({
                'bottom':   0
            });

            // set some necessary CSS attributes (can NOT be overwritten by CSS definitions)
            this.container.css({
                'position': this.container.css('position') === 'absolute' ? 'absolute' : 'relative',
                'overflow': 'hidden',
                'height':   height
            });
            this.pane.css({
                'position': 'absolute',
                'overflow': 'visible',
                'height':   'auto'
            });
            this.handleContainer.css({
                'position': 'absolute',
                'top':      this.handleArrowUp.outerHeight(true),
                'height':   (this.props.containerHeight - this.handleArrowUp.outerHeight(true) - this.handleArrowDown.outerHeight(true)) + 'px'
            });
            this.handle.css({
                'position': 'absolute',
                'cursor':   'pointer'
            });
            this.handleArrows.css({
                'position': 'absolute',
                'cursor':   'pointer'
            });            
        },


        //
        // append events on handle and handle-container
        //
        appendEvents: function(){

            // append drag-drop event on scrollbar-handle
            this.handle.bind('mousedown.handle', $.proxy(this, 'startOfHandleMove'));

            // append mousedown event on handle-container
            this.handleContainer.bind('mousedown.handle', $.proxy(this, 'onHandleContainerMousedown'));

            // append hover event on handle-container
            this.handleContainer.bind('mouseenter.container mouseleave.container', $.proxy(this, 'onHandleContainerHover'));

            // append click event on scrollbar-up- and scrollbar-down-handles
            this.handleArrows.bind('mousedown.arrows', $.proxy(this, 'onArrowsMousedown'));

            // append mousewheel event on content container
            this.container.bind('mousewheel.container', $.proxy(this, 'onMouseWheel'));

            // append hover event on content container
            this.container.bind('mouseenter.container mouseleave.container', $.proxy(this, 'onContentHover'));

            // do not bubble down click events into content container
            this.handle.bind('click.scrollbar', this.preventClickBubbling);
            this.handleContainer.bind('click.scrollbar', this.preventClickBubbling);
            this.handleArrows.bind('click.scrollbar', this.preventClickBubbling);
        },


        //
        // calculate height of handle (height of handle should indicate height of content related to content-container).
        //
        initHandle: function(){
            this.props.handleContainerHeight = this.handleContainer.height();

            // we need to calculate content-height again: due to the added scrollbar, the width decreased - hence the height increased!
            var contentHeight = 0;
            this.pane.children().each(function(){
                contentHeight += $(this).outerHeight(true);
            });
            this.props.contentHeight = contentHeight;

            // set height of handle proportionally
            this.props.handleHeight = Math.max(this.props.containerHeight * this.props.handleContainerHeight / this.props.contentHeight, this.opts.handleMinHeight);

            this.handle.height(this.props.handleHeight);
            this.handle.height(2 * this.handle.height() - this.handle.outerHeight(true));  // this is sort of setting outerHeight

            // set min- and max-range for handle
            this.props.handleTop = {
                min: 0,
                max: this.props.handleContainerHeight - this.props.handleHeight
            };

            // set ratio of handle-container to content-container (to calculate position of content related to position of handle)
            this.props.handleContentRatio = (this.props.contentHeight - this.props.containerHeight) / (this.props.handleContainerHeight - this.props.handleHeight);

            // set initial position of handle at top
            this.handle.top = 0;
        },


        //
        // get mouse position helper
        //
        mousePosition: function(ev) {
            return ev.pageY || (ev.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) || 0;
        },



        // ---------- event handler ---------------------------------------------------------------

        //
        // start moving of handle
        //
        startOfHandleMove: function(ev){
            ev.preventDefault();
            ev.stopPropagation();

            // set start position of mouse
            this.mouse.start = this.mousePosition(ev);

            // set start position of handle
            this.handle.start = this.handle.top;

            // bind mousemove- and mouseout-event on document (binding it to document allows having a mousepointer outside handle while moving)
            $(document).bind('mousemove.handle', $.proxy(this, 'onHandleMove')).bind('mouseup.handle', $.proxy(this, 'endOfHandleMove'));

            // add class for visual change while moving handle
            this.handle.addClass('move');
            this.handleContainer.addClass('move');
        },


        //
        // on moving of handle
        //
        onHandleMove: function(ev){
            ev.preventDefault();

            // calculate distance since last fireing of this handler
            var distance = this.mousePosition(ev) - this.mouse.start;

            // calculate new handle position
            this.handle.top = this.handle.start + distance;

            // update positions
            this.setHandlePosition();
            this.setContentPosition();
        },


        //
        // end moving of handle
        //
        endOfHandleMove: function(ev){

            // remove handle events (which were attached in the startOfHandleMove-method)
            $(document).unbind('.handle');

            // remove class for visual change 
            this.handle.removeClass('move');
            this.handleContainer.removeClass('move');
        },


        //
        // set position of handle
        //
        setHandlePosition: function(){

            // stay within range [handleTop.min, handleTop.max]
            this.handle.top = (this.handle.top > this.props.handleTop.max) ? this.props.handleTop.max : this.handle.top;
            this.handle.top = (this.handle.top < this.props.handleTop.min) ? this.props.handleTop.min : this.handle.top;

            this.handle[0].style.top = this.handle.top + 'px';
        },


        //
        // set position of content
        //
        setContentPosition: function(){

            // derive position of content from position of handle 
            this.pane.top = -1 * this.props.handleContentRatio * this.handle.top;

            this.pane[0].style.top = this.pane.top + 'px';
        },


        //
        // mouse wheel movement
        //
        onMouseWheel: function(ev, delta){

            // calculate new handle position
            this.handle.top -= delta;

            this.setHandlePosition();
            this.setContentPosition();

            // prevent default scrolling of the entire document if handle is within [min, max]-range
            if(this.handle.top > this.props.handleTop.min && this.handle.top < this.props.handleTop.max){
                ev.preventDefault();
            }
        },


        //
        // append click handler on handle-container (outside of handle itself) to click up and down the handle 
        //
        onHandleContainerMousedown: function(ev){
            ev.preventDefault();

            // do nothing if clicked on handle
            if(!$(ev.target).hasClass('scrollbar-handle-container')){
                return false;
            }

            // determine direction for handle movement (clicked above or below the handler?)
            this.handle.direction = (this.handle.offset().top < this.mousePosition(ev)) ? 1 : -1;

            // set incremental step of handle
            this.handle.step = this.opts.scrollStep;

            // stop handle movement on mouseup
            var that = this;
            $(document).bind('mouseup.handlecontainer', function(){
                clearInterval(timer);
                that.handle.unbind('mouseenter.handlecontainer');
                $(document).unbind('mouseup.handlecontainer');
            });

            // stop handle movement when mouse is over handle
            //
            // TODO: this event is fired by Firefox only. Damn!
            //       Right now, I do not know any workaround for this. Mayby I should solve this by collision-calculation of mousepointer and handle
            this.handle.bind('mouseenter.handlecontainer', function(){
                clearInterval(timer);
            });

            // repeat handle movement while mousedown
            var timer = setInterval($.proxy(this.moveHandle, this), this.opts.scrollSpeed);
        },


        //
        // append mousedown handler on handle-arrows
        //
        onArrowsMousedown: function(ev){
            ev.preventDefault();

            // determine direction for handle movement
            this.handle.direction = $(ev.target).hasClass('scrollbar-handle-up') ? -1 : 1;

            // set incremental step of handle
            this.handle.step = this.opts.scrollStepArrows;

            // add class for visual change while moving handle
            $(ev.target).addClass('move');

            // repeat handle movement while mousedown
            var timer = setInterval($.proxy(this.moveHandle, this), this.opts.scrollSpeedArrows);

            // stop handle movement on mouseup
            $(document).one('mouseup.arrows', function(){
                clearInterval(timer);
                $(ev.target).removeClass('move');
            });
        },
        
        
        //
        // move handle by a distinct step while click on arrows or handle-container 
        //
        moveHandle: function(){
            this.handle.top = (this.handle.direction === 1) ? Math.min(this.handle.top + this.handle.step, this.props.handleTop.max) : Math.max(this.handle.top - this.handle.step, this.props.handleTop.min);
            this.handle[0].style.top = this.handle.top + 'px';

            this.setContentPosition();
        },
        
        
        //
        // add class attribute on content while interacting with content
        //
        onContentHover: function(ev){
            if(ev.type === 'mouseenter'){
                this.container.addClass('hover');
                this.handleContainer.addClass('hover');
            } else {
                this.container.removeClass('hover');
                this.handleContainer.removeClass('hover');
            }
        },
        
        
        //
        // add class attribute on handle-container while hovering it
        //
        onHandleContainerHover: function(ev){
            if(ev.type === 'mouseenter'){
                this.handleArrows.addClass('hover');
            } else {
                this.handleArrows.removeClass('hover');
            }
        },
        
        
        //
        // do not bubble down to avoid triggering click events attached within the container
        //
        preventClickBubbling: function(ev){
            ev.stopPropagation();
        }
    };



    // ----- default css ---------------------------------------------------------------------

    $.fn.defaultCss = function(styles){

        // 'not-defined'-values
        var notdef = {
            'right':    'auto',
            'left':     'auto',
            'top':      'auto',
            'bottom':   'auto',
            'position': 'static'
        };

        // loop through all style definitions and check for a definition already set by css. 
        // if no definition is found, apply the default css definition
        return this.each(function(){
            var elem = $(this);
            for(var style in styles){
                if(elem.css(style) === notdef[style]){
                    elem.css(style, styles[style]);
                }
            }
        });
    };

    //
    // ----- mousewheel event ---------------------------------------------------------------------
    // based on jquery.mousewheel.js from Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
    //

    $.event.special.mousewheel = {

        setup: function(){
            if (this.addEventListener){
                this.addEventListener('mousewheel', $.fn.scrollbar.mouseWheelHandler, false);
                this.addEventListener('DOMMouseScroll', $.fn.scrollbar.mouseWheelHandler, false);
            } else {
                this.onmousewheel = $.fn.scrollbar.mouseWheelHandler;
            }
        },

        teardown: function(){
            if (this.removeEventListener){
                this.removeEventListener('mousewheel', $.fn.scrollbar.mouseWheelHandler, false);
                this.removeEventListener('DOMMouseScroll', $.fn.scrollbar.mouseWheelHandler, false);
            } else {
                this.onmousewheel = null;
            }
        }
    };


    $.fn.extend({
        mousewheel: function(fn){
            return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
        },

        unmousewheel: function(fn){
            return this.unbind("mousewheel", fn);
        }
    });


    $.fn.scrollbar.mouseWheelHandler = function(event) {
        var orgEvent = event || window.event,
            args = [].slice.call(arguments, 1),
            delta = 0,
            returnValue = true,
            deltaX = 0,
            deltaY = 0;

        event = $.event.fix(orgEvent);
        event.type = "mousewheel";

        // Old school scrollwheel delta
        if(event.wheelDelta){
            delta = event.wheelDelta / 120;
        }
        if(event.detail){
            delta = -event.detail / 3;
        }

        // Gecko
        if(orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS){
            deltaY = 0;
            deltaX = -1 * delta;
        }

        // Webkit
        if(orgEvent.wheelDeltaY !== undefined){
            deltaY = orgEvent.wheelDeltaY / 120;
        }
        if(orgEvent.wheelDeltaX !== undefined){
            deltaX = -1 * orgEvent.wheelDeltaX / 120;
        }

        // Add event and delta to the front of the arguments
        args.unshift(event, delta, deltaX, deltaY);

        return $.event.handle.apply(this, args);
    };
})(jQuery, document);  // inject global jQuery object
;
(function ($) {$(function(){
        $('.css-scrollbar').scrollbar();
        $('.fff').scrollbar();
      }) })(jQuery);;
/* idTabs ~ Sean Catchpole - Version 2.2 - MIT/GPL */
(function(){var dep={"jQuery":"http://code.jquery.com/jquery-latest.min.js"};var init=function(){(function($){$.fn.idTabs=function(){var s={};for(var i=0;i<arguments.length;++i){var a=arguments[i];switch(a.constructor){case Object:$.extend(s,a);break;case Boolean:s.change=a;break;case Number:s.start=a;break;case Function:s.click=a;break;case String:if(a.charAt(0)=='.')s.selected=a;else if(a.charAt(0)=='!')s.event=a;else s.start=a;break;}}
if(typeof s['return']=="function")
s.change=s['return'];return this.each(function(){$.idTabs(this,s);});}
$.idTabs=function(tabs,options){var meta=($.metadata)?$(tabs).metadata():{};var s=$.extend({},$.idTabs.settings,meta,options);if(s.selected.charAt(0)=='.')s.selected=s.selected.substr(1);if(s.event.charAt(0)=='!')s.event=s.event.substr(1);if(s.start==null)s.start=-1;var showId=function(){if($(this).is('.'+s.selected))
return s.change;var id="#"+this.href.split('#')[1];var aList=[];var idList=[];$("a",tabs).each(function(){if(this.href.match(/#/)){aList.push(this);idList.push("#"+this.href.split('#')[1]);}});if(s.click&&!s.click.apply(this,[id,idList,tabs,s]))return s.change;for(i in aList)$(aList[i]).removeClass(s.selected);for(i in idList)$(idList[i]).hide();$(this).addClass(s.selected);$(id).show();return s.change;}
var list=$("a[href*='#']",tabs).unbind(s.event,showId).bind(s.event,showId);list.each(function(){$("#"+this.href.split('#')[1]).hide();});var test=false;if((test=list.filter('.'+s.selected)).length);else if(typeof s.start=="number"&&(test=list.eq(s.start)).length);else if(typeof s.start=="string"&&(test=list.filter("[href*='#"+s.start+"']")).length);if(test){test.removeClass(s.selected);test.trigger(s.event);}
return s;}
$.idTabs.settings={start:0,change:false,click:null,selected:".selected",event:"!click"};$.idTabs.version="2.2";$(function(){$(".idTabs").idTabs();});})(jQuery);}
var check=function(o,s){s=s.split('.');while(o&&s.length)o=o[s.shift()];return o;}
var head=document.getElementsByTagName("head")[0];var add=function(url){var s=document.createElement("script");s.type="text/javascript";s.src=url;head.appendChild(s);}
var s=document.getElementsByTagName('script');var src=s[s.length-1].src;var ok=true;for(d in dep){if(check(this,d))continue;ok=false;add(dep[d]);}if(ok)return init();add(src);})();
;
// JavaScript Document
(function ($) { $(document).ready(function(){

	$("a.switch_thumb").toggle(function(){      
	  $("ul.display").fadeOut("fast", function() {
	  	$(this).fadeIn("fast").removeClass("thumb_view");
		$("a.switch_thumb").removeClass("swap");
		});
	  }, function () {
	  $("ul.display").fadeOut("fast", function() {
	  	$(this).fadeIn("fast").addClass("thumb_view");
		$("a.switch_thumb").addClass("swap"); 
	  });
	}); 

	$("a.switch_thumb1").toggle(function(){      
	  $("ul.display1").fadeOut("fast", function() {
	  	$(this).fadeIn("fast").removeClass("thumb_view");
		$("a.switch_thumb1").removeClass("swap");
		});
	  }, function () {
	  $("ul.display1").fadeOut("fast", function() {
	  	$(this).fadeIn("fast").addClass("thumb_view");
		$("a.switch_thumb1").addClass("swap"); 
	  });
	}); 

}); })(jQuery);;
/*
------------------------------------------------------------------------
TABS SCRIPT
------------------------------------------------------------------------
 
*/

var menuscript={
	disabletablinks: false, ////Disable hyperlinks in 1st level tabs with sub contents (true or false)?
	currentpageurl: window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, ""), //get current page url 

definemenu:function(tabid, dselected){
	this[tabid+"-menuitems"]=null
	this.addEvent(window, function(){menuscript.init(tabid, dselected)}, "load")
},

showsubmenu:function(tabid, targetitem){
	var menuitems=this[tabid+"-menuitems"]
 for (i=0; i<menuitems.length; i++){
		menuitems[i].className=""
		if (typeof menuitems[i].hasSubContent!="undefined")
			document.getElementById(menuitems[i].getAttribute("rel")).style.display="none"
	}
	targetitem.className="current"
	if (typeof targetitem.hasSubContent!="undefined")
		document.getElementById(targetitem.getAttribute("rel")).style.display="block"
},

isSelected:function(menuurl){
	var menuurl=menuurl.replace("http://"+menuurl.hostname, "").replace(/^\//, "")
	return (menuscript.currentpageurl==menuurl)
},

addEvent:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
},

init:function(tabid, dselected){
	var menuitems=document.getElementById(tabid).getElementsByTagName("a")
	this[tabid+"-menuitems"]=menuitems
	for (var x=0; x<menuitems.length; x++){
		if (menuitems[x].getAttribute("rel")){
			this[tabid+"-menuitems"][x].hasSubContent=true
			if (menuscript.disabletablinks)
				menuitems[x].onclick=function(){return false}
		}
		else //for items without a submenu, add onMouseout effect
			menuitems[x].onmouseout=function(){this.className=""}
		menuitems[x].onclick=function(){menuscript.showsubmenu(tabid, this)}
		if (dselected=="auto" && typeof setalready=="undefined" && this.isSelected(menuitems[x].href)){
			menuscript.showsubmenu(tabid, menuitems[x])
			var setalready=true
		}
		else if (parseInt(dselected)==x)
			menuscript.showsubmenu(tabid, menuitems[x])
	}
}
}
menuscript.definemenu("tab_menu", 0);
/*!
 * Copyright (c) 2011 Simo Kinnunen.
 * Licensed under the MIT license.
 *
 * @version ${Version}
 */

var Cufon = (function() {

	var api = function() {
		return api.replace.apply(null, arguments);
	};

	var DOM = api.DOM = {

		ready: (function() {

			var complete = false, readyStatus = { loaded: 1, complete: 1 };

			var queue = [], perform = function() {
				if (complete) return;
				complete = true;
				for (var fn; fn = queue.shift(); fn());
			};

			// Gecko, Opera, WebKit r26101+

			if (document.addEventListener) {
				document.addEventListener('DOMContentLoaded', perform, false);
				window.addEventListener('pageshow', perform, false); // For cached Gecko pages
			}

			// Old WebKit, Internet Explorer

			if (!window.opera && document.readyState) (function() {
				readyStatus[document.readyState] ? perform() : setTimeout(arguments.callee, 10);
			})();

			// Internet Explorer

			if (document.readyState && document.createStyleSheet) (function() {
				try {
					document.body.doScroll('left');
					perform();
				}
				catch (e) {
					setTimeout(arguments.callee, 1);
				}
			})();

			addEvent(window, 'load', perform); // Fallback

			return function(listener) {
				if (!arguments.length) perform();
				else complete ? listener() : queue.push(listener);
			};

		})(),

		root: function() {
			return document.documentElement || document.body;
		},

		strict: (function() {
			var doctype;
			// no doctype (doesn't always catch it though.. IE I'm looking at you)
			if (document.compatMode == 'BackCompat') return false;
			// WebKit, Gecko, Opera, IE9+
			doctype = document.doctype;
			if (doctype) {
				return !/frameset|transitional/i.test(doctype.publicId);
			}
			// IE<9, firstChild is the doctype even if there's an XML declaration
			doctype = document.firstChild;
			if (doctype.nodeType != 8 || /^DOCTYPE.+(transitional|frameset)/i.test(doctype.data)) {
				return false;
			}
			return true;
		})()

	};

	var CSS = api.CSS = {

		Size: function(value, base) {

			this.value = parseFloat(value);
			this.unit = String(value).match(/[a-z%]*$/)[0] || 'px';

			this.convert = function(value) {
				return value / base * this.value;
			};

			this.convertFrom = function(value) {
				return value / this.value * base;
			};

			this.toString = function() {
				return this.value + this.unit;
			};

		},

		addClass: function(el, className) {
			var current = el.className;
			el.className = current + (current && ' ') + className;
			return el;
		},

		color: cached(function(value) {
			var parsed = {};
			parsed.color = value.replace(/^rgba\((.*?),\s*([\d.]+)\)/, function($0, $1, $2) {
				parsed.opacity = parseFloat($2);
				return 'rgb(' + $1 + ')';
			});
			return parsed;
		}),

		// has no direct CSS equivalent.
		// @see http://msdn.microsoft.com/en-us/library/system.windows.fontstretches.aspx
		fontStretch: cached(function(value) {
			if (typeof value == 'number') return value;
			if (/%$/.test(value)) return parseFloat(value) / 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
			}[value] || 1;
		}),

		getStyle: function(el) {
			var view = document.defaultView;
			if (view && view.getComputedStyle) return new Style(view.getComputedStyle(el, null));
			if (el.currentStyle) return new Style(el.currentStyle);
			return new Style(el.style);
		},

		gradient: cached(function(value) {
			var gradient = {
				id: value,
				type: value.match(/^-([a-z]+)-gradient\(/)[1],
				stops: []
			}, colors = value.substr(value.indexOf('(')).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);
			for (var i = 0, l = colors.length, stop; i < l; ++i) {
				stop = colors[i].split('=', 2).reverse();
				gradient.stops.push([ stop[1] || i / (l - 1), stop[0] ]);
			}
			return gradient;
		}),

		quotedList: cached(function(value) {
			// doesn't work properly with empty quoted strings (""), but
			// it's not worth the extra code.
			var list = [], re = /\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g, match;
			while (match = re.exec(value)) list.push(match[3] || match[1]);
			return list;
		}),

		recognizesMedia: cached(function(media) {
			var el = document.createElement('style'), sheet, container, supported;
			el.type = 'text/css';
			el.media = media;
			try { // this is cached anyway
				el.appendChild(document.createTextNode('/**/'));
			} catch (e) {}
			container = elementsByTagName('head')[0];
			container.insertBefore(el, container.firstChild);
			sheet = (el.sheet || el.styleSheet);
			supported = sheet && !sheet.disabled;
			container.removeChild(el);
			return supported;
		}),

		removeClass: function(el, className) {
			var re = RegExp('(?:^|\\s+)' + className +  '(?=\\s|$)', 'g');
			el.className = el.className.replace(re, '');
			return el;
		},

		supports: function(property, value) {
			var checker = document.createElement('span').style;
			if (checker[property] === undefined) return false;
			checker[property] = value;
			return checker[property] === value;
		},

		textAlign: function(word, style, position, wordCount) {
			if (style.get('textAlign') == 'right') {
				if (position > 0) word = ' ' + word;
			}
			else if (position < wordCount - 1) word += ' ';
			return word;
		},

		textShadow: cached(function(value) {
			if (value == 'none') return null;
			var shadows = [], currentShadow = {}, result, offCount = 0;
			var re = /(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;
			while (result = re.exec(value)) {
				if (result[0] == ',') {
					shadows.push(currentShadow);
					currentShadow = {};
					offCount = 0;
				}
				else if (result[1]) {
					currentShadow.color = result[1];
				}
				else {
					currentShadow[[ 'offX', 'offY', 'blur' ][offCount++]] = result[2];
				}
			}
			shadows.push(currentShadow);
			return shadows;
		}),

		textTransform: (function() {
			var map = {
				uppercase: function(s) {
					return s.toUpperCase();
				},
				lowercase: function(s) {
					return s.toLowerCase();
				},
				capitalize: function(s) {
					return s.replace(/(?:^|\s)./g, function($0) {
						return $0.toUpperCase();
					});
				}
			};
			return function(text, style) {
				var transform = map[style.get('textTransform')];
				return transform ? transform(text) : text;
			};
		})(),

		whiteSpace: (function() {
			var ignore = {
				inline: 1,
				'inline-block': 1,
				'run-in': 1
			};
			var wsStart = /^\s+/, wsEnd = /\s+$/;
			return function(text, style, node, previousElement, simple) {
				if (simple) return text.replace(wsStart, '').replace(wsEnd, ''); // @fixme too simple
				if (previousElement) {
					if (previousElement.nodeName.toLowerCase() == 'br') {
						text = text.replace(wsStart, '');
					}
				}
				if (ignore[style.get('display')]) return text;
				if (!node.previousSibling) text = text.replace(wsStart, '');
				if (!node.nextSibling) text = text.replace(wsEnd, '');
				return text;
			};
		})()

	};

	CSS.ready = (function() {

		// don't do anything in Safari 2 (it doesn't recognize any media type)
		var complete = !CSS.recognizesMedia('all'), hasLayout = false;

		var queue = [], perform = function() {
			complete = true;
			for (var fn; fn = queue.shift(); fn());
		};

		var links = elementsByTagName('link'), styles = elementsByTagName('style');

		var checkTypes = {
			'': 1,
			'text/css': 1
		};

		function isContainerReady(el) {
			if (!checkTypes[el.type.toLowerCase()]) return true;
			return el.disabled || isSheetReady(el.sheet, el.media || 'screen');
		}

		function isSheetReady(sheet, media) {
			// in Opera sheet.disabled is true when it's still loading,
			// even though link.disabled is false. they stay in sync if
			// set manually.
			if (!CSS.recognizesMedia(media || 'all')) return true;
			if (!sheet || sheet.disabled) return false;
			try {
				var rules = sheet.cssRules, rule;
				if (rules) {
					// needed for Safari 3 and Chrome 1.0.
					// in standards-conforming browsers cssRules contains @-rules.
					// Chrome 1.0 weirdness: rules[<number larger than .length - 1>]
					// returns the last rule, so a for loop is the only option.
					search: for (var i = 0, l = rules.length; rule = rules[i], i < l; ++i) {
						switch (rule.type) {
							case 2: // @charset
								break;
							case 3: // @import
								if (!isSheetReady(rule.styleSheet, rule.media.mediaText)) return false;
								break;
							default:
								// only @charset can precede @import
								break search;
						}
					}
				}
			}
			catch (e) {} // probably a style sheet from another domain
			return true;
		}

		function allStylesLoaded() {
			// Internet Explorer's style sheet model, there's no need to do anything
			if (document.createStyleSheet) return true;
			// standards-compliant browsers
			var el, i;
			for (i = 0; el = links[i]; ++i) {
				if (el.rel.toLowerCase() == 'stylesheet' && !isContainerReady(el)) return false;
			}
			for (i = 0; el = styles[i]; ++i) {
				if (!isContainerReady(el)) return false;
			}
			return true;
		}

		DOM.ready(function() {
			// getComputedStyle returns null in Gecko if used in an iframe with display: none
			if (!hasLayout) hasLayout = CSS.getStyle(document.body).isUsable();
			if (complete || (hasLayout && allStylesLoaded())) perform();
			else setTimeout(arguments.callee, 10);
		});

		return function(listener) {
			if (complete) listener();
			else queue.push(listener);
		};

	})();

	function Font(data) {

		var face = this.face = data.face, wordSeparators = {
			'\u0020': 1,
			'\u00a0': 1,
			'\u3000': 1
		};

		this.glyphs = (function(glyphs) {
			var key, fallbacks = {
				'\u2011': '\u002d',
				'\u00ad': '\u2011'
			};
			for (key in fallbacks) {
				if (!hasOwnProperty(fallbacks, key)) continue;
				if (!glyphs[key]) glyphs[key] = glyphs[fallbacks[key]];
			}
			return glyphs;
		})(data.glyphs);

		this.w = data.w;
		this.baseSize = parseInt(face['units-per-em'], 10);

		this.family = face['font-family'].toLowerCase();
		this.weight = face['font-weight'];
		this.style = face['font-style'] || 'normal';

		this.viewBox = (function () {
			var parts = face.bbox.split(/\s+/);
			var box = {
				minX: parseInt(parts[0], 10),
				minY: parseInt(parts[1], 10),
				maxX: parseInt(parts[2], 10),
				maxY: parseInt(parts[3], 10)
			};
			box.width = box.maxX - box.minX;
			box.height = box.maxY - box.minY;
			box.toString = function() {
				return [ this.minX, this.minY, this.width, this.height ].join(' ');
			};
			return box;
		})();

		this.ascent = -parseInt(face.ascent, 10);
		this.descent = -parseInt(face.descent, 10);

		this.height = -this.ascent + this.descent;

		this.spacing = function(chars, letterSpacing, wordSpacing) {
			var glyphs = this.glyphs, glyph,
				kerning, k,
				jumps = [],
				width = 0, w,
				i = -1, j = -1, chr;
			while (chr = chars[++i]) {
				glyph = glyphs[chr] || this.missingGlyph;
				if (!glyph) continue;
				if (kerning) {
					width -= k = kerning[chr] || 0;
					jumps[j] -= k;
				}
				w = glyph.w;
				if (isNaN(w)) w = +this.w; // may have been a String in old fonts
				if (w > 0) {
					w += letterSpacing;
					if (wordSeparators[chr]) w += wordSpacing;
				}
				width += jumps[++j] = ~~w; // get rid of decimals
				kerning = glyph.k;
			}
			jumps.total = width;
			return jumps;
		};

	}

	function FontFamily() {

		var styles = {}, mapping = {
			oblique: 'italic',
			italic: 'oblique'
		};

		this.add = function(font) {
			(styles[font.style] || (styles[font.style] = {}))[font.weight] = font;
		};

		this.get = function(style, weight) {
			var weights = styles[style] || styles[mapping[style]]
				|| styles.normal || styles.italic || styles.oblique;
			if (!weights) return null;
			// we don't have to worry about "bolder" and "lighter"
			// because IE's currentStyle returns a numeric value for it,
			// and other browsers use the computed value anyway
			weight = {
				normal: 400,
				bold: 700
			}[weight] || parseInt(weight, 10);
			if (weights[weight]) return weights[weight];
			// http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight
			// Gecko uses x99/x01 for lighter/bolder
			var up = {
				1: 1,
				99: 0
			}[weight % 100], alts = [], min, max;
			if (up === undefined) up = weight > 400;
			if (weight == 500) weight = 400;
			for (var alt in weights) {
				if (!hasOwnProperty(weights, alt)) continue;
				alt = parseInt(alt, 10);
				if (!min || alt < min) min = alt;
				if (!max || alt > max) max = alt;
				alts.push(alt);
			}
			if (weight < min) weight = min;
			if (weight > max) weight = max;
			alts.sort(function(a, b) {
				return (up
					? (a >= weight && b >= weight) ? a < b : a > b
					: (a <= weight && b <= weight) ? a > b : a < b) ? -1 : 1;
			});
			return weights[alts[0]];
		};

	}

	function HoverHandler() {

		function contains(node, anotherNode) {
			try {
				if (node.contains) return node.contains(anotherNode);
				return node.compareDocumentPosition(anotherNode) & 16;
			}
			catch(e) {} // probably a XUL element such as a scrollbar
			return false;
		}

		// mouseover/mouseout (standards) mode
		function onOverOut(e) {
			var related = e.relatedTarget;
			// there might be no relatedTarget if the element is right next
			// to the window frame
			if (related && contains(this, related)) return;
			trigger(this, e.type == 'mouseover');
		}

		// mouseenter/mouseleave (probably ie) mode
		function onEnterLeave(e) {
			if (!e) e = window.event;
			// ie model, we don't have access to "this", but
			// mouseenter/leave doesn't bubble so it's fine.
			trigger(e.target || e.srcElement, e.type == 'mouseenter');
		}

		function trigger(el, hoverState) {
			// A timeout is needed so that the event can actually "happen"
			// before replace is triggered. This ensures that styles are up
			// to date.
			setTimeout(function() {
				var options = sharedStorage.get(el).options;
				if (hoverState) {
					options = merge(options, options.hover);
					options._mediatorMode = 1;
				}
				api.replace(el, options, true);
			}, 10);
		}

		this.attach = function(el) {
			if (el.onmouseenter === undefined) {
				addEvent(el, 'mouseover', onOverOut);
				addEvent(el, 'mouseout', onOverOut);
			}
			else {
				addEvent(el, 'mouseenter', onEnterLeave);
				addEvent(el, 'mouseleave', onEnterLeave);
			}
		};

		this.detach = function(el) {
			if (el.onmouseenter === undefined) {
				removeEvent(el, 'mouseover', onOverOut);
				removeEvent(el, 'mouseout', onOverOut);
			}
			else {
				removeEvent(el, 'mouseenter', onEnterLeave);
				removeEvent(el, 'mouseleave', onEnterLeave);
			}
		};

	}

	function ReplaceHistory() {

		var list = [], map = {};

		function filter(keys) {
			var values = [], key;
			for (var i = 0; key = keys[i]; ++i) values[i] = list[map[key]];
			return values;
		}

		this.add = function(key, args) {
			map[key] = list.push(args) - 1;
		};

		this.repeat = function() {
			var snapshot = arguments.length ? filter(arguments) : list, args;
			for (var i = 0; args = snapshot[i++];) api.replace(args[0], args[1], true);
		};

	}

	function Storage() {

		var map = {}, at = 0;

		function identify(el) {
			return el.cufid || (el.cufid = ++at);
		}

		this.get = function(el) {
			var id = identify(el);
			return map[id] || (map[id] = {});
		};

	}

	function Style(style) {

		var custom = {}, sizes = {};

		this.extend = function(styles) {
			for (var property in styles) {
				if (hasOwnProperty(styles, property)) custom[property] = styles[property];
			}
			return this;
		};

		this.get = function(property) {
			return custom[property] != undefined ? custom[property] : style[property];
		};

		this.getSize = function(property, base) {
			return sizes[property] || (sizes[property] = new CSS.Size(this.get(property), base));
		};

		this.isUsable = function() {
			return !!style;
		};

	}

	function addEvent(el, type, listener) {
		if (el.addEventListener) {
			el.addEventListener(type, listener, false);
		}
		else if (el.attachEvent) {
			// we don't really need "this" right now, saves code
			el.attachEvent('on' + type, listener);
		}
	}

	function attach(el, options) {
		if (options._mediatorMode) return el;
		var storage = sharedStorage.get(el);
		var oldOptions = storage.options;
		if (oldOptions) {
			if (oldOptions === options) return el;
			if (oldOptions.hover) hoverHandler.detach(el);
		}
		if (options.hover && options.hoverables[el.nodeName.toLowerCase()]) {
			hoverHandler.attach(el);
		}
		storage.options = options;
		return el;
	}

	function cached(fun) {
		var cache = {};
		return function(key) {
			if (!hasOwnProperty(cache, key)) cache[key] = fun.apply(null, arguments);
			return cache[key];
		};
	}

	function getFont(el, style) {
		var families = CSS.quotedList(style.get('fontFamily').toLowerCase()), family;
		for (var i = 0; family = families[i]; ++i) {
			if (fonts[family]) return fonts[family].get(style.get('fontStyle'), style.get('fontWeight'));
		}
		return null;
	}

	function elementsByTagName(query) {
		return document.getElementsByTagName(query);
	}

	function hasOwnProperty(obj, property) {
		return obj.hasOwnProperty(property);
	}

	function merge() {
		var merged = {}, arg, key;
		for (var i = 0, l = arguments.length; arg = arguments[i], i < l; ++i) {
			for (key in arg) {
				if (hasOwnProperty(arg, key)) merged[key] = arg[key];
			}
		}
		return merged;
	}

	function process(font, text, style, options, node, el) {
		var fragment = document.createDocumentFragment(), processed;
		if (text === '') return fragment;
		var separate = options.separate;
		var parts = text.split(separators[separate]), needsAligning = (separate == 'words');
		if (needsAligning && HAS_BROKEN_REGEXP) {
			// @todo figure out a better way to do this
			if (/^\s/.test(text)) parts.unshift('');
			if (/\s$/.test(text)) parts.push('');
		}
		for (var i = 0, l = parts.length; i < l; ++i) {
			processed = engines[options.engine](font,
				needsAligning ? CSS.textAlign(parts[i], style, i, l) : parts[i],
				style, options, node, el, i < l - 1);
			if (processed) fragment.appendChild(processed);
		}
		return fragment;
	}

	function removeEvent(el, type, listener) {
		if (el.removeEventListener) {
			el.removeEventListener(type, listener, false);
		}
		else if (el.detachEvent) {
			el.detachEvent('on' + type, listener);
		}
	}

	function replaceElement(el, options) {
		var name = el.nodeName.toLowerCase();
		if (options.ignore[name]) return;
		if (options.ignoreClass && options.ignoreClass.test(el.className)) return;
		if (options.onBeforeReplace) options.onBeforeReplace(el, options);
		var replace = !options.textless[name], simple = (options.trim === 'simple');
		var style = CSS.getStyle(attach(el, options)).extend(options);
		// may cause issues if the element contains other elements
		// with larger fontSize, however such cases are rare and can
		// be fixed by using a more specific selector
		if (parseFloat(style.get('fontSize')) === 0) return;
		var font = getFont(el, style), node, type, next, anchor, text, lastElement;
		var isShy = options.softHyphens, anyShy = false, pos, shy, reShy = /\u00ad/g;
		var modifyText = options.modifyText;
		if (!font) return;
		for (node = el.firstChild; node; node = next) {
			type = node.nodeType;
			next = node.nextSibling;
			if (replace && type == 3) {
				if (isShy && el.nodeName.toLowerCase() != TAG_SHY) {
					pos = node.data.indexOf('\u00ad');
					if (pos >= 0) {
						node.splitText(pos);
						next = node.nextSibling;
						next.deleteData(0, 1);
						shy = document.createElement(TAG_SHY);
						shy.appendChild(document.createTextNode('\u00ad'));
						el.insertBefore(shy, next);
						next = shy;
						anyShy = true;
					}
				}
				// Node.normalize() is broken in IE 6, 7, 8
				if (anchor) {
					anchor.appendData(node.data);
					el.removeChild(node);
				}
				else anchor = node;
				if (next) continue;
			}
			if (anchor) {
				text = anchor.data;
				if (!isShy) text = text.replace(reShy, '');
				text = CSS.whiteSpace(text, style, anchor, lastElement, simple);
				// modify text only on the first replace
				if (modifyText) text = modifyText(text, anchor, el, options);
				el.replaceChild(process(font, text, style, options, node, el), anchor);
				anchor = null;
			}
			if (type == 1) {
				if (node.firstChild) {
					if (node.nodeName.toLowerCase() == 'cufon') {
						engines[options.engine](font, null, style, options, node, el);
					}
					else arguments.callee(node, options);
				}
				lastElement = node;
			}
		}
		if (isShy && anyShy) {
			updateShy(el);
			if (!trackingShy) addEvent(window, 'resize', updateShyOnResize);
			trackingShy = true;
		}
		if (options.onAfterReplace) options.onAfterReplace(el, options);
	}

	function updateShy(context) {
		var shys, shy, parent, glue, newGlue, next, prev, i;
		shys = context.getElementsByTagName(TAG_SHY);
		// unfortunately there doesn't seem to be any easy
		// way to avoid having to loop through the shys twice.
		for (i = 0; shy = shys[i]; ++i) {
			shy.className = C_SHY_DISABLED;
			glue = parent = shy.parentNode;
			if (glue.nodeName.toLowerCase() != TAG_GLUE) {
				newGlue = document.createElement(TAG_GLUE);
				newGlue.appendChild(shy.previousSibling);
				parent.insertBefore(newGlue, shy);
				newGlue.appendChild(shy);
			}
			else {
				// get rid of double glue (edge case fix)
				glue = glue.parentNode;
				if (glue.nodeName.toLowerCase() == TAG_GLUE) {
					parent = glue.parentNode;
					while (glue.firstChild) {
						parent.insertBefore(glue.firstChild, glue);
					}
					parent.removeChild(glue);
				}
			}
		}
		for (i = 0; shy = shys[i]; ++i) {
			shy.className = '';
			glue = shy.parentNode;
			parent = glue.parentNode;
			next = glue.nextSibling || parent.nextSibling;
			// make sure we're comparing same types
			prev = (next.nodeName.toLowerCase() == TAG_GLUE) ? glue : shy.previousSibling;
			if (prev.offsetTop >= next.offsetTop) {
				shy.className = C_SHY_DISABLED;
				if (prev.offsetTop < next.offsetTop) {
					// we have an annoying edge case, double the glue
					newGlue = document.createElement(TAG_GLUE);
					parent.insertBefore(newGlue, glue);
					newGlue.appendChild(glue);
					newGlue.appendChild(next);
				}
			}
		}
	}

	function updateShyOnResize() {
		if (ignoreResize) return; // needed for IE
		CSS.addClass(DOM.root(), C_VIEWPORT_RESIZING);
		clearTimeout(shyTimer);
		shyTimer = setTimeout(function() {
			ignoreResize = true;
			CSS.removeClass(DOM.root(), C_VIEWPORT_RESIZING);
			updateShy(document);
			ignoreResize = false;
		}, 100);
	}

	var HAS_BROKEN_REGEXP = ' '.split(/\s+/).length == 0;
	var TAG_GLUE = 'cufonglue';
	var TAG_SHY = 'cufonshy';
	var C_SHY_DISABLED = 'cufon-shy-disabled';
	var C_VIEWPORT_RESIZING = 'cufon-viewport-resizing';

	var sharedStorage = new Storage();
	var hoverHandler = new HoverHandler();
	var replaceHistory = new ReplaceHistory();
	var initialized = false;
	var trackingShy = false;
	var shyTimer;
	var ignoreResize = false;

	var engines = {}, fonts = {}, defaultOptions = {
		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,
			noscript: 1,
			optgroup: 1,
			option: 1,
			script: 1,
			select: 1,
			style: 1,
			textarea: 1,
			title: 1,
			pre: 1
		},
		ignoreClass: null,
		modifyText: null,
		onAfterReplace: null,
		onBeforeReplace: null,
		printable: true,
		selector: (
				window.Sizzle
			||	(window.jQuery && function(query) { return jQuery(query); }) // avoid noConflict issues
			||	(window.dojo && dojo.query)
			||	(window.glow && glow.dom && glow.dom.get)
			||	(window.Ext && Ext.query)
			||	(window.YAHOO && YAHOO.util && YAHOO.util.Selector && YAHOO.util.Selector.query)
			||	(window.$$ && function(query) { return $$(query); })
			||	(window.$ && function(query) { return $(query); })
			||	(document.querySelectorAll && function(query) { return document.querySelectorAll(query); })
			||	elementsByTagName
		),
		separate: 'words', // 'none' and 'characters' are also accepted
		softHyphens: true,
		textless: {
			dl: 1,
			html: 1,
			ol: 1,
			table: 1,
			tbody: 1,
			thead: 1,
			tfoot: 1,
			tr: 1,
			ul: 1
		},
		textShadow: 'none',
		trim: 'advanced'
	};

	var separators = {
		// The first pattern may cause unicode characters above
		// code point 255 to be removed in Safari 3.0. Luckily enough
		// Safari 3.0 does not include non-breaking spaces in \s, so
		// we can just use a simple alternative pattern.
		words: /\s/.test('\u00a0') ? /[^\S\u00a0]+/ : /\s+/,
		characters: '',
		none: /^/
	};

	api.now = function() {
		DOM.ready();
		return api;
	};

	api.refresh = function() {
		replaceHistory.repeat.apply(replaceHistory, arguments);
		return api;
	};

	api.registerEngine = function(id, engine) {
		if (!engine) return api;
		engines[id] = engine;
		return api.set('engine', id);
	};

	api.registerFont = function(data) {
		if (!data) return api;
		var font = new Font(data), family = font.family;
		if (!fonts[family]) fonts[family] = new FontFamily();
		fonts[family].add(font);
		return api.set('fontFamily', '"' + family + '"');
	};

	api.replace = function(elements, options, ignoreHistory) {
		options = merge(defaultOptions, options);
		if (!options.engine) return api; // there's no browser support so we'll just stop here
		if (!initialized) {
			CSS.addClass(DOM.root(), 'cufon-active cufon-loading');
			CSS.ready(function() {
				// fires before any replace() calls, but it doesn't really matter
				CSS.addClass(CSS.removeClass(DOM.root(), 'cufon-loading'), 'cufon-ready');
			});
			initialized = true;
		}
		if (options.hover) options.forceHitArea = true;
		if (options.autoDetect) delete options.fontFamily;
		if (typeof options.ignoreClass == 'string') {
			options.ignoreClass = new RegExp('(?:^|\\s)(?:' + options.ignoreClass.replace(/\s+/g, '|') + ')(?:\\s|$)');
		}
		if (typeof options.textShadow == 'string') {
			options.textShadow = CSS.textShadow(options.textShadow);
		}
		if (typeof options.color == 'string' && /^-/.test(options.color)) {
			options.textGradient = CSS.gradient(options.color);
		}
		else delete options.textGradient;
		if (typeof elements == 'string') {
			if (!ignoreHistory) replaceHistory.add(elements, arguments);
			elements = [ elements ];
		}
		else if (elements.nodeType) elements = [ elements ];
		CSS.ready(function() {
			for (var i = 0, l = elements.length; i < l; ++i) {
				var el = elements[i];
				if (typeof el == 'string') api.replace(options.selector(el), options, true);
				else replaceElement(el, options);
			}
		});
		return api;
	};

	api.set = function(option, value) {
		defaultOptions[option] = value;
		return api;
	};

	return api;

})();

Cufon.registerEngine('vml', (function() {

	var ns = document.namespaces;
	if (!ns) return;
	ns.add('cvml', 'urn:schemas-microsoft-com:vml');
	ns = null;

	var check = document.createElement('cvml:shape');
	check.style.behavior = 'url(#default#VML)';
	if (!check.coordsize) return; // VML isn't supported
	check = null;

	var HAS_BROKEN_LINEHEIGHT = (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:' +
			(HAS_BROKEN_LINEHEIGHT
				? 'middle'
				: 'text-bottom') +
			';}' +
			'cufon cufontext{position:absolute;left:-10000in;font-size:1px;text-align:left;}' +
			'cufonshy.cufon-shy-disabled,.cufon-viewport-resizing cufonshy{display:none;}' +
			'cufonglue{white-space:nowrap;display:inline-block;}' +
			'.cufon-viewport-resizing cufonglue{white-space:normal;}' +
			'a cufon{cursor:pointer}' + // ignore !important here
		'}' +
		'@media print{' +
			'cufon cufoncanvas{display:none;}' +
		'}' +
	'</style>').replace(/;/g, '!important;'));

	function getFontSizeInPixels(el, value) {
		return getSizeInPixels(el, /(?:em|ex|%)$|^[a-z-]+$/i.test(value) ? '1em' : value);
	}

	// Original by Dead Edwards.
	// Combined with getFontSizeInPixels it also works with relative units.
	function getSizeInPixels(el, value) {
		if (!isNaN(value) || /px$/i.test(value)) return parseFloat(value);
		var style = el.style.left, runtimeStyle = el.runtimeStyle.left;
		el.runtimeStyle.left = el.currentStyle.left;
		el.style.left = value.replace('%', 'em');
		var result = el.style.pixelLeft;
		el.style.left = style;
		el.runtimeStyle.left = runtimeStyle;
		return result;
	}

	function getSpacingValue(el, style, size, property) {
		var key = 'computed' + property, value = style[key];
		if (isNaN(value)) {
			value = style.get(property);
			style[key] = value = (value == 'normal') ? 0 : ~~size.convertFrom(getSizeInPixels(el, value));
		}
		return value;
	}

	var fills = {};

	function gradientFill(gradient) {
		var id = gradient.id;
		if (!fills[id]) {
			var stops = gradient.stops, fill = document.createElement('cvml:fill'), colors = [];
			fill.type = 'gradient';
			fill.angle = 180;
			fill.focus = '0';
			fill.method = 'none';
			fill.color = stops[0][1];
			for (var j = 1, k = stops.length - 1; j < k; ++j) {
				colors.push(stops[j][0] * 100 + '% ' + stops[j][1]);
			}
			fill.colors = colors.join(',');
			fill.color2 = stops[k][1];
			fills[id] = fill;
		}
		return fills[id];
	}

	return function(font, text, style, options, node, el, hasNext) {

		var redraw = (text === null);

		if (redraw) text = node.alt;

		var viewBox = font.viewBox;

		var size = style.computedFontSize || (style.computedFontSize = new Cufon.CSS.Size(getFontSizeInPixels(el, style.get('fontSize')) + 'px', font.baseSize));

		var wrapper, canvas;

		if (redraw) {
			wrapper = node;
			canvas = node.firstChild;
		}
		else {
			wrapper = document.createElement('cufon');
			wrapper.className = 'cufon cufon-vml';
			wrapper.alt = text;

			canvas = document.createElement('cufoncanvas');
			wrapper.appendChild(canvas);

			if (options.printable) {
				var print = document.createElement('cufontext');
				print.appendChild(document.createTextNode(text));
				wrapper.appendChild(print);
			}

			// ie6, for some reason, has trouble rendering the last VML element in the document.
			// we can work around this by injecting a dummy element where needed.
			// @todo find a better solution
			if (!hasNext) wrapper.appendChild(document.createElement('cvml:shape'));
		}

		var wStyle = wrapper.style;
		var cStyle = canvas.style;

		var height = size.convert(viewBox.height), roundedHeight = Math.ceil(height);
		var roundingFactor = roundedHeight / height;
		var stretchFactor = roundingFactor * Cufon.CSS.fontStretch(style.get('fontStretch'));
		var minX = viewBox.minX, minY = viewBox.minY;

		cStyle.height = roundedHeight;
		cStyle.top = Math.round(size.convert(minY - font.ascent));
		cStyle.left = Math.round(size.convert(minX));

		wStyle.height = size.convert(font.height) + 'px';

		var color = style.get('color');
		var chars = Cufon.CSS.textTransform(text, style).split('');

		var jumps = font.spacing(chars,
			getSpacingValue(el, style, size, 'letterSpacing'),
			getSpacingValue(el, style, size, 'wordSpacing')
		);

		if (!jumps.length) return null;

		var width = jumps.total;
		var fullWidth = -minX + width + (viewBox.width - jumps[jumps.length - 1]);

		var shapeWidth = size.convert(fullWidth * stretchFactor), roundedShapeWidth = Math.round(shapeWidth);

		var coordSize = fullWidth + ',' + viewBox.height, coordOrigin;
		var stretch = 'r' + coordSize + 'ns';

		var fill = options.textGradient && gradientFill(options.textGradient);

		var glyphs = font.glyphs, offsetX = 0;
		var shadows = options.textShadow;
		var i = -1, j = 0, chr;

		while (chr = chars[++i]) {

			var glyph = glyphs[chars[i]] || font.missingGlyph, shape;
			if (!glyph) continue;

			if (redraw) {
				// some glyphs may be missing so we can't use i
				shape = canvas.childNodes[j];
				while (shape.firstChild) shape.removeChild(shape.firstChild); // shadow, fill
			}
			else {
				shape = document.createElement('cvml:shape');
				canvas.appendChild(shape);
			}

			shape.stroked = 'f';
			shape.coordsize = coordSize;
			shape.coordorigin = coordOrigin = (minX - offsetX) + ',' + minY;
			shape.path = (glyph.d ? 'm' + glyph.d + 'xe' : '') + 'm' + coordOrigin + stretch;
			shape.fillcolor = color;

			if (fill) shape.appendChild(fill.cloneNode(false));

			// it's important to not set top/left or IE8 will grind to a halt
			var sStyle = shape.style;
			sStyle.width = roundedShapeWidth;
			sStyle.height = roundedHeight;

			if (shadows) {
				// due to the limitations of the VML shadow element there
				// can only be two visible shadows. opacity is shared
				// for all shadows.
				var shadow1 = shadows[0], shadow2 = shadows[1];
				var color1 = Cufon.CSS.color(shadow1.color), color2;
				var shadow = document.createElement('cvml:shadow');
				shadow.on = 't';
				shadow.color = color1.color;
				shadow.offset = shadow1.offX + ',' + shadow1.offY;
				if (shadow2) {
					color2 = Cufon.CSS.color(shadow2.color);
					shadow.type = 'double';
					shadow.color2 = color2.color;
					shadow.offset2 = shadow2.offX + ',' + shadow2.offY;
				}
				shadow.opacity = color1.opacity || (color2 && color2.opacity) || 1;
				shape.appendChild(shadow);
			}

			offsetX += jumps[j++];
		}

		// addresses flickering issues on :hover

		var cover = shape.nextSibling, coverFill, vStyle;

		if (options.forceHitArea) {

			if (!cover) {
				cover = document.createElement('cvml:rect');
				cover.stroked = 'f';
				cover.className = 'cufon-vml-cover';
				coverFill = document.createElement('cvml:fill');
				coverFill.opacity = 0;
				cover.appendChild(coverFill);
				canvas.appendChild(cover);
			}

			vStyle = cover.style;

			vStyle.width = roundedShapeWidth;
			vStyle.height = roundedHeight;

		}
		else if (cover) canvas.removeChild(cover);

		wStyle.width = Math.max(Math.ceil(size.convert(width * stretchFactor)), 0);

		if (HAS_BROKEN_LINEHEIGHT) {

			var yAdjust = style.computedYAdjust;

			if (yAdjust === undefined) {
				var lineHeight = style.get('lineHeight');
				if (lineHeight == 'normal') lineHeight = '1em';
				else if (!isNaN(lineHeight)) lineHeight += 'em'; // no unit
				style.computedYAdjust = yAdjust = 0.5 * (getSizeInPixels(el, lineHeight) - parseFloat(wStyle.height));
			}

			if (yAdjust) {
				wStyle.marginTop = Math.ceil(yAdjust) + 'px';
				wStyle.marginBottom = yAdjust + 'px';
			}

		}

		return wrapper;

	};

})());

Cufon.registerEngine('canvas', (function() {

	// Safari 2 doesn't support .apply() on native methods

	var check = document.createElement('canvas');
	if (!check || !check.getContext || !check.getContext.apply) return;
	check = null;

	var HAS_INLINE_BLOCK = Cufon.CSS.supports('display', 'inline-block');

	// Firefox 2 w/ non-strict doctype (almost standards mode)
	var HAS_BROKEN_LINEHEIGHT = !HAS_INLINE_BLOCK && (document.compatMode == 'BackCompat' || /frameset|transitional/i.test(document.doctype.publicId));

	var styleSheet = document.createElement('style');
	styleSheet.type = 'text/css';
	styleSheet.appendChild(document.createTextNode((
		'cufon{text-indent:0;}' +
		'@media screen,projection{' +
			'cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;' +
			(HAS_BROKEN_LINEHEIGHT
				? ''
				: 'font-size:1px;line-height:1px;') +
			'}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;text-align:left;text-indent:-10000in;}' +
			(HAS_INLINE_BLOCK
				? 'cufon canvas{position:relative;}'
				: 'cufon canvas{position:absolute;}') +
			'cufonshy.cufon-shy-disabled,.cufon-viewport-resizing cufonshy{display:none;}' +
			'cufonglue{white-space:nowrap;display:inline-block;}' +
			'.cufon-viewport-resizing cufonglue{white-space:normal;}' +
		'}' +
		'@media print{' +
			'cufon{padding:0;}' + // Firefox 2
			'cufon canvas{display:none;}' +
		'}'
	).replace(/;/g, '!important;')));
	document.getElementsByTagName('head')[0].appendChild(styleSheet);

	function generateFromVML(path, context) {
		var atX = 0, atY = 0;
		var code = [], re = /([mrvxe])([^a-z]*)/g, match;
		generate: for (var i = 0; match = re.exec(path); ++i) {
			var c = match[2].split(',');
			switch (match[1]) {
				case 'v':
					code[i] = { m: 'bezierCurveTo', a: [ atX + ~~c[0], atY + ~~c[1], atX + ~~c[2], atY + ~~c[3], atX += ~~c[4], atY += ~~c[5] ] };
					break;
				case 'r':
					code[i] = { m: 'lineTo', a: [ atX += ~~c[0], atY += ~~c[1] ] };
					break;
				case 'm':
					code[i] = { m: 'moveTo', a: [ atX = ~~c[0], atY = ~~c[1] ] };
					break;
				case 'x':
					code[i] = { m: 'closePath' };
					break;
				case 'e':
					break generate;
			}
			context[code[i].m].apply(context, code[i].a);
		}
		return code;
	}

	function interpret(code, context) {
		for (var i = 0, l = code.length; i < l; ++i) {
			var line = code[i];
			context[line.m].apply(context, line.a);
		}
	}

	return function(font, text, style, options, node, el) {

		var redraw = (text === null);

		if (redraw) text = node.getAttribute('alt');

		var viewBox = font.viewBox;

		var size = style.getSize('fontSize', font.baseSize);

		var expandTop = 0, expandRight = 0, expandBottom = 0, expandLeft = 0;
		var shadows = options.textShadow, shadowOffsets = [];
		if (shadows) {
			for (var i = shadows.length; i--;) {
				var shadow = shadows[i];
				var x = size.convertFrom(parseFloat(shadow.offX));
				var y = size.convertFrom(parseFloat(shadow.offY));
				shadowOffsets[i] = [ x, y ];
				if (y < expandTop) expandTop = y;
				if (x > expandRight) expandRight = x;
				if (y > expandBottom) expandBottom = y;
				if (x < expandLeft) expandLeft = x;
			}
		}

		var chars = Cufon.CSS.textTransform(text, style).split('');

		var jumps = font.spacing(chars,
			~~size.convertFrom(parseFloat(style.get('letterSpacing')) || 0),
			~~size.convertFrom(parseFloat(style.get('wordSpacing')) || 0)
		);

		if (!jumps.length) return null; // there's nothing to render

		var width = jumps.total;

		expandRight += viewBox.width - jumps[jumps.length - 1];
		expandLeft += viewBox.minX;

		var wrapper, canvas;

		if (redraw) {
			wrapper = node;
			canvas = node.firstChild;
		}
		else {
			wrapper = document.createElement('cufon');
			wrapper.className = 'cufon cufon-canvas';
			wrapper.setAttribute('alt', text);

			canvas = document.createElement('canvas');
			wrapper.appendChild(canvas);

			if (options.printable) {
				var print = document.createElement('cufontext');
				print.appendChild(document.createTextNode(text));
				wrapper.appendChild(print);
			}
		}

		var wStyle = wrapper.style;
		var cStyle = canvas.style;

		var height = size.convert(viewBox.height);
		var roundedHeight = Math.ceil(height);
		var roundingFactor = roundedHeight / height;
		var stretchFactor = roundingFactor * Cufon.CSS.fontStretch(style.get('fontStretch'));
		var stretchedWidth = width * stretchFactor;

		var canvasWidth = Math.ceil(size.convert(stretchedWidth + expandRight - expandLeft));
		var canvasHeight = Math.ceil(size.convert(viewBox.height - expandTop + expandBottom));

		canvas.width = canvasWidth;
		canvas.height = canvasHeight;

		// needed for WebKit and full page zoom
		cStyle.width = canvasWidth + 'px';
		cStyle.height = canvasHeight + 'px';

		// minY has no part in canvas.height
		expandTop += viewBox.minY;

		cStyle.top = Math.round(size.convert(expandTop - font.ascent)) + 'px';
		cStyle.left = Math.round(size.convert(expandLeft)) + 'px';

		var wrapperWidth = Math.max(Math.ceil(size.convert(stretchedWidth)), 0) + 'px';

		if (HAS_INLINE_BLOCK) {
			wStyle.width = wrapperWidth;
			wStyle.height = size.convert(font.height) + 'px';
		}
		else {
			wStyle.paddingLeft = wrapperWidth;
			wStyle.paddingBottom = (size.convert(font.height) - 1) + 'px';
		}

		var g = canvas.getContext('2d'), scale = height / viewBox.height;

		// proper horizontal scaling is performed later
		g.scale(scale, scale * roundingFactor);
		g.translate(-expandLeft, -expandTop);
		g.save();

		function renderText() {
			var glyphs = font.glyphs, glyph, i = -1, j = -1, chr;
			g.scale(stretchFactor, 1);
			while (chr = chars[++i]) {
				var glyph = glyphs[chars[i]] || font.missingGlyph;
				if (!glyph) continue;
				if (glyph.d) {
					g.beginPath();
					if (glyph.code) interpret(glyph.code, g);
					else glyph.code = generateFromVML('m' + glyph.d, g);
					g.fill();
				}
				g.translate(jumps[++j], 0);
			}
			g.restore();
		}

		if (shadows) {
			for (var i = shadows.length; i--;) {
				var shadow = shadows[i];
				g.save();
				g.fillStyle = shadow.color;
				g.translate.apply(g, shadowOffsets[i]);
				renderText();
			}
		}

		var gradient = options.textGradient;
		if (gradient) {
			var stops = gradient.stops, fill = g.createLinearGradient(0, viewBox.minY, 0, viewBox.maxY);
			for (var i = 0, l = stops.length; i < l; ++i) {
				fill.addColorStop.apply(fill, stops[i]);
			}
			g.fillStyle = fill;
		}
		else g.fillStyle = style.get('color');

		renderText();

		return wrapper;

	};

})());

;
Cufon.replace('h1, h2, h3, h4, h5, h6, .cufontxt');;
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Copyright © 2000, 2002 Adobe Systems Incorporated. All Rights Reserved. U.S.
 * Patent Des. pending.
 * 
 * Trademark:
 * Myriad is a registered trademark of Adobe Systems Incorporated.
 * 
 * Designer:
 * Robert Slimbach and Carol Twombly with Fred Brady and Christopher Slye
 * 
 * Vendor URL:
 * http://www.adobe.com/type
 * 
 * License information:
 * http://www.adobe.com/type/legal.html
 */
Cufon.registerFont({"w":206,"face":{"font-family":"Myriad Pro","font-weight":700,"font-stretch":"condensed","units-per-em":"400","panose-1":"2 11 7 3 3 4 3 2 2 4","ascent":"300","descent":"-100","x-height":"4","bbox":"-16 -339 325 100","underline-thickness":"20","underline-position":"-20","unicode-range":"U+0020-U+00FC"},"glyphs":{" ":{"w":75,"k":{"T":12,"V":12,"W":12,"Y":12}},"#":{"d":"33,0r11,-74r-32,0r0,-34r37,0r6,-46r-32,0r0,-34r37,0r10,-72r34,0r-10,72r34,0r10,-72r34,0r-10,72r31,0r0,34r-36,0r-6,46r32,0r0,34r-38,0r-10,74r-34,0r10,-74r-34,0r-10,74r-34,0xm117,-108r6,-46r-34,0r-6,46r34,0","w":205},"$":{"d":"171,-122v33,44,2,111,-51,115r0,42r-38,0r0,-39v-22,-1,-46,-7,-60,-15r11,-45v22,15,90,29,95,-10v-15,-51,-104,-38,-104,-109v0,-39,28,-61,62,-69r0,-39r37,0r0,36v23,1,38,5,53,12r-11,43v-20,-10,-83,-25,-83,11v0,37,77,38,89,67"},"%":{"d":"250,-125v-34,3,-33,94,0,97v33,-2,33,-94,0,-97xm251,-157v45,0,65,33,65,78v0,47,-21,82,-66,82v-44,0,-66,-34,-66,-78v0,-46,22,-82,67,-82xm73,4r147,-268r31,0r-147,268r-31,0xm76,-136v31,-2,32,-95,-1,-96v-33,3,-32,94,1,96xm10,-183v0,-46,22,-81,67,-81v45,0,64,34,64,78v0,47,-21,82,-66,82v-44,0,-65,-33,-65,-79","w":325},"&":{"d":"114,-236v-33,2,-26,52,-6,67v15,-12,28,-19,28,-41v0,-13,-6,-27,-22,-26xm85,-118v-39,24,-9,102,43,76v6,-3,10,-6,14,-10xm248,-152v-6,40,-20,75,-42,100r45,52r-66,0r-17,-19v-47,42,-157,26,-157,-53v0,-41,26,-60,49,-78v-41,-43,-15,-130,56,-124v40,3,68,21,69,63v1,39,-25,50,-51,72r43,52v10,-16,17,-42,20,-65r51,0","w":253},"(":{"d":"66,47v-60,-72,-59,-251,0,-323r41,0v-53,72,-53,250,0,323r-41,0","w":118,"k":{"T":-8,"V":-12,"W":-12,"Y":-15,"A":6,"\u00c1":6,"C":9,"G":9,"O":9,"Q":9,"\u00d3":9,"\u00d6":9,"J":-6,"X":-2,"j":-21}},")":{"d":"53,-276v59,71,58,251,0,323r-41,0v53,-73,54,-250,0,-323r41,0","w":118},"*":{"d":"143,-254r-41,50r61,-12r0,40v-20,-2,-44,-10,-62,-10r42,48r-35,20v-8,-19,-13,-42,-23,-60r-23,60r-33,-20v12,-17,33,-34,41,-50r-60,12r0,-40v19,3,42,11,60,11r-41,-49r35,-20v8,19,13,42,23,60r22,-60","w":173},"+":{"d":"138,-213r0,88r84,0r0,36r-84,0r0,89r-38,0r0,-89r-84,0r0,-36r84,0r0,-88r38,0","w":238},",":{"d":"2,48v11,-33,22,-74,28,-111r59,-4v-11,38,-31,82,-49,112","w":100,"k":{"'":45,"\"":45}},"-":{"d":"109,-126r0,39r-97,0r0,-39r97,0","w":121,"k":{"T":19,"V":7,"W":7,"Y":19,"A":2,"\u00c1":2,"C":-5,"G":-5,"O":-5,"Q":-5,"\u00d3":-5,"\u00d6":-5,"J":2,"X":5,"c":-7,"d":-7,"e":-7,"o":-7,"q":-7,"\u00e9":-7,"\u00f3":-7,"\u00f6":-7,"g":-2}},".":{"d":"54,4v-20,0,-34,-16,-34,-36v-1,-20,14,-37,34,-37v21,0,34,16,34,37v0,21,-13,37,-34,36","w":100,"k":{"'":45,"\"":45}},"\/":{"d":"2,16r88,-290r38,0r-88,290r-38,0","w":126},"0":{"d":"70,-130v0,45,3,88,34,88v22,0,32,-29,32,-88v-1,-44,-1,-83,-32,-88v-30,5,-34,43,-34,88xm103,4v-69,0,-91,-61,-91,-133v0,-71,21,-135,92,-135v71,0,91,62,91,133v0,74,-21,135,-92,135"},"1":{"d":"88,0r-1,-207r-48,23r-10,-44r67,-32r48,0r0,260r-56,0"},"2":{"d":"96,-264v81,0,106,84,66,141v-19,27,-44,51,-68,74r93,0r0,49r-172,0r0,-36r64,-65v21,-23,43,-41,45,-79v3,-49,-69,-41,-90,-18r-15,-42v18,-12,45,-24,77,-24"},"3":{"d":"184,-75v3,79,-108,96,-170,63r10,-44v27,18,102,24,100,-22v-1,-34,-32,-42,-71,-39r0,-42v32,1,62,-1,63,-31v1,-39,-62,-29,-83,-14r-11,-42v46,-29,157,-27,153,46v-1,32,-18,50,-44,60v30,8,52,29,53,65"},"4":{"d":"115,-106r1,-104v-16,37,-36,70,-55,104r54,0xm115,0r0,-62r-107,0r0,-38r94,-160r67,0r0,154r30,0r0,44r-30,0r0,62r-54,0"},"5":{"d":"25,-54v30,17,101,21,101,-29v0,-39,-50,-50,-98,-43r16,-134r133,0r0,48r-91,0r-6,43v61,-5,105,22,106,81v3,83,-100,112,-171,78"},"6":{"d":"69,-92v1,28,10,54,38,54v41,0,44,-96,-4,-93v-21,1,-35,13,-34,39xm11,-107v0,-101,56,-157,159,-156r0,45v-55,0,-90,21,-100,66v44,-42,133,-13,126,63v-5,56,-33,93,-89,93v-65,0,-96,-45,-96,-111"},"7":{"d":"190,-260r0,37r-100,223r-60,0r98,-211r-110,0r0,-49r172,0"},"8":{"d":"108,-158v30,-6,34,-67,-5,-67v-28,0,-38,37,-19,53v6,6,14,10,24,14xm104,-36v32,0,43,-44,22,-63v-7,-7,-16,-12,-27,-15v-37,6,-40,78,5,78xm106,-264v46,0,78,22,80,66v0,29,-17,45,-36,58v24,10,46,32,45,66v-2,53,-39,78,-93,78v-51,0,-89,-22,-90,-72v-1,-34,20,-54,44,-66v-20,-12,-36,-30,-36,-58v1,-50,37,-72,86,-72"},"9":{"d":"101,-222v-21,0,-33,22,-32,47v0,21,12,44,33,43v21,-1,34,-11,33,-35v-1,-28,-8,-55,-34,-55xm194,-154v0,104,-56,161,-160,157r0,-46v55,3,95,-23,100,-66v-43,41,-129,6,-123,-62v5,-55,35,-93,92,-93v62,0,91,45,91,110"},":":{"d":"54,4v-20,0,-34,-17,-34,-36v0,-19,14,-35,34,-35v20,0,34,14,34,35v0,20,-13,36,-34,36xm54,-126v-20,0,-34,-16,-34,-35v0,-19,14,-36,34,-36v20,0,35,15,34,36v0,20,-14,35,-34,35","w":100},";":{"d":"56,-126v-20,0,-34,-16,-34,-35v0,-19,14,-36,34,-36v20,0,35,15,34,36v0,20,-14,35,-34,35xm2,49v12,-33,23,-74,28,-112r59,-4v-12,37,-32,81,-49,112","w":100},"<":{"d":"23,-122r192,-91r0,42r-144,65r144,64r0,42r-192,-91r0,-31","w":238},"=":{"d":"16,-49r0,-36r206,0r0,36r-206,0xm16,-129r0,-36r206,0r0,36r-206,0","w":238},">":{"d":"215,-88r-192,88r0,-42r150,-65r-150,-64r0,-42r192,88r0,37","w":238},"?":{"d":"108,-31v-1,19,-14,35,-35,35v-20,0,-33,-16,-33,-35v0,-20,14,-35,34,-35v21,0,34,16,34,35xm93,-203v4,-31,-48,-27,-64,-14r-12,-42v48,-32,157,-13,132,67v-12,39,-53,52,-49,105r-51,0v-13,-46,39,-74,44,-116","w":164},"@":{"d":"46,-86v-5,87,81,126,153,91r7,21v-86,41,-193,-8,-188,-109v4,-91,54,-154,144,-154v69,0,112,43,112,112v0,55,-21,99,-72,99v-20,0,-31,-12,-32,-32r-2,0v-9,18,-25,31,-49,32v-26,0,-41,-22,-41,-51v0,-71,66,-113,134,-85r-12,74v-4,25,-1,37,10,37v30,0,36,-36,37,-71v0,-59,-32,-92,-90,-92v-72,0,-106,54,-111,128xm116,-81v-2,27,26,30,38,12v12,-17,14,-45,18,-71v-36,-9,-53,25,-56,59","w":290},"A":{"d":"143,-111r-27,-112r-26,112r53,0xm82,-67r-17,67r-59,0r75,-270r75,0r74,270r-61,0r-18,-67r-69,0","w":238,"k":{"T":29,"V":19,"W":19,"Y":30,"C":9,"G":9,"O":9,"Q":9,"\u00d3":9,"\u00d6":9,"J":-9,"X":6,"c":5,"d":5,"e":5,"o":5,"q":5,"\u00e9":5,"\u00f3":5,"\u00f6":5,"f":4,"g":4,"t":6,"v":10,"w":10,"y":10,"b":2,"h":2,"k":2,"l":2,"i":2,"m":2,"n":2,"p":2,"r":2,"\u00ed":2,"'":19,"\"":19,")":5,"]":5,"}":5,"-":2,"U":12,"\u00da":12,"\u00dc":12,"Z":-4,"u":4,"\u00fa":4,"\u00fc":4,"z":-2}},"B":{"d":"151,-80v1,-34,-31,-42,-67,-40r0,78v35,4,67,-3,67,-38xm145,-196v0,-29,-32,-38,-61,-31r0,65v33,3,61,-5,61,-34xm212,-79v1,86,-104,88,-186,78r0,-265v71,-11,177,-16,178,62v0,31,-22,47,-44,60v30,8,52,29,52,65","w":227,"k":{"T":5,"V":4,"W":4,"Y":10,",":6,".":6,"c":-2,"d":-2,"e":-2,"o":-2,"q":-2,"\u00e9":-2,"\u00f3":-2,"\u00f6":-2,"v":2,"w":2,"y":2,"-":-3}},"C":{"d":"74,-134v0,72,58,103,121,81r8,47v-98,31,-190,-18,-190,-125v0,-109,89,-165,193,-132r-12,47v-60,-26,-120,9,-120,82","w":214,"k":{"T":-7,"V":-5,"W":-5,"Y":-8,"A":-5,"\u00c1":-5,"C":10,"G":10,"O":10,"Q":10,"\u00d3":10,"\u00d6":10,"J":-8,"X":-5,"c":6,"d":6,"e":6,"o":6,"q":6,"\u00e9":6,"\u00f3":6,"\u00f6":6,"v":11,"w":11,"y":11,"a":2,"\u00e1":2,"'":-4,"\"":-4,")":-4,"]":-4,"}":-4,"u":5,"\u00fa":5,"\u00fc":5,"z":-4}},"D":{"d":"180,-140v1,-60,-35,-95,-96,-84r0,180v68,5,95,-32,96,-96xm241,-140v0,123,-97,156,-215,139r0,-265v113,-20,215,6,215,126","w":254,"k":{"T":9,"V":2,"W":2,"Y":10,",":16,".":16,"A":6,"\u00c1":6,"X":9,"f":-5,"g":-2,"t":-6,"v":-4,"w":-4,"y":-4,"x":3,"i":-2,"m":-2,"n":-2,"p":-2,"r":-2,"\u00ed":-2,")":7,"]":7,"}":7,"-":-5,"u":-3,"\u00fa":-3,"\u00fc":-3}},"E":{"d":"172,-116r-88,0r0,68r98,0r0,48r-156,0r0,-270r151,0r0,49r-93,0r0,58r88,0r0,47","w":196,"k":{"V":-2,"W":-2,"Y":-2,",":3,".":3,"J":-10,"c":2,"d":2,"e":2,"o":2,"q":2,"\u00e9":2,"\u00f3":2,"\u00f6":2,"f":2,"g":2,"t":2,"v":5,"w":5,"y":5,"u":3,"\u00fa":3,"\u00fc":3,"z":-2}},"F":{"d":"26,-270r150,0r0,49r-92,0r0,64r86,0r0,48r-86,0r0,109r-58,0r0,-270","w":194,"k":{",":35,".":35,"A":23,"\u00c1":23,"J":24,"c":10,"d":10,"e":10,"o":10,"q":10,"\u00e9":10,"\u00f3":10,"\u00f6":10,"g":5,"t":2,"v":8,"w":8,"y":8,"M":6,"a":14,"\u00e1":14,"b":4,"h":4,"k":4,"l":4,"i":6,"m":6,"n":6,"p":6,"r":6,"\u00ed":6,"u":9,"\u00fa":9,"\u00fc":9,":":7,";":7}},"G":{"d":"74,-134v0,61,37,100,98,86r0,-60r-36,0r0,-46r92,0r0,143v-19,6,-54,14,-80,14v-90,0,-132,-48,-135,-135v-4,-113,101,-164,207,-129r-11,48v-63,-26,-135,1,-135,79","w":247,"k":{"c":-2,"d":-2,"e":-2,"o":-2,"q":-2,"\u00e9":-2,"\u00f3":-2,"\u00f6":-2,"v":3,"w":3,"y":3,"a":-3,"\u00e1":-3}},"H":{"d":"84,-270r0,106r87,0r0,-106r58,0r0,270r-58,0r0,-113r-87,0r0,113r-58,0r0,-270r58,0","w":254,"k":{"Y":5,"f":-2,"t":-2}},"I":{"d":"84,-270r0,270r-58,0r0,-270r58,0","w":109,"k":{"Y":5,"f":-2,"t":-2}},"J":{"d":"5,-49v38,13,64,-4,64,-46r0,-175r59,0v-2,127,34,314,-129,268","w":150,"k":{",":4,".":4,"v":-2,"w":-2,"y":-2,"a":2,"\u00e1":2,")":-4,"]":-4,"}":-4}},"K":{"d":"26,-270r58,0r1,120v21,-42,47,-80,70,-120r70,0r-81,116r84,154r-66,0r-59,-115r-19,27r0,88r-58,0r0,-270","w":227,"k":{"T":-2,"Y":4,",":-5,".":-5,"A":-5,"\u00c1":-5,"C":11,"G":11,"O":11,"Q":11,"\u00d3":11,"\u00d6":11,"J":-12,"c":5,"d":5,"e":5,"o":5,"q":5,"\u00e9":5,"\u00f3":5,"\u00f6":5,"g":5,"v":13,"w":13,"y":13,"a":-2,"\u00e1":-2,"'":-3,"\"":-3,")":-2,"]":-2,"}":-2,"-":8,"Z":-8,"u":6,"\u00fa":6,"\u00fc":6,":":-2,";":-2}},"L":{"d":"26,-270r58,0r0,221r96,0r0,49r-154,0r0,-270","w":188,"k":{"T":36,"V":22,"W":22,"Y":31,"A":-2,"\u00c1":-2,"C":14,"G":14,"O":14,"Q":14,"\u00d3":14,"\u00d6":14,"J":-12,"c":3,"d":3,"e":3,"o":3,"q":3,"\u00e9":3,"\u00f3":3,"\u00f6":3,"f":2,"t":4,"v":12,"w":12,"y":12,"a":-2,"\u00e1":-2,"'":38,"\"":38,"-":9,"U":11,"\u00da":11,"\u00dc":11,"u":4,"\u00fa":4,"\u00fc":4}},"M":{"d":"239,0r-8,-205v-15,71,-38,134,-56,201r-45,0r-38,-150v-6,-16,-4,-38,-12,-51r-9,205r-53,0r18,-270r74,0r46,188r2,0r22,-96r27,-92r72,0r15,270r-55,0","w":313,"k":{"T":6,"i":-2,"m":-2,"n":-2,"p":-2,"r":-2,"\u00ed":-2,"'":2,"\"":2,"-":-2}},"N":{"d":"77,-194r1,194r-52,0r0,-270r64,0r72,144v8,16,13,34,20,46v-7,-57,-5,-125,-5,-190r53,0r0,270r-59,0r-75,-148v-7,-16,-14,-31,-19,-46","w":255,"k":{"Y":5,"f":-2,"t":-2}},"O":{"d":"130,-44v43,0,54,-45,54,-92v0,-45,-11,-90,-54,-90v-77,0,-76,182,0,182xm246,-138v0,84,-36,142,-119,142v-78,0,-114,-58,-114,-138v0,-81,39,-140,118,-140v78,0,115,57,115,136","w":258,"k":{"T":9,"V":2,"W":2,"Y":10,",":16,".":16,"A":6,"\u00c1":6,"X":9,"f":-5,"g":-2,"t":-6,"v":-4,"w":-4,"y":-4,"x":3,"i":-2,"m":-2,"n":-2,"p":-2,"r":-2,"\u00ed":-2,")":7,"]":7,"}":7,"-":-5,"u":-3,"\u00fa":-3,"\u00fc":-3}},"P":{"d":"148,-186v0,-33,-32,-46,-64,-38r0,80v33,8,64,-8,64,-42xm206,-189v0,69,-52,96,-122,91r0,98r-58,0r0,-266v78,-14,180,-11,180,77","w":217,"k":{"V":2,"W":2,"Y":5,",":56,".":56,"A":22,"\u00c1":22,"J":26,"X":8,"c":9,"d":9,"e":9,"o":9,"q":9,"\u00e9":9,"\u00f3":9,"\u00f6":9,"g":10,"s":8,"t":-5,"v":-3,"w":-3,"y":-3,"M":4,"a":7,"\u00e1":7,"i":3,"m":3,"n":3,"p":3,"r":3,"\u00ed":3,")":3,"]":3,"}":3,"-":6,"Z":3,"u":3,"\u00fa":3,"\u00fc":3,":":4,";":4}},"Q":{"d":"130,-44v44,0,54,-45,54,-92v0,-46,-11,-90,-54,-90v-44,0,-56,45,-56,91v0,46,11,91,56,91xm189,-16r61,17r-17,45v-40,-12,-71,-35,-112,-42v-71,-12,-108,-57,-108,-137v0,-81,39,-141,119,-141v77,0,112,58,114,136v1,61,-22,99,-57,122","w":258,"k":{"T":9,"V":2,"W":2,"Y":10,",":16,".":16,"A":6,"\u00c1":6,"X":9,"f":-5,"g":-2,"t":-6,"v":-4,"w":-4,"y":-4,"x":3,"i":-2,"m":-2,"n":-2,"p":-2,"r":-2,"\u00ed":-2,")":7,"]":7,"}":7,"-":-5,"u":-3,"\u00fa":-3,"\u00fc":-3}},"R":{"d":"84,-149v36,3,64,-8,64,-40v0,-33,-30,-44,-64,-37r0,77xm156,0v-22,-32,-2,-119,-72,-106r0,106r-58,0r0,-266v76,-12,184,-14,180,72v-2,36,-22,55,-46,68v42,18,37,87,56,126r-60,0","w":222,"k":{"V":2,"W":2,"Y":5,"A":-3,"\u00c1":-3,"J":-4,"X":-3,"t":-5,"a":-3,"\u00e1":-3,"b":-2,"h":-2,"k":-2,"l":-2,"i":-3,"m":-3,"n":-3,"p":-3,"r":-3,"\u00ed":-3,"-":2,"U":2,"\u00da":2,"\u00dc":2}},"S":{"d":"171,-125v56,88,-60,166,-157,114r11,-49v23,15,102,30,102,-14v0,-43,-71,-44,-92,-73v-57,-80,47,-162,140,-114r-12,48v-23,-17,-103,-20,-84,26v20,27,75,35,92,62","w":198,"k":{"c":-3,"d":-3,"e":-3,"o":-3,"q":-3,"\u00e9":-3,"\u00f3":-3,"\u00f6":-3,"v":5,"w":5,"y":5,"a":-4,"\u00e1":-4,"j":2,"-":-5,"u":-2,"\u00fa":-2,"\u00fc":-2}},"T":{"d":"71,-219r-65,0r0,-51r189,0r0,51r-66,0r0,219r-58,0r0,-219","w":200,"k":{"\u00ed":19,"i":19,"T":-8,"V":-10,"W":-10,"Y":-6,",":31,".":31,"A":24,"\u00c1":24,"C":10,"G":10,"O":10,"Q":10,"\u00d3":10,"\u00d6":10,"J":17,"X":-8,"c":28,"d":28,"e":28,"o":28,"q":28,"\u00e9":28,"\u00f3":28,"\u00f6":28,"g":24,"s":25,"v":17,"w":17,"y":17,"x":7,"S":3,"a":23,"\u00e1":23,"b":4,"h":4,"k":4,"l":4,"m":19,"n":19,"p":19,"r":19,"'":-4,"\"":-4,")":-13,"]":-13,"}":-13,"-":20,"u":19,"\u00fa":19,"\u00fc":19,"z":19,":":12,";":12}},"U":{"d":"124,4v-69,0,-99,-43,-99,-118r0,-156r58,0r0,162v0,38,10,64,42,64v34,0,43,-25,43,-64r0,-162r58,0r0,156v0,75,-32,118,-102,118","w":250,"k":{",":9,".":9,"A":9,"\u00c1":9,"f":-2,"s":5,"v":2,"w":2,"y":2,"x":4,"a":2,"\u00e1":2,"z":5}},"V":{"d":"82,0r-79,-270r64,0r51,211v12,-74,34,-141,50,-211r63,0r-82,270r-67,0","w":232,"k":{"T":-8,",":24,".":24,"A":17,"\u00c1":17,"C":3,"G":3,"O":3,"Q":3,"\u00d3":3,"\u00d6":3,"J":12,"c":14,"d":14,"e":14,"o":14,"q":14,"\u00e9":14,"\u00f3":14,"\u00f6":14,"g":6,"s":13,"t":3,"v":6,"w":6,"y":6,"S":2,"a":14,"\u00e1":14,"b":2,"h":2,"k":2,"l":2,"i":8,"m":8,"n":8,"p":8,"r":8,"\u00ed":8,"'":-7,"\"":-7,")":-12,"]":-12,"}":-12,"-":8,"u":10,"\u00fa":10,"\u00fc":10,":":8,";":8}},"W":{"d":"64,0r-58,-270r62,0r33,205v9,-71,27,-137,39,-205r58,0r35,204r33,-204r59,0r-63,270r-62,0r-35,-192r-15,84r-24,108r-62,0","w":330,"k":{"T":-8,",":24,".":24,"A":17,"\u00c1":17,"C":3,"G":3,"O":3,"Q":3,"\u00d3":3,"\u00d6":3,"J":12,"c":14,"d":14,"e":14,"o":14,"q":14,"\u00e9":14,"\u00f3":14,"\u00f6":14,"g":6,"s":13,"t":3,"v":6,"w":6,"y":6,"S":2,"a":14,"\u00e1":14,"b":2,"h":2,"k":2,"l":2,"i":8,"m":8,"n":8,"p":8,"r":8,"\u00ed":8,"'":-7,"\"":-7,")":-12,"]":-12,"}":-12,"-":8,"u":10,"\u00fa":10,"\u00fc":10,":":8,";":8}},"X":{"d":"151,0r-44,-97r-39,97r-64,0r70,-137r-68,-133r66,0r40,94r36,-94r65,0r-69,133r72,137r-65,0","w":220,"k":{"T":-4,"V":-5,"W":-5,"Y":-7,"A":3,"\u00c1":3,"C":11,"G":11,"O":11,"Q":11,"\u00d3":11,"\u00d6":11,"J":-8,"X":2,"c":5,"d":5,"e":5,"o":5,"q":5,"\u00e9":5,"\u00f3":5,"\u00f6":5,"v":12,"w":12,"y":12,"'":-3,"\"":-3,"-":6,"u":3,"\u00fa":3,"\u00fc":3}},"Y":{"d":"78,0r0,-108r-77,-162r65,0r44,118r42,-118r65,0r-81,160r0,110r-58,0","w":216,"k":{"\u00f6":35,"T":-4,"V":-10,"W":-10,"Y":2,",":41,".":41,"A":30,"\u00c1":30,"C":14,"G":14,"O":14,"Q":14,"\u00d3":14,"\u00d6":14,"J":20,"X":4,"c":35,"d":35,"e":35,"o":35,"q":35,"\u00e9":35,"\u00f3":35,"g":28,"s":21,"t":13,"v":17,"w":17,"y":17,"x":16,"M":6,"S":8,"a":30,"\u00e1":30,"b":3,"h":3,"k":3,"l":3,"i":5,"m":5,"n":5,"p":5,"r":5,"\u00ed":5,"'":-6,"\"":-6,")":-15,"]":-15,"}":-15,"-":20,"u":22,"\u00fa":22,"\u00fc":22,"z":15,":":18,";":18,"B":5,"D":5,"E":5,"F":5,"H":5,"I":5,"K":5,"L":5,"N":5,"P":5,"R":5,"\u00c9":5,"\u00cd":5,"\u00d1":5}},"Z":{"d":"8,-32r116,-188r-106,0r0,-50r178,0r0,37r-112,184r114,0r0,49r-190,0r0,-32","w":208,"k":{"Y":-4,"A":-4,"\u00c1":-4,"C":7,"G":7,"O":7,"Q":7,"\u00d3":7,"\u00d6":7,"J":-10,"X":-2,"c":3,"d":3,"e":3,"o":3,"q":3,"\u00e9":3,"\u00f3":3,"\u00f6":3,"v":4,"w":4,"y":4,"a":-2,"\u00e1":-2,"i":-2,"m":-2,"n":-2,"p":-2,"r":-2,"\u00ed":-2,"-":3,"u":3,"\u00fa":3,"\u00fc":3}},"[":{"d":"25,45r0,-319r79,0r0,33r-36,0r0,252r36,0r0,34r-79,0","w":118,"k":{"T":-8,"V":-12,"W":-12,"Y":-15,"A":6,"\u00c1":6,"C":9,"G":9,"O":9,"Q":9,"\u00d3":9,"\u00d6":9,"J":-6,"X":-2,"j":-21}},"\\":{"d":"80,16r-79,-290r39,0r78,290r-38,0","w":120},"]":{"d":"94,-274r0,319r-80,0r0,-34r37,0r0,-252r-37,0r0,-33r80,0","w":118},"^":{"d":"179,-71v-21,-47,-37,-99,-61,-143r-59,143r-42,0r84,-189r36,0r84,189r-42,0","w":238},"_":{"d":"200,30r0,20r-200,0r0,-20r200,0","w":200},"a":{"d":"90,-38v28,0,31,-25,29,-55v-27,0,-51,5,-52,31v0,15,8,24,23,24xm118,-130v1,-42,-64,-30,-84,-15r-10,-38v16,-8,43,-17,71,-17v103,0,76,108,84,200r-52,0v-2,-6,-1,-15,-5,-20v-28,42,-116,25,-112,-36v4,-57,49,-73,108,-74","w":198,"k":{"T":22,"t":3,"v":5,"w":5,"y":5,"'":5,"\"":5}},"b":{"d":"113,-154v-32,0,-32,38,-32,75v0,22,13,37,32,37v28,0,36,-26,37,-57v0,-29,-10,-55,-37,-55xm127,4v-27,0,-42,-12,-54,-30r-3,26r-49,0r1,-282r59,0r1,109v10,-15,28,-27,53,-27v51,0,72,44,73,98v0,62,-26,106,-81,106","w":220,"k":{"T":18,",":12,".":12,"v":4,"w":4,"y":4,"x":8,"'":8,"\"":8,")":2,"]":2,"}":2,"-":-7,"z":3}},"c":{"d":"72,-98v0,45,41,68,80,50r6,44v-73,25,-145,-11,-145,-92v0,-79,68,-119,146,-96r-9,44v-37,-18,-78,6,-78,50","w":164,"k":{"T":5,",":2,".":2,"c":3,"d":3,"e":3,"o":3,"q":3,"\u00e9":3,"\u00f3":3,"\u00f6":3,"f":-5,"t":-7,"v":-8,"w":-8,"y":-8,"a":-3,"\u00e1":-3,"'":-4,"\"":-4,"-":-3,"u":-2,"\u00fa":-2,"\u00fc":-2}},"d":{"d":"108,-43v35,0,33,-43,32,-77v-1,-18,-13,-34,-32,-34v-50,0,-49,111,0,111xm93,-200v23,-1,37,11,47,22r0,-104r58,0r2,282r-52,0v-2,-8,0,-20,-3,-27v-9,18,-30,31,-55,31v-53,0,-77,-43,-77,-100v0,-59,25,-100,80,-104","w":220,"k":{",":4,".":4}},"e":{"d":"132,-119v7,-44,-53,-56,-61,-13v-1,5,-3,9,-3,13r64,0xm105,-200v64,0,89,56,79,122r-115,0v0,45,65,43,99,30r8,40v-72,31,-170,2,-163,-87v5,-61,31,-105,92,-105","w":198,"k":{"T":16,",":6,".":6,"v":2,"w":2,"y":2,"x":4,"'":2,"\"":2,"-":-10}},"f":{"d":"134,-237v-28,-11,-51,8,-46,41r38,0r0,43r-37,0r0,153r-59,0r0,-153r-26,0r0,-43r26,0v-5,-66,45,-103,108,-86","w":130,"k":{",":16,".":16,"c":4,"d":4,"e":4,"o":4,"q":4,"\u00e9":4,"\u00f3":4,"\u00f6":4,"g":3,"s":2,"t":-5,"'":-17,"\"":-17,")":-28,"]":-28,"}":-28,"-":2,":":-10,";":-10}},"g":{"d":"107,-45v32,0,30,-38,30,-73v0,-21,-11,-36,-29,-36v-25,0,-36,27,-36,56v0,28,10,53,35,53xm95,-200v25,-2,38,13,49,27r2,-23r51,0r-2,170v12,98,-86,129,-167,95r12,-44v37,25,113,14,97,-50v-9,14,-26,23,-48,23v-53,0,-76,-41,-76,-94v0,-60,27,-100,82,-104","w":217,"k":{"T":13,",":6,".":6}},"h":{"d":"110,-152v-18,1,-30,13,-29,34r0,118r-59,0r0,-282r59,0r1,109v10,-16,29,-26,52,-27v83,0,60,117,63,200r-59,0r0,-111v0,-22,-7,-42,-28,-41","w":218,"k":{"T":20,"t":2,"v":6,"w":6,"y":6,"'":5,"\"":5}},"i":{"d":"51,-220v-18,0,-29,-12,-30,-29v-1,-18,13,-30,31,-30v18,0,29,13,30,30v1,18,-14,29,-31,29xm22,0r0,-196r59,0r0,196r-59,0","w":103},"j":{"d":"57,-220v-18,0,-29,-12,-30,-29v-1,-18,13,-30,31,-30v18,0,29,13,30,30v1,18,-14,29,-31,29xm-16,38v39,1,44,-30,44,-72r0,-162r59,0v-11,113,46,281,-97,280","w":108,"k":{",":4,".":4}},"k":{"d":"81,-282r1,170v13,-31,32,-56,48,-84r68,0r-64,81r72,115r-70,0r-42,-80r-13,18r0,62r-59,0r0,-282r59,0","w":201,"k":{"T":10,",":-2,".":-2,"c":5,"d":5,"e":5,"o":5,"q":5,"\u00e9":5,"\u00f3":5,"\u00f6":5,"g":5,"a":-3,"\u00e1":-3,"b":-3,"h":-3,"k":-3,"l":-3,"i":-2,"m":-2,"n":-2,"p":-2,"r":-2,"\u00ed":-2,"-":3}},"l":{"d":"22,-282r59,0r0,282r-59,0r0,-282","w":104,"k":{",":4,".":4}},"m":{"d":"73,-170v19,-35,93,-41,108,2v12,-18,29,-32,58,-32v82,0,58,118,61,200r-57,0r0,-109v0,-22,-4,-43,-25,-43v-19,0,-28,15,-28,35r0,117r-57,0r0,-114v0,-20,-6,-38,-25,-38v-19,0,-28,14,-28,35r0,117r-58,0r-1,-196r49,0","w":322,"k":{"T":20,"t":2,"v":6,"w":6,"y":6,"'":5,"\"":5}},"n":{"d":"111,-152v-20,1,-31,14,-30,37r0,115r-59,0r-1,-196r50,0v2,8,0,20,4,26v12,-15,29,-30,57,-30v85,0,63,116,65,200r-59,0r0,-113v0,-21,-6,-40,-27,-39","w":218,"k":{"T":20,"t":2,"v":6,"w":6,"y":6,"'":5,"\"":5}},"o":{"d":"107,-157v-49,4,-47,116,1,119v45,-6,46,-115,-1,-119xm106,4v-60,0,-93,-39,-93,-101v0,-63,34,-103,96,-103v59,0,90,39,91,101v0,65,-34,103,-94,103","w":213,"k":{"T":18,",":12,".":12,"v":4,"w":4,"y":4,"x":8,"'":8,"\"":8,")":2,"]":2,"}":2,"-":-7,"z":3}},"p":{"d":"113,-153v-31,0,-32,36,-32,73v0,25,11,37,31,38v27,2,37,-28,37,-56v0,-30,-9,-55,-36,-55xm127,4v-22,1,-36,-10,-46,-21r0,95r-59,0r-1,-274r51,0v2,8,0,20,3,26v11,-18,31,-30,58,-30v52,0,75,45,75,100v0,60,-25,101,-81,104","w":220,"k":{"T":18,",":12,".":12,"v":4,"w":4,"y":4,"x":8,"'":8,"\"":8,")":2,"]":2,"}":2,"-":-7,"z":3}},"q":{"d":"108,-42v33,0,34,-39,32,-75v-1,-19,-11,-36,-32,-36v-27,1,-36,25,-36,55v0,30,10,56,36,56xm93,-200v24,0,40,10,50,27r2,-23r54,0r-1,274r-58,0r-1,-100v-10,16,-28,26,-52,26v-51,0,-74,-45,-74,-99v0,-58,25,-105,80,-105","w":220,"k":{"T":13,",":3,".":3}},"r":{"d":"136,-143v-33,-5,-55,9,-55,44r0,99r-59,0r-1,-196r50,0v2,10,-2,27,4,34v9,-25,31,-43,61,-36r0,55","w":141,"k":{"T":6,",":24,".":24,"c":3,"d":3,"e":3,"o":3,"q":3,"\u00e9":3,"\u00f3":3,"\u00f6":3,"f":-11,"g":3,"t":-8,"v":-8,"w":-8,"y":-8,"x":-6,"a":3,"\u00e1":3,"z":-3}},"s":{"d":"138,-94v45,70,-54,128,-126,84r10,-41v15,16,94,21,66,-16v-27,-16,-72,-27,-72,-69v0,-61,75,-76,126,-53r-11,41v-15,-15,-79,-14,-54,18v15,9,52,22,61,36","w":160,"k":{"T":12,",":4,".":4}},"t":{"d":"129,-1v-53,15,-98,-5,-98,-68r0,-84r-25,0r0,-43r25,0r0,-36r58,-16r0,52r42,0r0,43r-42,0v6,42,-22,123,39,107","w":140,"k":{",":4,".":4,"c":2,"d":2,"e":2,"o":2,"q":2,"\u00e9":2,"\u00f3":2,"\u00f6":2,"g":2,"v":-2,"w":-2,"y":-2}},"u":{"d":"107,-44v18,-1,29,-11,29,-32r0,-120r58,0r2,196r-50,0v-2,-8,0,-20,-4,-26v-11,17,-29,30,-57,30v-84,1,-60,-117,-63,-200r58,0r0,108v0,24,4,45,27,44","w":217,"k":{"T":13,",":3,".":3}},"v":{"d":"66,-196r34,140r32,-140r61,0r-67,196r-57,0r-66,-196r63,0","w":196,"k":{"T":12,",":18,".":18,"c":6,"d":6,"e":6,"o":6,"q":6,"\u00e9":6,"\u00f3":6,"\u00f6":6,"g":5,"s":5,"v":-9,"w":-9,"y":-9,"a":3,"\u00e1":3,"-":2}},"w":{"d":"64,-196r25,144r33,-144r46,0r32,144r26,-144r57,0r-57,196r-54,0r-30,-130v-6,49,-20,86,-30,130r-54,0r-54,-196r60,0","w":286,"k":{"T":12,",":18,".":18,"c":6,"d":6,"e":6,"o":6,"q":6,"\u00e9":6,"\u00f3":6,"\u00f6":6,"g":5,"s":5,"v":-9,"w":-9,"y":-9,"a":3,"\u00e1":3,"-":2}},"x":{"d":"68,-196v11,21,19,45,32,64v8,-23,19,-42,28,-64r62,0r-58,94r59,102r-65,0r-32,-66r-30,66r-62,0r59,-99r-58,-97r65,0","w":192,"k":{"T":10,"c":8,"d":8,"e":8,"o":8,"q":8,"\u00e9":8,"\u00f3":8,"\u00f6":8,"g":2,"s":3,"t":-4,"v":-8,"w":-8,"y":-8,"-":2}},"y":{"d":"19,38v22,-7,61,-25,50,-54r-67,-180r64,0r36,134r30,-134r60,0r-59,179v-20,49,-45,94,-100,105","w":193,"k":{"T":12,",":18,".":18,"c":6,"d":6,"e":6,"o":6,"q":6,"\u00e9":6,"\u00f3":6,"\u00f6":6,"g":5,"s":5,"v":-9,"w":-9,"y":-9,"a":3,"\u00e1":3,"-":2}},"z":{"d":"8,-34r85,-115r-78,0r0,-47r147,0r0,37r-69,95v-5,7,-10,10,-14,17r86,0r0,47r-157,0r0,-34","w":173,"k":{"T":10,"c":3,"d":3,"e":3,"o":3,"q":3,"\u00e9":3,"\u00f3":3,"\u00f6":3,"v":-4,"w":-4,"y":-4}},"{":{"d":"34,-11v0,0,20,-89,-24,-89r0,-30v44,1,25,-53,24,-90v0,-41,29,-57,73,-54r0,33v-66,-5,7,118,-59,126v39,5,29,57,29,98v0,21,8,29,30,29r0,33v-46,3,-73,-13,-73,-56","w":118,"k":{"T":-8,"V":-12,"W":-12,"Y":-15,"A":6,"\u00c1":6,"C":9,"G":9,"O":9,"Q":9,"\u00d3":9,"\u00d6":9,"J":-6,"X":-2,"j":-21}},"|":{"d":"74,-300r0,400r-42,0r0,-400r42,0","w":105},"}":{"d":"85,-220v0,37,-21,90,24,90r0,30v-44,-1,-24,53,-24,89v0,43,-27,59,-73,56r0,-33v43,3,27,-45,26,-80v-2,-31,13,-39,33,-48v-42,-5,-32,-55,-29,-97v1,-20,-9,-29,-30,-28r0,-33v44,-2,74,12,73,54","w":118},"~":{"d":"74,-111v-15,1,-17,13,-18,33r-37,0v1,-42,13,-72,55,-72v39,-1,59,30,92,35v15,-1,16,-15,17,-33r37,0v2,42,-12,73,-52,74v-39,0,-61,-31,-94,-37","w":238},"'":{"d":"64,-276r-8,107r-33,0r-9,-107r50,0","w":78,"k":{"T":-4,"V":-4,"W":-4,"Y":-6,",":47,".":47,"A":18,"\u00c1":18,"C":4,"G":4,"O":4,"Q":4,"\u00d3":4,"\u00d6":4,"J":19,"X":-3,"c":7,"d":7,"e":7,"o":7,"q":7,"\u00e9":7,"\u00f3":7,"\u00f6":7,"f":-9,"g":9,"s":2,"t":-8,"v":-2,"w":-2,"y":-2,"x":-2}},"\u00bf":{"d":"73,9v-4,31,48,27,64,14r12,42v-49,32,-157,14,-132,-67v12,-39,53,-52,49,-105r50,0v13,45,-38,74,-43,116xm58,-162v1,-19,14,-35,35,-35v20,0,33,16,33,35v0,19,-13,35,-33,35v-20,0,-35,-16,-35,-35","w":164},"`":{"d":"58,-279r32,59r-39,0r-46,-59r53,0","w":120},"\u00aa":{"d":"67,-131v18,0,23,-15,21,-35v-18,0,-37,4,-37,20v0,9,7,15,16,15xm22,-224v37,-22,104,-14,104,44v0,25,-2,53,2,74r-35,0r-3,-13v-20,26,-77,17,-77,-24v0,-40,40,-42,73,-49v0,-24,-45,-17,-56,-6","w":142},"\u00ba":{"d":"72,-207v-30,3,-29,71,0,74v31,-1,30,-72,0,-74xm73,-236v40,0,60,25,61,65v0,43,-23,67,-62,67v-39,0,-62,-25,-62,-65v0,-41,23,-67,63,-67","w":145},"\u00c1":{"d":"186,-332r-49,48r-45,0r33,-48r61,0xm143,-111r-27,-112r-26,112r53,0xm82,-67r-17,67r-59,0r75,-270r75,0r74,270r-61,0r-18,-67r-69,0","w":238,"k":{"T":29,"V":19,"W":19,"Y":30,"C":9,"G":9,"O":9,"Q":9,"\u00d3":9,"\u00d6":9,"J":-9,"X":6,"c":5,"d":5,"e":5,"o":5,"q":5,"\u00e9":5,"\u00f3":5,"\u00f6":5,"f":4,"g":4,"t":6,"v":10,"w":10,"y":10,"b":2,"h":2,"k":2,"l":2,"i":2,"m":2,"n":2,"p":2,"r":2,"\u00ed":2,"'":19,"\"":19,")":5,"]":5,"}":5,"-":2,"U":12,"\u00da":12,"\u00dc":12,"Z":-4,"u":4,"\u00fa":4,"\u00fc":4,"z":-2}},"\u00c9":{"d":"170,-332r-49,48r-46,0r34,-48r61,0xm172,-116r-88,0r0,68r98,0r0,48r-156,0r0,-270r151,0r0,49r-93,0r0,58r88,0r0,47","w":196,"k":{"V":-2,"W":-2,"Y":-2,",":3,".":3,"J":-10,"c":2,"d":2,"e":2,"o":2,"q":2,"\u00e9":2,"\u00f3":2,"\u00f6":2,"f":2,"g":2,"t":2,"v":5,"w":5,"y":5,"u":3,"\u00fa":3,"\u00fc":3,"z":-2}},"\u00cd":{"d":"120,-332r-48,48r-46,0r34,-48r60,0xm84,-270r0,270r-58,0r0,-270r58,0","w":109,"k":{"Y":5,"f":-2,"t":-2}},"\u00d1":{"d":"152,-289v-20,1,-26,-11,-41,-13v-5,0,-8,5,-9,16r-27,0v-1,-28,8,-48,30,-50v20,-1,48,33,51,-1r26,0v1,31,-5,47,-30,48xm77,-194r2,194r-53,0r0,-270r64,0r72,144v8,16,13,34,20,46r-6,-117r0,-73r54,0r0,270r-60,0r-74,-148v-7,-16,-13,-31,-19,-46","w":255,"k":{"Y":5,"f":-2,"t":-2}},"\u00d3":{"d":"198,-332r-50,48r-45,0r34,-48r61,0xm130,-44v43,0,54,-45,54,-92v0,-45,-11,-90,-54,-90v-77,0,-76,182,0,182xm246,-138v0,84,-36,142,-119,142v-78,0,-114,-58,-114,-138v0,-81,39,-140,118,-140v78,0,115,57,115,136","w":258,"k":{"T":9,"V":2,"W":2,"Y":10,",":16,".":16,"A":6,"\u00c1":6,"X":9,"f":-5,"g":-2,"t":-6,"v":-4,"w":-4,"y":-4,"x":3,"i":-2,"m":-2,"n":-2,"p":-2,"r":-2,"\u00ed":-2,")":7,"]":7,"}":7,"-":-5,"u":-3,"\u00fa":-3,"\u00fc":-3}},"\u00d6":{"d":"196,-312v0,14,-12,28,-27,27v-14,0,-26,-13,-26,-27v0,-15,13,-27,27,-27v14,0,26,12,26,27xm89,-285v-14,0,-26,-13,-26,-27v0,-15,12,-27,26,-27v14,0,26,12,26,27v0,14,-12,27,-26,27xm130,-226v-77,4,-77,178,0,182v75,-5,74,-177,0,-182xm246,-138v0,84,-36,142,-119,142v-78,0,-114,-58,-114,-138v0,-81,39,-140,118,-140v78,0,115,57,115,136","w":258,"k":{"T":9,"V":2,"W":2,"Y":10,",":16,".":16,"A":6,"\u00c1":6,"X":9,"f":-5,"g":-2,"t":-6,"v":-4,"w":-4,"y":-4,"x":3,"i":-2,"m":-2,"n":-2,"p":-2,"r":-2,"\u00ed":-2,")":7,"]":7,"}":7,"-":-5,"u":-3,"\u00fa":-3,"\u00fc":-3}},"\u00da":{"d":"190,-332r-49,48r-45,0r33,-48r61,0xm124,4v-69,0,-99,-43,-99,-118r0,-156r58,0r0,162v0,38,10,64,42,64v34,0,43,-25,43,-64r0,-162r58,0r0,156v0,75,-32,118,-102,118","w":250,"k":{",":9,".":9,"A":9,"\u00c1":9,"f":-2,"s":5,"v":2,"w":2,"y":2,"x":4,"a":2,"\u00e1":2,"z":5}},"\u00dc":{"d":"193,-312v0,15,-11,28,-26,27v-14,0,-26,-13,-26,-27v0,-15,13,-27,27,-27v14,0,25,12,25,27xm87,-285v-14,0,-26,-12,-26,-27v0,-15,12,-27,26,-27v14,0,26,12,26,27v0,14,-12,27,-26,27xm124,4v-69,0,-99,-43,-99,-118r0,-156r58,0r0,162v0,38,10,64,42,64v34,0,43,-25,43,-64r0,-162r58,0r0,156v0,75,-32,118,-102,118","w":250,"k":{",":9,".":9,"A":9,"\u00c1":9,"f":-2,"s":5,"v":2,"w":2,"y":2,"x":4,"a":2,"\u00e1":2,"z":5}},"\u00e1":{"d":"159,-279r-46,59r-39,0r32,-59r53,0xm90,-38v28,0,31,-25,29,-55v-27,0,-51,5,-52,31v0,15,8,24,23,24xm118,-130v1,-42,-64,-30,-84,-15r-10,-38v16,-8,43,-17,71,-17v103,0,76,108,84,200r-52,0v-2,-6,-1,-15,-5,-20v-28,42,-116,25,-112,-36v4,-57,49,-73,108,-74","w":198,"k":{"T":22,"t":3,"v":5,"w":5,"y":5,"'":5,"\"":5}},"\u00e9":{"d":"167,-279r-46,59r-39,0r32,-59r53,0xm132,-119v7,-44,-53,-56,-61,-13v-1,5,-3,9,-3,13r64,0xm105,-200v64,0,89,56,79,122r-115,0v0,45,65,43,99,30r8,40v-72,31,-170,2,-163,-87v5,-61,31,-105,92,-105","w":198,"k":{"T":16,",":6,".":6,"v":2,"w":2,"y":2,"x":4,"'":2,"\"":2,"-":-10}},"\u00ed":{"d":"114,-279r-47,59r-39,0r32,-59r54,0xm22,0r0,-196r59,0r0,196r-59,0","w":103},"\u00f3":{"d":"168,-279r-46,59r-39,0r32,-59r53,0xm107,-157v-49,4,-47,116,1,119v45,-6,46,-115,-1,-119xm106,4v-60,0,-93,-39,-93,-101v0,-63,34,-103,96,-103v59,0,90,39,91,101v0,65,-34,103,-94,103","w":213,"k":{"T":18,",":12,".":12,"v":4,"w":4,"y":4,"x":8,"'":8,"\"":8,")":2,"]":2,"}":2,"-":-7,"z":3}},"\u00f6":{"d":"173,-251v0,16,-11,28,-27,28v-14,0,-26,-13,-26,-28v0,-15,12,-27,27,-27v14,0,26,11,26,27xm67,-223v-16,0,-28,-12,-27,-28v0,-15,12,-27,27,-27v14,0,26,11,26,27v0,16,-11,28,-26,28xm108,-157v-51,3,-48,116,0,119v45,-5,46,-114,0,-119xm106,4v-60,0,-93,-39,-93,-101v0,-63,34,-103,96,-103v59,0,90,39,91,101v0,65,-34,103,-94,103","w":213,"k":{"T":18,",":12,".":12,"v":4,"w":4,"y":4,"x":8,"'":8,"\"":8,")":2,"]":2,"}":2,"-":-7,"z":3}},"\u00fa":{"d":"171,-279r-46,59r-39,0r32,-59r53,0xm107,-44v18,-1,29,-11,29,-32r0,-120r58,0r2,196r-50,0v-2,-8,0,-20,-4,-26v-11,17,-29,30,-57,30v-84,1,-60,-117,-63,-200r58,0r0,108v0,24,4,45,27,44","w":217,"k":{"T":13,",":3,".":3}},"\u00fc":{"d":"150,-223v-15,0,-27,-12,-27,-28v0,-15,12,-27,27,-27v14,0,27,12,27,27v0,16,-11,28,-27,28xm70,-223v-16,0,-27,-12,-27,-28v0,-15,12,-27,27,-27v14,0,26,11,26,27v0,16,-11,28,-26,28xm107,-44v18,-1,29,-11,29,-32r0,-120r58,0r2,196r-50,0v-2,-8,0,-20,-4,-26v-11,17,-29,30,-57,30v-84,1,-60,-117,-63,-200r58,0r0,108v0,24,4,45,27,44","w":217,"k":{"T":13,",":3,".":3}},"\"":{"d":"137,-276r-9,107r-32,0r-9,-107r50,0xm64,-276r-8,107r-33,0r-9,-107r50,0","w":150,"k":{"T":-4,"V":-4,"W":-4,"Y":-6,",":47,".":47,"A":18,"\u00c1":18,"C":4,"G":4,"O":4,"Q":4,"\u00d3":4,"\u00d6":4,"J":19,"X":-3,"c":7,"d":7,"e":7,"o":7,"q":7,"\u00e9":7,"\u00f3":7,"\u00f6":7,"f":-9,"g":9,"s":2,"t":-8,"v":-2,"w":-2,"y":-2,"x":-2}},"!":{"d":"86,-31v-1,19,-14,35,-35,35v-20,0,-33,-16,-33,-35v-1,-20,13,-35,34,-35v21,0,34,16,34,35xm29,-88r-8,-182r61,0r-8,182r-45,0","w":103},"\u00a0":{"w":75,"k":{"T":12,"V":12,"W":12,"Y":12}}}});
;
(function ($) {
	$(document).ready(function(){
		var share_state = false, embed_state = false, addto_state = false, subscribe_state = false, flag_state = false, descr_state = true;;
		$(".descr-btn").click(function(){
			if (descr_state) {
				$("#descrtab").slideUp("slow");
				descr_state = false;
			} else {
				$("#descrtab").slideDown("slow");
				$("#sharetab").slideUp("slow");
				$('#embedtab').slideUp('slow');
				$('#addtotab').slideUp('slow');
				$("#subscribetab").slideUp("slow");
				$("#flagtab").slideUp("slow");
				descr_state = true;
				share_state = false;
				embed_state = false;
				addto_state = false;
				subscribe_state = false;
				flag_state = false;
			}
			return false;
		});
		$(".share-btn").click(function(){
			if (share_state) {
				$("#sharetab").slideUp("slow");
				share_state = false;
			} else {
				$("#sharetab").slideDown("slow");
				$('#embedtab').slideUp('slow');
				$('#addtotab').slideUp('slow');
				$("#subscribetab").slideUp("slow");
				$("#flagtab").slideUp("slow");
				$("#descrtab").slideUp("slow");
				share_state = true;
				embed_state = false;
				addto_state = false;
				subscribe_state = false;
				flag_state = false;
				descr_state = false;
			}
			return false;
		});
		$(".embed-btn").click(function(){
			if (embed_state) {
				$("#embedtab").slideUp("slow");
				embed_state = false;
			} else {
				$("#embedtab").slideDown("slow");
				$('#sharetab').slideUp('slow');
				$('#addtotab').slideUp('slow');
				$("#subscribetab").slideUp("slow");
				$("#flagtab").slideUp("slow");
				$("#descrtab").slideUp("slow");
				embed_state = true;
				share_state = false;
				addto_state = false;
				subscribe_state = false;
				flag_state = false;
				descr_state = false;
			}
			return false;
		});
		$(".addto-btn").click(function(){
			if (addto_state) {
				$("#addtotab").slideUp("slow");
				addto_state = false;
			} else {
				$("#addtotab").slideDown("slow");
				$('#embedtab').slideUp('slow');
				$('#sharetab').slideUp('slow');
				$("#subscribetab").slideUp("slow");
				$("#flagtab").slideUp("slow");
				$("#descrtab").slideUp("slow");
				addto_state = true;
				embed_state = false;
				share_state = false;
				subscribe_state = false;
				flag_state = false;
				descr_state = false;
			}
			return false;
		});
		$(".subscribe-btn").click(function(){
			if (subscribe_state) {
				$("#subscribetab").slideUp("slow");
				subscribe_state = false;
			} else {
				$("#subscribetab").slideDown("slow");
				$("#addtotab").slideUp("slow");
				$('#embedtab').slideUp('slow');
				$('#sharetab').slideUp('slow');
				$("#flagtab").slideUp("slow");
				$("#descrtab").slideUp("slow");
				subscribe_state = true;
				addto_state = false;
				embed_state = false;
				share_state = false;
				flag_state = false;
				descr_state = false;
			}
			return false;
		});
		$(".flag-btn").click(function(){
			if (flag_state) {
				$("#flagtab").slideUp("slow");
				flag_state = false;
			} else {
				$("#flagtab").slideDown("slow");
				$("#addtotab").slideUp("slow");
				$('#embedtab').slideUp('slow');
				$('#sharetab').slideUp('slow');
				$("#subscribetab").slideUp("slow");
				$("#descrtab").slideUp("slow");
				flag_state = true;
				addto_state = false;
				embed_state = false;
				share_state = false;
				subscribe_state = false;
				descr_state = false;
			}
			return false;
		});
		$("#descrtab").slideDown("slow");
	});
})(jQuery);;


var ddsmoothmenu={

//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
//arrowimages: {down:['downarrowclass', 'images/down.gif', 30], right:['rightarrowclass', 'images/right.gif']},
transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds
shadow: {enable:true, offsetx:5, offsety:5}, //enable shadow?
showhidedelay: {showdelay: 100, hidedelay: 200}, //set delay in milliseconds before sub menus appear and disappear, respectively

///////Stop configuring beyond here///////////////////////////

detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1, //detect WebKit browsers (Safari, Chrome etc)
detectie6: document.all && !window.XMLHttpRequest,

getajaxmenu:function($, setting){ //function to fetch external page containing the panel DIVs
	var $menucontainer=$('#'+setting.contentsource[0]) //reference empty div on page that will hold menu
	$menucontainer.html("Loading Menu...")
	$.ajax({
		url: setting.contentsource[1], //path to external menu file
		async: true,
		error:function(ajaxrequest){
			$menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText)
		},
		success:function(content){
			$menucontainer.html(content)
			ddsmoothmenu.buildmenu($, setting)
		}
	})
},


buildmenu:function($, setting){
	var smoothmenu=ddsmoothmenu
	var $mainmenu=$("#"+setting.mainmenuid+">ul") //reference main menu UL
	$mainmenu.parent().get(0).className=setting.classname || "ddsmoothmenu"
	var $headers=$mainmenu.find("ul").parent()
	$headers.hover(
		function(e){
			$(this).children('a:eq(0)').addClass('selected')
		},
		function(e){
			$(this).children('a:eq(0)').removeClass('selected')
		}
	)
	$headers.each(function(i){ //loop through each LI header
		var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header
		var $subul=$(this).find('ul:eq(0)').css({display:'block'})
		$subul.data('timers', {})
		this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
		this.istopheader=$curobj.parents("ul").length==1? true : false //is top level header?
		$subul.css({top:this.istopheader && setting.orientation!='v'? this._dimensions.h+"px" : 0})
		$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: setting.arrowimages.down[2]} : {}).append( //add arrow images
			'<img src="'+ (this.istopheader && setting.orientation!='v'? setting.arrowimages.down[1] : setting.arrowimages.right[1])
			+'" class="' + (this.istopheader && setting.orientation!='v'? setting.arrowimages.down[0] : setting.arrowimages.right[0])
			+ '" style="border:0;" />'
		)
		if (smoothmenu.shadow.enable){
			this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx : this._dimensions.w), y:(this.istopheader? $subul.offset().top+smoothmenu.shadow.offsety : $curobj.position().top)} //store this shadow's offsets
			if (this.istopheader)
				$parentshadow=$(document.body)
			else{
				var $parentLi=$curobj.parents("li:eq(0)")
				$parentshadow=$parentLi.get(0).$shadow
			}
			this.$shadow=$('<div class="ddshadow'+(this.istopheader? ' toplevelshadow' : '')+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+'px', top:this._shadowoffset.y+'px'})  //insert shadow DIV and set it to parent node for the next shadow div
		}
		$curobj.hover(
			function(e){
				var $targetul=$subul //reference UL to reveal
				var header=$curobj.get(0) //reference header LI as DOM object
				clearTimeout($targetul.data('timers').hidetimer)
				$targetul.data('timers').showtimer=setTimeout(function(){
					header._offsets={left:$curobj.offset().left, top:$curobj.offset().top}
					var menuleft=header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w
					menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent
					if ($targetul.queue().length<=1){ //if 1 or less queued animations
						$targetul.css({left:menuleft+"px", width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, ddsmoothmenu.transition.overtime)
						if (smoothmenu.shadow.enable){
							var shadowleft=header.istopheader? $targetul.offset().left+ddsmoothmenu.shadow.offsetx : menuleft
							var shadowtop=header.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety : header._shadowoffset.y
							if (!header.istopheader && ddsmoothmenu.detectwebkit){ //in WebKit browsers, restore shadow's opacity to full
								header.$shadow.css({opacity:1})
							}
							header.$shadow.css({overflow:'', width:header._dimensions.subulw+'px', left:shadowleft+'px', top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'}, ddsmoothmenu.transition.overtime)
						}
					}
				}, ddsmoothmenu.showhidedelay.showdelay)
			},
			function(e){
				var $targetul=$subul
				var header=$curobj.get(0)
				clearTimeout($targetul.data('timers').showtimer)
				$targetul.data('timers').hidetimer=setTimeout(function(){
					$targetul.animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime)
					if (smoothmenu.shadow.enable){
						if (ddsmoothmenu.detectwebkit){ //in WebKit browsers, set first child shadow's opacity to 0, as "overflow:hidden" doesn't work in them
							header.$shadow.children('div:eq(0)').css({opacity:0})
						}
						header.$shadow.css({overflow:'hidden'}).animate({height:0}, ddsmoothmenu.transition.outtime)
					}
				}, ddsmoothmenu.showhidedelay.hidedelay)
			}
		) //end hover
	}) //end $headers.each()
	$mainmenu.find("ul").css({display:'none', visibility:'visible'})
},

init:function(setting){
	if (typeof setting.customtheme=="object" && setting.customtheme.length==2){ //override default menu colors (default/hover) with custom set?
		var mainmenuid='#'+setting.mainmenuid
		var mainselector=(setting.orientation=="v")? mainmenuid : mainmenuid+', '+mainmenuid
		document.write('<style type="text/css">\n'
			+mainselector+' ul li a {background:'+setting.customtheme[0]+';}\n'
			+mainmenuid+' ul li a:hover {background:'+setting.customtheme[1]+';}\n'
		+'</style>')
	}
	this.shadow.enable=(document.all && !window.XMLHttpRequest)? false : this.shadow.enable //in IE6, always disable shadow
	jQuery(document).ready(function($){ //ajax menu?
		if (typeof setting.contentsource=="object"){ //if external ajax menu
			ddsmoothmenu.getajaxmenu($, setting)
		}
		else{ //else if markup menu
			ddsmoothmenu.buildmenu($, setting)
		}
	})
}

} //end ddsmoothmenu variable
;

