So, I've been trying to make my webpage look good on mobile. Everything is starting to line up, except that the navbar does not appear to be working. I messed around with the code a little and when I set the position to relative, the navbar starts working but the page starts being a little weird. I started coding 2 weeks ago; bare with me if I can't fathom.
I have the ID attributes and hrefs set up.
#navbar {
position: fixed;
min-width 80px;
top: 0px;
left: 0px;
border-style: solid;
border-width: 4px;
border-radius: 8px;
height: 75%;
background: #d4d5d9;
width: 26vw;
height: 100vh;
}
https://codepen.io/icantfindmyspider/pen/mdmgRBB
Thanks.
So how does it look now, check it out!
header {
font-family: 'Fira Sans Condensed', sans-serif;
font-size: 40px;
border: 3px solid;
border-radius: 8px;
width: 72.4%;
height: 50px;
color: white;
background: #2c2f33;
text-align: left;
}
li {
font-size: 18px;
list-style-position: inside;
}
p {
font-size: 20px;
}
code {
display: table;
border-radius: 6px;
background: #d4d5d6;
font-size: 13px;
padding: 12px;
word-break: break-word;
line-height: 1cm;
max-width: 50%;
list-style: none;
text-align: left;
}
.navbar-header {
font-size: 30px;
border: 3px solid;
border-radius: 7px;
width: 13.9rem;
height: 80px;
color: black;
background: white;
text-align: center;
width: 20.8vw;
}
.othersize {
margin-top: 20px;
}
.marginleft {
margin-left: 380px;
}
#navbar li {
color: #56585b;
border-top: 3px solid;
margin-top: 2px;
font-family: 'Recursive', sans-serif;
font-size: 15px;
list-style:none;
}
#navbar a {
display: block;
padding: 5px 2px;
color: #2c2f33;
text-decoration: none;
cursor: pointer;
}
#navbar ul {
padding: 0;
}
#navbar {
position: relative;
min-width 80px;
top: 0px;
left: 0px;
border-style: solid;
border-width: 4px;
border-radius: 8px;
height: 75%;
background: #d4d5d9;
width: 21.1vw;
height: 100%;
list-style:none;
}
#main-doc {
margin-top: -41%;
overflow: hidden;
}
#media (max-width: 100px) {
#navbar {
border: 1px solid;
height: 100%;
width: 1px;
font-size: 30px;
}
header {
text-align: left;
}
}
<nav id="navbar" class="scroll">
<header class="navbar-header"><strong>JavaScript Documentation</header>
<ul>
<li><a class="nav-link" href="#Introduction">Introduction</a></li>
<li><a class="nav-link" href="#Prerequisites">Prerequisites</a></li>
<li><a class="nav-link" href="#JavaScriptAndJava">JavaScript & Java</a></li>
<li><a class="nav-link" href="#HelloWorld">Hello world</a></li>
<li><a class="nav-link" href="#Variables">Variables</a></li>
<li><a class="nav-link" href="#DeclaringVariables">Declaring variables</a></li>
<li><a class="nav-link" href="#VariableScope">Variable scope</a></li>
<li><a class="nav-link" href="#GlobalVariables">Global variables</a></li><li><a class="nav-link" href="#Constants">Constants</a></li>
<li><a class="nav-link" href="#DataTypes">Data types</a></li>
<li><a class="nav-link" href="#If...elseStatements">If...else statements</a></li>
<li><a class="nav-link" href="#WhileStatement">While statement</a></li>
<li><a class="nav-link" href="#FunctionDeclarations">Function declarations</a></li>
<li><a class="nav-link" href="#Reference">Reference</a></li>
</ul>
</nav>
<main id="main-doc">
<section class="main-section" id="Introduction">
<header class="marginleft"> Introduction</header>
<article>
<p class="marginleft">
JavaScript is a cross-platform, object-oriented scripting language. It
is a small and lightweight language. Inside a host environment (for
example, a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.
</p>
<ul class="othersize, marginleft">
<li>
Client-side JavaScript extends the core language by supplying objects
to control a browser and its Document Object Model (DOM). For example,
client-side extensions allow an application to place elements on an
HTML form and respond to user events such as mouse clicks, form input,
and page navigation.
</li>
<li>
Server-side JavaScript extends the core language by supplying objects relevant to running JavaScript on a server. For example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server.
</li>
</ul>
</article>
</section>
</section>
<section class="main-section" id="Prerequisites">
<header class="marginleft"> Prerequisites</header>
<article>
<p class="marginleft" >This guide assumes you have the following basic background:</p>
<ul class="othersize, marginleft">
<li>
A general understanding of the Internet and the World Wide Web (WWW).
</li>
<li>Good working knowledge of HyperText Markup Language (HTML).</li>
<li>
Some programming experience. If you are new to programming, try one of
the tutorials linked on the main page about JavaScript.
</li>
</ul>
</article>
</section>
<section class="main-section" id="JavaScriptAndJava">
<header class="marginleft"> JavaScript & Java</header>
<article>
<p class="marginleft">
JavaScript and Java are similar in some ways but fundamentally different
in some others. The JavaScript language resembles Java but does not have
Java's static typing and strong type checking. JavaScript follows most
Java expression syntax, naming conventions and basic control-flow
constructs which was the reason why it was renamed from LiveScript to
JavaScript.
</p>
<p class="marginleft">
In contrast to Java's compile-time system of classes built by
declarations, JavaScript supports a runtime system based on a small
number of data types representing numeric, Boolean, and string values.
JavaScript has a prototype-based object model instead of the more common
class-based object model. The prototype-based model provides dynamic
inheritance; that is, what is inherited can vary for individual objects.
JavaScript also supports functions without any special declarative
requirements. Functions can be properties of objects, executing as
loosely typed methods.
</p>
<p class="marginleft">
JavaScript is a very free-form language compared to Java. You do not
have to declare all variables, classes, and methods. You do not have to
be concerned with whether methods are public, private, or protected, and
you do not have to implement interfaces. Variables, parameters, and
function return types are not explicitly typed.
</p>
</article>
</section>
<section class="main-section" id="HelloWorld">
<header class="marginleft"> Hello world</header>
<article>
<p class="marginleft">
To get started with writing JavaScript, open the Scratchpad and write your
first "Hello world" JavaScript code:
</p>
<code class="marginleft">function greetMe(yourName) { alert("Hello " + yourName); }
greetMe("World");
</code>
<p class="marginleft">
Select the code in the pad and hit Ctrl+R to watch it unfold in your
browser!
</p>
</article>
</section>
</section>
<section class="main-section" id="Variables">
<header class="marginleft"> Variables</header>
<p class="marginleft">
You use variables as symbolic names for values in your application. The
names of variables, called identifiers, conform to certain rules.
</p>
<p class="marginleft">
A JavaScript identifier must start with a letter, underscore (_), or
dollar sign ($); subsequent characters can also be digits (0-9). Because
JavaScript is case sensitive, letters include the characters "A" through
"Z" (uppercase) and the characters "a" through "z" (lowercase).
</p>
<p class="marginleft">
You can use ISO 8859-1 or Unicode letters such as å and ü in identifiers.
You can also use the Unicode escape sequences as characters in
identifiers. Some examples of legal names are Number_hits, temp99, and
_name.
</p>
</section>
<section class="main-section" id="DeclaringVariables">
<header class="marginleft"> Declaring variables</header>
<article>
<p class="marginleft">
You can declare a variable in three ways:
</p>
<p class="marginleft">
With the keyword var. For example, <code>var x = 42.</code> This syntax can be used to declare both local and global variables.
</p>
<p class="marginleft">
By simply assigning it a value. For example, <code>x = 42.</code> This always declares a global variable. It generates a strict JavaScript warning. You shouldn't use this variant.
</p>
<p class="marginleft">
With the keyword let. For example, <code> let y = 13.</code> This syntax can be used to declare a block scope local variable. See Variable scope below.
</p>
</article>
</section>
<section class="main-section" id="VariableScope">
<header class="marginleft"> Variable scope</header>
<article>
<p class="marginleft">
When you declare a variable outside of any function, it is called a
global variable, because it is available to any other code in the
current document. When you declare a variable within a function, it is
called a local variable, because it is available only within that
function.
</p>
<p class="marginleft">
JavaScript before ECMAScript 2015 does not have block statement scope;
rather, a variable declared within a block is local to the function (or
global scope) that the block resides within. For example the following
code will log 5, because the scope of x is the function (or global
context) within which x is declared, not the block, which in this case
is an if statement.
</p>
<code class="marginleft">if (true) { var x = 5; } console.log(x); // 5</code>
<p class="marginleft">
This behavior changes, when using the let declaration introduced in
ECMAScript 2015.
</p>
<code class="marginleft"
>if (true) { let y = 5; } console.log(y); // ReferenceError: y is not
defined</code>
</article>
</section>
<section class="main-section" id="GlobalVariables">
<header style="margin-top: 20px" class="marginleft"> Global variables</header>
<article>
<p class="marginleft">
Global variables are in fact properties of the global object. In web
pages the global object is window, so you can set and access global
variables using the window.variable syntax.
</p>
<p class="marginleft">
Consequently, you can access global variables declared in one window or
frame from another window or frame by specifying the window or frame
name. For example, if a variable called phoneNumber is declared in a
document, you can refer to this variable from an iframe as
parent.phoneNumber.
</p>
</article>
</section>
<section class="main-section" id="Constants">
<header class="marginleft"> Constants</header>
<article>
<p class="marginleft">
You can create a read-only, named constant with the const keyword. The
syntax of a constant identifier is the same as for a variable
identifier: it must start with a letter, underscore or dollar sign and
can contain alphabetic, numeric, or underscore characters.
</p>
<code class="marginleft">const PI = 3.14;</code>
<p class="marginleft">
A constant cannot change value through assignment or be re-declared
while the script is running. It has to be initialized to a value.
</p>
<p class="marginleft">
The scope rules for constants are the same as those for let block scope
variables. If the const keyword is omitted, the identifier is assumed to
represent a variable.
</p>
<p class="marginleft">
You cannot declare a constant with the same name as a function or
variable in the same scope. For example:
</p>
<code style="font-size: 12.1px" class="marginleft"
>// THIS WILL CAUSE AN ERROR function f() {}; const f = 5;
// THIS WILL
CAUSE AN ERROR ALSO function f() { const g = 5; var g; //statements
}</code
>
<p class="marginleft">
However, object attributes are not protected, so the following statement
is executed without problems.
</p>
<code class="marginleft"
>const MY_OBJECT = {"key": "value"}; MY_OBJECT.key = "otherValue";</code
>
</article>
</section>
<section class="main-section" id="DataTypes">
<header class="marginleft"> Data types</header>
<article>
<p class="marginleft">The latest ECMAScript standard defines seven data types:</p>
<p>Six data types that are primitives:</p>
<ul class="marginleft">
<li>Boolean. true and false.</li>
<li>
null. A special keyword denoting a null value. Because JavaScript
is case-sensitive, null is not the same as Null, NULL, or any
other variant.
</li>
<li>undefined. A top-level property whose value is undefined.</li>
<li>Number. 42 or 3.14159.</li>
<li>String. "Howdy"</li>
<li>
Symbol (new in ECMAScript 2015). A data type whose instances are
unique and immutable.
</li>
</li>
<li>and Object</li>
</ul>
<p class="marginleft">
Although these data types are a relatively small amount, they enable you
to perform useful functions with your applications. Objects and functions
are the other fundamental elements in the language. You can think of
objects as named containers for values, and functions as procedures that
your application can perform.
</p>
</article>
</section>
<section class="main-section" id="if...elseStatement">
<header class="marginleft"> if...else statement</header>
<article>
<p class="marginleft">
Use the if statement to execute a statement if a logical condition is
true. Use the optional else clause to execute a statement if the condition
is false. An if statement looks as follows:
</p>
<code class="marginleft">if (condition) { statement_1; } else { statement_2; }</code>
<p class="marginleft">
condition can be any expression that evaluates to true or false. See
Boolean for an explanation of what evaluates to true and false. If
condition evaluates to true, statement_1 is executed; otherwise,
statement_2 is executed. statement_1 and statement_2 can be any statement,
including further nested if statements.
</p>
<p class="marginleft">
You may also compound the statements using else if to have multiple
conditions tested in sequence, as follows:
</p>
<code style="margin-left: 300px"
>if (condition_1) { statement_1; } else if (condition_2) { statement_2;
} else if (condition_n) { statement_n; } else { statement_last; }
</code>
<p class="marginleft">
In the case of multiple conditions only the first logical condition which
evaluates to true will be executed. To execute multiple statements, group
them within a block statement ({ ... }) . In general, it's good practice
to always use block statements, especially when nesting if statements:
</p>
<code class="marginleft"
>if (condition) { statement_1_runs_if_condition_is_true;
statement_2_runs_if_condition_is_true; } else {
statement_3_runs_if_condition_is_false;
statement_4_runs_if_condition_is_false; }</code
>
<p class="marginleft">
It is advisable to not use simple assignments in a conditional expression,
because the assignment can be confused with equality when glancing over
the code. For example, do not use the following code:
</p>
<code class="marginleft">if (x = y) { /* statements here */ }</code> <p class="marginleft"> If you need to use an
assignment in a conditional expression, a common practice is to put
additional parentheses around the assignment. For example:
</p>
<code class="marginleft">if ((x = y)) { /* statements here */ }</code>
</article>
</section>
<section class="main-section" id="WhileStatement">
<header class="marginleft"> While statement</header>
<article>
<p class="marginleft">
A while statement executes its statements as long as a specified condition
evaluates to true. A while statement looks as follows:
</p>
<code class="marginleft">while (condition) statement</code> <p class="marginleft"> If the condition becomes false,
statement within the loop stops executing and control passes to the
statement following the loop.
</p>
<p class="marginleft">
The condition test occurs before statement in the loop is executed. If
the condition returns true, statement is executed and the condition is
tested again. If the condition returns false, execution stops and
control is passed to the statement following while.
</p>
<p class="marginleft">
To execute multiple statements, use a block statement ({ ... }) to group
those statements.
</p>
<p class="marginleft">
Example:
</p>
<p class="marginleft">The following while loop iterates as long as n is less than three:</p>
<code class="marginleft">var n = 0; var x = 0; while (n < 3) { n++; x += n; }</code>
<p class="marginleft">
With each iteration, the loop increments n and adds that value to x.
Therefore, x and n take on the following values:
</p>
<ul class="marginleft">
<li>After the first pass: n = 1 and x = 1</li>
<li>After the second pass: n = 2 and x = 3</li>
<li>After the third pass: n = 3 and x = 6</li>
</ul>
<p class="marginleft">
After completing the third pass, the condition n < 3 is no longer
true, so the loop terminates.
</p>
</article>
</section>
</section>
<section class="main-section" id="FunctionDeclarations">
<header class="marginleft" > Function declarations</header>
<article>
<p class="marginleft" >
A function definition (also called a function declaration, or function
statement) consists of the function keyword, followed by:
</p>
<ul class="marginleft" >
<li>The name of the function.</li>
<li>
A list of arguments to the function, enclosed in parentheses and
separated by commas.
</li>
<li>
The JavaScript statements that define the function, enclosed in curly
brackets, { }.
</li>
</ul>
<p class="marginleft" >
For example, the following code defines a simple function named square:
</p>
<code class="marginleft" >function square(number) { return number * number; }</code>
<p class="marginleft" >
The function square takes one argument, called number. The function
consists of one statement that says to return the argument of the
function (that is, number) multiplied by itself. The return statement
specifies the value returned by the function.
</p>
<code class="marginleft" >return number * number;</code>
<p class="marginleft" >
Primitive parameters (such as a number) are passed to functions by
value; the value is passed to the function, but if the function changes
the value of the parameter, this change is not reflected globally or in
the calling function.
</p>
</article>
</section>
<section class="main-section" id="Reference">
<header class="marginleft" > Reference</header>
<article>
<ul class="marginleft" >
<li>
All the documentation in this page is taken from
<a
href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide"
target="_blank"
>MDN</a
>
</li>
</ul>
</article>
</section>
</main>
Trying to target each active link with an Font-Awesome icon. I am trying to use a combination os "Content:before" AND "a::first-child".
Targeting the third a-link "contact us" with an icon, not working. Tried many combinations. Is this even possible? xD
.children.windowbg > a::first-child before{
content: "\f114";
font-family: fontawesome !important;
padding-right:5px;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"/>
<td class="children windowbg" colspan="3">
<strong>SUB-FORUMS</strong>: Report Copyright Violations, Disclaimer, Contact Us, Privacy policy
</td>
?
https://jsfiddle.net/rr78gfw1/
.windowbg a:nth-of-type(1):before{
content: "\f114";
font-family: fontawesome !important;
margin-left: -23px;
position :absolute;
color:red;
font-size:20px;
}
.windowbg a:nth-of-type(2):before{
content: "\f115";
font-family: fontawesome !important;
margin-left: -23px;
position :absolute;
color:red;
font-size:20px;
}
.windowbg a
{
margin-left:25px;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="children windowbg" colspan="3">
<strong>SUB-FORUMS</strong>: Report Copyright Violations, Disclaimer, Contact Us, Privacy policy
</div>
Some of the solutions mentioned here are not purely CSS solutions as they ask you to change the DOM structure.
You have not used the selectors rightly,There is no : before the before :P and a is not the first child.Use nth-of-type selector for this.
Also you cannot use td tags like that without a table.My demo is after replacing the td with a div.
Like this,
.windowbg a:nth-of-type(1):before{
content: "\f114";
font-family: fontawesome !important;
margin-left: -23px;
position :absolute;
color:red;
font-size:20px;
}
Fiddle link: https://jsfiddle.net/rr78gfw1/1/
you give a CLASS to your link and give him a font-family
.yourlink{
font-family: fantasy;
}
<td class="children windowbg" colspan="3">
<strong>SUB-FORUMS</strong>: Report Copyright Violations, Disclaimer, Contact Us, Privacy policy
</td>
In order to add font-awesome icons to your links, just use an <i> tag as <i class="fa fa-tags"></i> inside your anchor tags.
<td class="children windowbg" colspan="3">
<strong>SUB-FORUMS</strong>: Report Copyright Violations<i class="fa fa-tags"></i>, Disclaimer<i class="fa fa-exclamation"></i>, Contact Us<i class="fa fa-phone"></i>, Privacy policy<i class="fa fa-info"></i>
</td>
Refer here for demo
The other answers have preferable solutions. This one just explains errors in the code snippet
Pseudo-classes like :first-child are with a single colon, instead of two.
:first-child selects (in this case) an a tag that's the first child of .children.windowbg. The a tag you're trying to select is no the first child, but the first of it's type. Therefore, you should use :first-of-type.
To select a pseudo-element, use a colon (:before). Now you were selecting a before tag in the a tag.
A td tag without a table is not valid, and the tag is removed in the code snippet, so for the sake of testing, I wrapped it in a table and a tr tag.
.children.windowbg > a:first-of-type:before {
content: "\f114";
font-family: fontawesome !important;
padding-right: 5px;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" />
<table>
<tr>
<td class="children windowbg" colspan="3">
<strong>SUB-FORUMS</strong>: Report Copyright Violations, Disclaimer, Contact Us, Privacy policy
</td>
</tr>
</table>
The other answers are preferable, because when you change the order of the links or add one, you need to change the CSS (and because CSS isn't for non-dynamic styling). A better solution is to add the icons in the HTML.
Update
There is :first-of-type to select the first element of it's kind, usually in a certain parent. To select the last child, use :last-of-type. To select other children, use :nth-of-type(n), where n is the index of the element. The first element has index 1, not index 0. For example, to select the third element, use :nth-of-type(3).
But n is not limited by that. You can use odd and even to select odd and even elements, and you can make a calculation with n. Then it selects elements with an index that could be the answer when n is any whole number. For example, when you use :nth-of-type(2n):
Values for "n" | Indices
----------------------------
0 | 2 * 0 = 0
1 | 2 * 1 = 2
2 | 2 * 2 = 4
3 | 2 * 3 = 6
... | ...
This selects all elements with an index that is a multiple of 2, so all even elements. Another example is :nth-of-type(3+n):
Values for "n" | Indices
----------------------------
0 | 3 + 0 = 3
1 | 3 + 1 = 4
2 | 3 + 2 = 5
3 | 3 + 3 = 6
... | ...
This selects all elements, except the first two.
Explanation from MDN.
This goes the same for :first-child (:last-child, :nth-child(n)).
I'm having trouble getting the h1 and h2 tags to display at all in Internet Explorer. I looked at the CSS file but still couldn't see why it wouldn't work with IE9.
Here is the CSS code for the headers that are not showing up in IE:
.person h1
{
color: #475261;
font-size: 48px;
font-weight: 400;
letter-spacing: -1px;
margin-left: -60px;
}
.item h2
{
color: #06A;
font-family: Georgia, serif;
font-size: 22px;
font-weight: 400;
letter-spacing: -1px;
}
.item h2 a
{
color: #06A;
text-decoration: none;
}
Link: http://ItsNotch.com/experience
Cause of Problem
It appears that the h1 elements are being replaced by canvas elements by the cufon-yui.js script. According to this FAQ, it is known to not work in IE 9 Beta.
First Solution
However, they state there is a fix for it in their version 1.09i available at their official site.
Second Solution
If you look at item 8 of the FAQ, they say that if you don't want to update your js file, you can try some other code:
<!--[if gte IE 9]>
<script type="text/javascript">
Cufon.set('engine', 'canvas');
</script>
<![endif]-->
Read the FAQ for further instructions. I'm not sure if it will work though, just a warning.
Third Solution
You may also be interested in trying Typekit instead, which according to the cufon main site, also has the advantage of the text being selectable, which it currently isn't using cufon:
You might also want to take this
opportunity to try Typekit, a hosted,
#font-face-based alternative. Yes,
that means they support text
selection. It's the easiest way to
embrace standards.
Fourth Solution
You also always have the option of just not using one of these JavaScript-injected special fonts at all.
Replace cufon.js with the code given below, and problem solved.
/*
* Copyright (c) 2009 Simo Kinnunen.
* Licensed under the MIT license.
*
* #version 1.09i
*/
var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(function(E){var D=[],C=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,B;while(B=C.exec(E)){D.push(B[3]||B[1])}return D}),recognizesMedia:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},textAlign:function(E,D,B,C){if(D.get("textAlign")=="right"){if(B>0){E=" "+E}}else{if(B<C-1){E+=" "}}return E},textShadow:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),textTransform:(function(){var B={uppercase:function(C){return C.toUpperCase()},lowercase:function(C){return C.toLowerCase()},capitalize:function(C){return C.replace(/\b./g,function(D){return D.toUpperCase()})}};return function(E,D){var C=B[D.get("textTransform")];return C?C(E):E}})(),whiteSpace:(function(){var D={inline:1,"inline-block":1,"run-in":1};var C=/^\s+/,B=/\s+$/;return function(H,F,G,E){if(E){if(E.nodeName.toLowerCase()=="br"){H=H.replace(C,"")}}if(D[F.get("display")]){return H}if(!G.previousSibling){H=H.replace(C,"")}if(!G.nextSibling){H=H.replace(B,"")}return H}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.recognizesMedia(P||"all")){return true}if(!M||M.disabled){return false}try{var Q=M.cssRules,O;if(Q){search:for(var L=0,K=Q.length;O=Q[L],L<K;++L){switch(O.type){case 2:break;case 3:if(!G(O.styleSheet,O.media.mediaText)){return false}break;default:break search}}}}catch(N){}return true}function F(){if(document.createStyleSheet){return true}var L,K;for(K=0;L=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(D){var C=this.face=D.face,B={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=D.glyphs;this.w=D.w;this.baseSize=parseInt(C["units-per-em"],10);this.family=C["font-family"].toLowerCase();this.weight=C["font-weight"];this.style=C["font-style"]||"normal";this.viewBox=(function(){var F=C.bbox.split(/\s+/);var E={minX:parseInt(F[0],10),minY:parseInt(F[1],10),maxX:parseInt(F[2],10),maxY:parseInt(F[3],10)};E.width=E.maxX-E.minX;E.height=E.maxY-E.minY;E.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return E})();this.ascent=-parseInt(C.ascent,10);this.descent=-parseInt(C.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}this.add=function(F,E){D[F]=C.push(E)-1};this.repeat=function(){var E=arguments.length?B(arguments):C,F;for(var G=0;F=E[G++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return !!B}}function q(C,B,D){if(C.addEventListener){C.addEventListener(B,D,false)}else{if(C.attachEvent){C.attachEvent("on"+B,function(){return D.call(C,window.event)})}}}function v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},w={autoDetect:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},ignore:{applet:1,canvas:1,col:1,colgroup:1,head:1,iframe:1,map:1,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:true,selector:(window.Sizzle||(window.jQuery&&function(B){return jQuery(B)})||(window.dojo&&dojo.query)||(window.Ext&&Ext.query)||(window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query)||(window.$$&&function(B){return $$(B)})||(window.$&&function(B){return $(B)})||(document.querySelectorAll&&function(B){return document.querySelectorAll(B)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("vml",(function(){var e=document.namespaces;if(!e){return}e.add("cvml","urn:schemas-microsoft-com:vml");e=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize){return}b=null;var h=(document.documentMode||0)<8;document.write(('<style type="text/css">cufoncanvas{text-indent:0;}#media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}#media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(("cufon{text-indent:0;}#media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(e?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(a?"cufon canvas{position:relative;}":"cufon canvas{position:absolute;}")+"}#media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(f);function d(p,h){var n=0,m=0;var g=[],o=/([mrvxe])([^a-z]*)/g,k;generate:for(var j=0;k=o.exec(p);++j){var l=k[2].split(",");switch(k[1]){case"v":g[j]={m:"bezierCurveTo",a:[n+~~l[0],m+~~l[1],n+~~l[2],m+~~l[3],n+=~~l[4],m+=~~l[5]]};break;case"r":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(m,k){for(var j=0,h=m.length;j<h;++j){var g=m[j];k[g.m].apply(k,g.a)}}return function(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());