CSS={AddClass:function(e,c){if(!e.className.match(new RegExp("\\b"+c+"\\b","i")))e.className+=(e.className?" ":"")+c},RemoveClass:function(e,c){e.className=e.className.replace(new RegExp(" \\b"+c+"\\b|\\b"+c+"\\b ?","gi"),"")}};Tabs={GoTo:function(contentId,skipReplace){var foundTab=false;var toc=document.getElementById("toc");if(toc){var lis=toc.getElementsByTagName("li");for(var j=0;j<lis.length;j++){var li=lis[j];var anchors=li.getElementsByTagName("a");for(var k=0;k<anchors.length;k++){if(anchors[k].hash=="#"+contentId){CSS.AddClass(li,"current");foundTab=true;break}else{CSS.RemoveClass(li,"current")}}}}
var divsToHide=[];var divs=document.getElementsByTagName("div");for(var i=0;i<divs.length;i++){var div=divs[i];if(div.className.match(/\bcontent\b/i)){if(div.id=="_"+contentId)div.style.display="block";else divsToHide.push(div)}}
for(var i=0;i<divsToHide.length;i++)divsToHide[i].style.display="none";if(!skipReplace)window.location.replace("#"+contentId)},OnClickHandler:function(e){if(!e)e=window.event;e.returnValue=false;Tabs.GoTo(this.hash.substring(1))},Init:function(){if(!document.getElementsByTagName)return;var anchors=document.getElementsByTagName("a");for(var i=0;i<anchors.length;i++){var a=anchors[i];if(a.hash)a.onclick=Tabs.OnClickHandler}
var contentId;if(window.location.hash)contentId=window.location.hash.substring(1);var divs=document.getElementsByTagName("div");for(var i=0;i<divs.length;i++){var div=divs[i];if(div.className.match(/\bcontent\b/i)){if(!contentId)contentId=div.id;div.id="_"+div.id}}
if(contentId)Tabs.GoTo(contentId,true)}};window.onload=Tabs.Init;var contentId=window.location.hash||"#Introduction";if(document.createStyleSheet){var style=document.createStyleSheet();style.addRule("div.content","display: none;");style.addRule("div"+contentId,"display: block;")}else{var head=document.getElementsByTagName("head")[0];if(head){var style=document.createElement("style");style.setAttribute("type","text/css");style.appendChild(document.createTextNode("div.content { display: none; }"));style.appendChild(document.createTextNode("div"+contentId+" { display: block; }"));head.appendChild(style)}}


/* SWFObject v2.2 alpha10 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2009 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var C="undefined",q="object",R="Shockwave Flash",V="ShockwaveFlash.ShockwaveFlash",p="application/x-shockwave-flash",Q="SWFObjectExprInst",w="onreadystatechange",N=window,j=document,s=navigator,S=false,T=[h],n=[],M=[],H=[],l,P,D,A,I=false,a=false,m,F,L=function(){var Z=typeof j.getElementById!=C&&typeof j.getElementsByTagName!=C&&typeof j.createElement!=C,af=[0,0,0],ab=null;if(typeof s.plugins!=C&&typeof s.plugins[R]==q){ab=s.plugins[R].description;if(ab&&!(typeof s.mimeTypes!=C&&s.mimeTypes[p]&&!s.mimeTypes[p].enabledPlugin)){S=true;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");af[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);af[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);af[2]=/r/.test(ab)?parseInt(ab.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof N.ActiveXObject!=C){try{var ac=new ActiveXObject(V);if(ac){ab=ac.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");af=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Y){}}}var ag=s.userAgent.toLowerCase(),X=s.platform.toLowerCase(),ae=/webkit/.test(ag)?parseFloat(ag.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,W=false,ad=X?/win/.test(X):/win/.test(ag),aa=X?/mac/.test(X):/mac/.test(ag);/*@cc_on W=true;@if(@_win32)ad=true;@elif(@_mac)aa=true;@end@*/return{w3:Z,pv:af,wk:ae,ie:W,win:ad,mac:aa}}(),k=function(){if(!L.w3){return}if((typeof j.readyState!=C&&j.readyState=="complete")||(typeof j.readyState==C&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!I){if(typeof j.addEventListener!=C){j.addEventListener("DOMContentLoaded",f,false)}if(L.ie&&L.win){j.attachEvent(w,function(){if(j.readyState=="complete"){j.detachEvent(w,arguments.callee);f()}});if(N==top){(function(){if(I){return}try{j.documentElement.doScroll("left")}catch(W){setTimeout(arguments.callee,0);return}f()})()}}if(L.wk){(function(){if(I){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}r(f)}}();function f(){if(I){return}try{var Y=j.getElementsByTagName("body")[0].appendChild(B("span"));Y.parentNode.removeChild(Y)}catch(Z){return}I=true;var W=T.length;for(var X=0;X<W;X++){T[X]()}}function J(W){if(I){W()}else{T[T.length]=W}}function r(X){if(typeof N.addEventListener!=C){N.addEventListener("load",X,false)}else{if(typeof j.addEventListener!=C){j.addEventListener("load",X,false)}else{if(typeof N.attachEvent!=C){i(N,"onload",X)}else{if(typeof N.onload=="function"){var W=N.onload;N.onload=function(){W();X()}}else{N.onload=X}}}}}function h(){if(S){U()}else{G()}}function U(){var W=j.getElementsByTagName("body")[0];var Z=B(q);Z.setAttribute("type",p);var Y=W.appendChild(Z);if(Y){var X=0;(function(){if(typeof Y.GetVariable!=C){var aa=Y.GetVariable("$version");if(aa){aa=aa.split(" ")[1].split(",");L.pv=[parseInt(aa[0],10),parseInt(aa[1],10),parseInt(aa[2],10)]}}else{if(X<10){X++;setTimeout(arguments.callee,10);return}}W.removeChild(Z);Y=null;setTimeout(G,10)})()}else{setTimeout(G,10)}}function G(){var af=n.length;if(af>0){for(var ae=0;ae<af;ae++){var X=n[ae].id;var aa=n[ae].callbackFn;var Z={success:false,id:X};if(L.pv[0]>0){var ad=c(X);if(ad){if(E(n[ae].swfVersion)&&!(L.wk&&L.wk<312)){v(X,true);if(aa){Z.success=true;Z.ref=y(X);aa(Z)}}else{if(n[ae].expressInstall&&z()){var ah={};ah.data=n[ae].expressInstall;ah.width=ad.getAttribute("width")||"0";ah.height=ad.getAttribute("height")||"0";if(ad.getAttribute("class")){ah.styleclass=ad.getAttribute("class")}if(ad.getAttribute("align")){ah.align=ad.getAttribute("align")}var ag={};var W=ad.getElementsByTagName("param");var ab=W.length;for(var ac=0;ac<ab;ac++){if(W[ac].getAttribute("name").toLowerCase()!="movie"){ag[W[ac].getAttribute("name")]=W[ac].getAttribute("value")}}O(ah,ag,X,aa)}else{o(ad);if(aa){aa(Z)}}}}}else{v(X,true);if(aa){var Y=y(X);if(Y){Z.success=true;Z.ref=Y}aa(Z)}}}}}function y(Z){var W=null;var X=c(Z);if(X&&X.nodeName=="OBJECT"){var Y=X.getElementsByTagName(q)[0];if(!Y||(Y&&typeof X.SetVariable!=C)){W=X}else{if(typeof Y.SetVariable!=C){W=Y}}}return W}function z(){return !a&&E("6.0.65")&&(L.win||L.mac)&&!(L.wk&&L.wk<312)}function O(Z,aa,W,Y){a=true;D=Y||null;A={success:false,id:W};var ad=c(W);if(ad){if(ad.nodeName=="OBJECT"){l=g(ad);P=null}else{l=ad;P=W}Z.id=Q;if(typeof Z.width==C||(!/%$/.test(Z.width)&&parseInt(Z.width,10)<310)){Z.width="310"}if(typeof Z.height==C||(!/%$/.test(Z.height)&&parseInt(Z.height,10)<137)){Z.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ac=L.ie&&L.win?"ActiveX":"PlugIn",ab="MMredirectURL="+N.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ac+"&MMdoctitle="+j.title;if(typeof aa.flashvars!=C){aa.flashvars+="&"+ab}else{aa.flashvars=ab}if(L.ie&&L.win&&ad.readyState!=4){var X=B("div");W+="SWFObjectNew";X.setAttribute("id",W);ad.parentNode.insertBefore(X,ad);ad.style.display="none";(function(){if(ad.readyState==4){ad.parentNode.removeChild(ad)}else{setTimeout(arguments.callee,10)}})()}t(Z,aa,W)}}function o(X){if(L.ie&&L.win&&X.readyState!=4){var W=B("div");X.parentNode.insertBefore(W,X);W.parentNode.replaceChild(g(X),W);X.style.display="none";(function(){if(X.readyState==4){X.parentNode.removeChild(X)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.replaceChild(g(X),X)}}function g(aa){var Z=B("div");if(L.win&&L.ie){Z.innerHTML=aa.innerHTML}else{var X=aa.getElementsByTagName(q)[0];if(X){var ab=X.childNodes;if(ab){var W=ab.length;for(var Y=0;Y<W;Y++){if(!(ab[Y].nodeType==1&&ab[Y].nodeName=="PARAM")&&!(ab[Y].nodeType==8)){Z.appendChild(ab[Y].cloneNode(true))}}}}}return Z}function t(ah,af,X){var W,Z=c(X);if(L.wk&&L.wk<312){return W}if(Z){if(typeof ah.id==C){ah.id=X}if(L.ie&&L.win){var ag="";for(var ad in ah){if(ah[ad]!=Object.prototype[ad]){if(ad.toLowerCase()=="data"){af.movie=ah[ad]}else{if(ad.toLowerCase()=="styleclass"){ag+=' class="'+ah[ad]+'"'}else{if(ad.toLowerCase()!="classid"){ag+=" "+ad+'="'+ah[ad]+'"'}}}}}var ae="";for(var ac in af){if(af[ac]!=Object.prototype[ac]){ae+='<param name="'+ac+'" value="'+af[ac]+'" />'}}Z.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ag+">"+ae+"</object>";M[M.length]=ah.id;W=c(ah.id)}else{var Y=B(q);Y.setAttribute("type",p);for(var ab in ah){if(ah[ab]!=Object.prototype[ab]){if(ab.toLowerCase()=="styleclass"){Y.setAttribute("class",ah[ab])}else{if(ab.toLowerCase()!="classid"){Y.setAttribute(ab,ah[ab])}}}}for(var aa in af){if(af[aa]!=Object.prototype[aa]&&aa.toLowerCase()!="movie"){e(Y,aa,af[aa])}}Z.parentNode.replaceChild(Y,Z);W=Y}}return W}function e(Y,W,X){var Z=B("param");Z.setAttribute("name",W);Z.setAttribute("value",X);Y.appendChild(Z)}function x(X){var W=c(X);if(W&&W.nodeName=="OBJECT"){if(L.ie&&L.win){W.style.display="none";(function(){if(W.readyState==4){b(X)}else{setTimeout(arguments.callee,10)}})()}else{W.parentNode.removeChild(W)}}}function b(Y){var X=c(Y);if(X){for(var W in X){if(typeof X[W]=="function"){X[W]=null}}X.parentNode.removeChild(X)}}function c(Y){var W=null;try{W=j.getElementById(Y)}catch(X){}return W}function B(W){return j.createElement(W)}function i(Y,W,X){Y.attachEvent(W,X);H[H.length]=[Y,W,X]}function E(Y){var X=L.pv,W=Y.split(".");W[0]=parseInt(W[0],10);W[1]=parseInt(W[1],10)||0;W[2]=parseInt(W[2],10)||0;return(X[0]>W[0]||(X[0]==W[0]&&X[1]>W[1])||(X[0]==W[0]&&X[1]==W[1]&&X[2]>=W[2]))?true:false}function u(ab,X,ac,aa){if(L.ie&&L.mac){return}var Z=j.getElementsByTagName("head")[0];if(!Z){return}var W=(ac&&typeof ac=="string")?ac:"screen";if(aa){m=null;F=null}if(!m||F!=W){var Y=B("style");Y.setAttribute("type","text/css");Y.setAttribute("media",W);m=Z.appendChild(Y);if(L.ie&&L.win&&typeof j.styleSheets!=C&&j.styleSheets.length>0){m=j.styleSheets[j.styleSheets.length-1]}F=W}if(L.ie&&L.win){if(m&&typeof m.addRule==q){m.addRule(ab,X)}}else{if(m&&typeof j.createTextNode!=C){m.appendChild(j.createTextNode(ab+" {"+X+"}"))}}}function v(Y,W){var X=W?"visible":"hidden";if(I&&c(Y)){c(Y).style.visibility=X}else{u("#"+Y,"visibility:"+X)}}function K(X){var Y=/[\\\"<>\.;]/;var W=Y.exec(X)!=null;return W&&typeof encodeURIComponent!=C?encodeURIComponent(X):X}var d=function(){if(L.ie&&L.win){window.attachEvent("onunload",function(){var ab=H.length;for(var aa=0;aa<ab;aa++){H[aa][0].detachEvent(H[aa][1],H[aa][2])}var Y=M.length;for(var Z=0;Z<Y;Z++){x(M[Z])}for(var X in L){L[X]=null}L=null;for(var W in swfobject){swfobject[W]=null}swfobject=null})}}();return{registerObject:function(aa,W,Z,Y){if(L.w3&&aa&&W){var X={};X.id=aa;X.swfVersion=W;X.expressInstall=Z;X.callbackFn=Y;n[n.length]=X;v(aa,false)}else{if(Y){Y({success:false,id:aa})}}},getObjectById:function(W){if(L.w3){return y(W)}},embedSWF:function(aa,ag,ad,af,X,Z,Y,ac,ae,ab){var W={success:false,id:ag};if(L.w3&&!(L.wk&&L.wk<312)&&aa&&ag&&ad&&af&&X){v(ag,false);J(function(){ad+="";af+="";var ai={};if(ae&&typeof ae===q){for(var ak in ae){ai[ak]=ae[ak]}}ai.data=aa;ai.width=ad;ai.height=af;var al={};if(ac&&typeof ac===q){for(var aj in ac){al[aj]=ac[aj]}}if(Y&&typeof Y===q){for(var ah in Y){if(typeof al.flashvars!=C){al.flashvars+="&"+ah+"="+Y[ah]}else{al.flashvars=ah+"="+Y[ah]}}}if(E(X)){var am=t(ai,al,ag);if(ai.id==ag){v(ag,true)}W.success=true;W.ref=am}else{if(Z&&z()){ai.data=Z;O(ai,al,ag,ab);return}else{v(ag,true)}}if(ab){ab(W)}})}else{if(ab){ab(W)}}},getFlashPlayerVersion:function(){return{major:L.pv[0],minor:L.pv[1],release:L.pv[2]}},hasFlashPlayerVersion:E,createSWF:function(Y,X,W){if(L.w3){return t(Y,X,W)}else{return undefined}},showExpressInstall:function(Y,Z,W,X){if(L.w3&&z()){O(Y,Z,W,X)}},removeSWF:function(W){if(L.w3){x(W)}},createCSS:function(Z,Y,X,W){if(L.w3){u(Z,Y,X,W)}},addDomLoadEvent:J,addLoadEvent:r,getQueryParamValue:function(Z){var Y=j.location.search||j.location.hash;if(Z==null){return K(Y)}if(Y){var X=Y.substring(1).split("&");for(var W=0;W<X.length;W++){if(X[W].substring(0,X[W].indexOf("="))==Z){return K(X[W].substring((X[W].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var W=c(Q);if(W&&l){W.parentNode.replaceChild(l,W);if(P){v(P,true);if(L.ie&&L.win){l.style.display="block"}}if(D){D(A)}}a=false}}}}();

/* Flex Level Drop Down Menu v1.0
* Created: Jan 5th, 2010 by DynamicDrive.com. This notice must stay intact for usage 
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/

//Usage: $(elementselector).addflexmenu('menuid')
//ie:
//jQuery(document).ready(function($){
	//$('a.mylinks').addflexmenu('flexmenu1') //apply flex menu with ID "flexmenu1" to links with class="mylinks"
//})

jQuery.noConflict()

var flexdropdownmenu={
	arrowpath: 'images/arrow.gif', //full URL or path to arrow image
	animspeed: 200, //reveal animation speed (in milliseconds)
	showhidedelay: [75, 150], //delay before menu appears and disappears when mouse rolls over it, in milliseconds

	//***** NO NEED TO EDIT BEYOND HERE
	startzindex:1000,
	builtflexmenuids: [], //ids of flex menus already built (to prevent repeated building of same flex menu)

	positionul:function($, $ul, e, $anchor){
		var istoplevel=$ul.hasClass('jqflexmenu') //Bool indicating whether $ul is top level flex menu DIV
		var docrightedge=$(document).scrollLeft()+$(window).width()-40 //40 is to account for shadows in FF
		var docbottomedge=$(document).scrollTop()+$(window).height()-40
		if (istoplevel){ //if main flex menu DIV
			var offsets=$anchor.offset()
			var anchorsetting=$anchor.data('setting')
			var x=offsets.left+anchorsetting.useroffsets[0]+(anchorsetting.dir=="h"? $anchor.outerWidth() : 0) //x pos of main flex menu UL
			var y=offsets.top+anchorsetting.useroffsets[1]+(anchorsetting.dir=="h"? 0 : $anchor.outerHeight())
			x=(x+$ul.data('dimensions').w > docrightedge)? x-(anchorsetting.useroffsets[0]*2)-$ul.data('dimensions').w+$anchor.outerWidth()+(anchorsetting.dir=="h"? -($anchor.outerWidth()*2) : 0) : x //if not enough horizontal room to the ridge of the cursor
			y=(y+$ul.data('dimensions').h > docbottomedge)? y-(anchorsetting.useroffsets[1]*2)-$ul.data('dimensions').h-$anchor.outerHeight()+(anchorsetting.dir=="h"? ($anchor.outerHeight()*2) : 0) : y
		}
		else{ //if sub level flex menu UL
			var $parentli=$ul.data('$parentliref')
			var parentlioffset=$parentli.offset()
			var x=$ul.data('dimensions').parentliw //x pos of sub UL
			var y=0
			x=(parentlioffset.left+x+$ul.data('dimensions').w > docrightedge)? x-$ul.data('dimensions').parentliw-$ul.data('dimensions').w : x //if not enough horizontal room to the ridge parent LI
			y=(parentlioffset.top+$ul.data('dimensions').h > docbottomedge)? y-$ul.data('dimensions').h+$ul.data('dimensions').parentlih : y
		}
		$ul.css({left:x, top:y})
	},
	
	showbox:function($, $flexmenu, e){
		clearTimeout($flexmenu.data('timers').hidetimer)
		$flexmenu.data('timers').showtimer=setTimeout(function(){$flexmenu.show(flexdropdownmenu.animspeed)}, this.showhidedelay[0])
	},

	hidebox:function($, $flexmenu){
		clearTimeout($flexmenu.data('timers').showtimer)
		$flexmenu.data('timers').hidetimer=setTimeout(function(){$flexmenu.hide(100)}, this.showhidedelay[1]) //hide flex menu plus all of its sub ULs
	},


	buildflexmenu:function($, $menu, $target){
		$menu.css({display:'block', visibility:'hidden', zIndex:this.startzindex}).addClass('jqflexmenu').appendTo(document.body)
		$menu.bind('mouseenter', function(){
			clearTimeout($menu.data('timers').hidetimer)
		})		
		$menu.bind('mouseleave', function(){ //hide menu when mouse moves out of it
			flexdropdownmenu.hidebox($, $menu)
		})
		$menu.data('dimensions', {w:$menu.outerWidth(), h:$menu.outerHeight()}) //remember main menu's dimensions
		$menu.data('timers', {})
		var $lis=$menu.find("ul").parent() //find all LIs within menu with a sub UL
		$lis.each(function(i){
			var $li=$(this).css({zIndex: 1000+i})
			var $subul=$li.find('ul:eq(0)').css({display:'block'}) //set sub UL to "block" so we can get dimensions
			$subul.data('dimensions', {w:$subul.outerWidth(), h:$subul.outerHeight(), parentliw:this.offsetWidth, parentlih:this.offsetHeight})
			$subul.data('$parentliref', $li) //cache parent LI of each sub UL
			$subul.data('timers', {})
			$li.data('$subulref', $subul) //cache sub UL of each parent LI
			$li.children("a:eq(0)").append( //add arrow images
				'<img src="'+flexdropdownmenu.arrowpath+'" class="rightarrowclass" style="border:0;" />'
			)
			$li.bind('mouseenter', function(e){ //show sub UL when mouse moves over parent LI
				var $targetul=$(this).css('zIndex', ++flexdropdownmenu.startzindex).addClass("selected").data('$subulref')
				if ($targetul.queue().length<=1){ //if 1 or less queued animations
					clearTimeout($targetul.data('timers').hidetimer)
					$targetul.data('timers').showtimer=setTimeout(function(){
						flexdropdownmenu.positionul($, $targetul, e)
						$targetul.show(flexdropdownmenu.animspeed)
					}, flexdropdownmenu.showhidedelay[0])
				}
			})
			$li.bind('mouseleave', function(e){ //hide sub UL when mouse moves out of parent LI
				var $targetul=$(this).data('$subulref')
				clearTimeout($targetul.data('timers').showtimer)
				$targetul.data('timers').hidetimer=setTimeout(function(){$targetul.hide(100).data('$parentliref').removeClass('selected')}, flexdropdownmenu.showhidedelay[1])
			})
		})
		$menu.find('ul').andSelf().css({display:'none', visibility:'visible'}) //collapse all ULs again
		this.builtflexmenuids.push($menu.get(0).id) //remember id of flex menu that was just built
	},

	

	init:function($, $target, $flexmenu){
		if (this.builtflexmenuids.length==0){ //only bind click event to document once
			$(document).bind("click", function(e){
				if (e.button==0){ //hide all flex menus (and their sub ULs) when left mouse button is clicked
					$('.jqflexmenu').find('ul').andSelf().hide()
				}
			})
		}
		if (jQuery.inArray($flexmenu.get(0).id, this.builtflexmenuids)==-1) //if this flex menu hasn't been built yet
			this.buildflexmenu($, $flexmenu, $target)
		if ($target.parents().filter('ul.jqflexmenu').length>0) //if $target matches an element within the flex menu markup, don't bind onflexmenu to that element
			return
		var useroffsets=$target.attr('data-offsets')? $target.attr('data-offsets').split(',') : [0,0] //get additional user offsets of menu
		useroffsets=[parseInt(useroffsets[0]), parseInt(useroffsets[1])]
		$target.data('setting', {dir: $target.attr('data-dir'), useroffsets: useroffsets}) //store direction (drop right or down) of menu plus user offsets
		$target.bind("mouseenter", function(e){
			$flexmenu.css('zIndex', ++flexdropdownmenu.startzindex)
			flexdropdownmenu.positionul($, $flexmenu, e, $target)
			flexdropdownmenu.showbox($, $flexmenu, e)
		})
		$target.bind("mouseleave", function(e){
			flexdropdownmenu.hidebox($, $flexmenu)
		})
	}
}

jQuery.fn.addflexmenu=function(flexmenuid, direction){
	var $=jQuery
	return this.each(function(){ //return jQuery obj
		var $target=$(this)
			flexdropdownmenu.init($, $target, $('#'+flexmenuid))
	})
};

//By default, add flex menu to anchor links with attribute "data-flexmenu"
jQuery(document).ready(function($){
		
	$('#tweets').tweetable({username: 'devstaff', time: false, limit:2, replies: false, position: 'append'});
	var $anchors=$('*[data-flexmenu]')
	$anchors.each(function(){
		$(this).addflexmenu(this.getAttribute('data-flexmenu'))
	})
})

 window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b<c;b++)J[a[b]]=!!(a[b]in n);return J}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));j[Q]=function(a){for(var b=0,c,h=a.length;b<h;b++){n.setAttribute("type",a[b]);if(c=n.type!==
 "text"){n.value=K;/tel|search/.test(n.type)||(c=/url|email/.test(n.type)?n.checkValidity&&n.checkValidity()===false:n.value!=K)}L[a[b]]=!!c}return L}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var j={},s=e.documentElement,D=e.createElement("modernizr"),m=D.style,n=e.createElement("input"),E="input",Q=E+"types",K=":)",M=Object.prototype.toString,y=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d={},L={},J={},N=[],u=function(){var a={select:"input",
 change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},b={};return function(c,h){var t=arguments.length==1;if(t&&b[c])return b[c];h=h||document.createElement(a[c]||"div");c="on"+c;var g=c in h;if(!g&&h.setAttribute){h.setAttribute(c,"return;");g=typeof h[c]=="function"}h=null;return t?(b[c]=g):g}}(),F={}.hasOwnProperty,O;O=typeof F!=="undefined"&&typeof F.call!=="undefined"?function(a,b){return F.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};
 d.canvas=function(){return!!e.createElement("canvas").getContext};d.canvastext=function(){return!!(d.canvas()&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.geolocation=function(){return!!navigator.geolocation};d.crosswindowmessaging=function(){return!!i.postMessage};d.websqldatabase=function(){var a=!!i.openDatabase;if(a)try{a=!!openDatabase("testdb","1.0","html5 test db",2E5)}catch(b){a=false}return a};d.indexedDB=function(){return!!i.indexedDB};d.hashchange=function(){return u("hashchange",
 i)&&(document.documentMode===I||document.documentMode>7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+
 m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!==
 -1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty",
 "WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a};
 d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";
 e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+
 (a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};
 d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker};
 d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg",
 "clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f,
 k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x<f.length;){k=f[x].media||k;h(f[x].imports,k);c(k,f[x].cssText.replace(l,q))}}for(var t=b.documentElement,g=b.createDocumentFragment(),o={},w="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",v=w.split("|"),p=[],H=-1,G="firstChild",A="createElement";++H<v.length;){b[A](v[H]);g[A](v[H])}g=
 g.appendChild(b[A]("div"));a.attachEvent("onbeforeprint",function(){for(var f,k=b.getElementsByTagName("*"),l,q,x=new RegExp("^"+w+"$","i"),B=-1;++B<k.length;)if((f=k[B])&&(q=f.nodeName.match(x))){l=new RegExp("^\\s*<"+q+"(.*)\\/"+q+">\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint",
 function(){for(var f=-1,k;++f<p.length;)p[f][1].parentNode.replaceChild(p[f][0],p[f][1]);for(k in o)t[G].removeChild(o[k]);o={};p=[]})}(this,e);j._enableHTML5=true;j._version="1.5";s.className=s.className.replace(/\bno-js\b/,"")+" js";s.className+=" "+N.join(" ");return j}(this,this.document);
 
 
 /*
 * tweetable 1.6 - jQuery twitter feed generator plugin
 *
 * Copyright (c) 2009 Philip Beel (http://www.theodin.co.uk/)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * With modifications from Philipp Robbel (http://www.robbel.com/) and Patrick DW (stackoverflow)
 * for IE compatibility.
 *
 * Revision: $Id: jquery.tweetable.js 2011-01-06 $ 
 *
 */
(function(a){a.fn.tweetable=function(b){var c={limit:5,username:"philipbeel",time:false,replies:false,position:"append"};var b=a.extend(c,b);return this.each(function(e){var d=a(this);var j;var i="";var f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var g="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=";var h="&count=";a.getJSON(g+c.username+h+c.limit+"&callback=?",d,function(k){a.each(k,function(m,n){if(m==0){j=a('<ul class="tweetList">')[c.position.toLowerCase()+"To"](d)}if(c.replies===false){if(n.in_reply_to_status_id===null){j.append('<li class="tweet_content_'+m+'"><p class="tweet_link_'+m+'">'+n.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2')+"</p></li>")}}else{j.append('<li class="tweet_content_'+m+'"><p class="tweet_link_'+m+'">'+n.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2')+"</p></li>")}if(c.time==true){for(var l=0;l<=12;l++){if(f[l]==n.created_at.substr(4,3)){i=l+1;if(i<10){i="0"+i}}}a(".tweet_link_"+m).append("<small> "+n.created_at.substr(8,2)+"/"+i+"/"+n.created_at.substr(26,4)+" "+n.created_at.substr(11,8)+"</small>")}})})})}})(jQuery);



