 $(document).ready(function(){	
		
		/* Menu System */
	/* ------------------------------------ */
	
	var config = {    
		sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
		interval: 100, // number = milliseconds for onMouseOver polling interval    
		over: showMenu, // function = onMouseOver callback (REQUIRED)    
		timeout: 100, // number = milliseconds delay before onMouseOut    
		out: hideMenu // function = onMouseOut callback (REQUIRED)    
	};

	$(".trigger").hoverIntent(config);

	function showMenu(){
		var id = $(this).attr("id");
		var container = '#'+id+' span';
		if($('#'+id+' a.pmt').attr("class")!='pmt active current')	{$('#'+id+' a.pmt').addClass('active');} else {$('#'+id+' a.pmt').addClass('_current').removeClass('current');}
		$("#menubar span").empty();
		$(container).empty();
		$('#'+id+'-child').clone().prependTo(container).slideDown("fast");
	}

	function hideMenu(){
		var id = $(this).attr("id");
		if($('#'+id+' a.pmt').attr("class")=='pmt active _current')	{$('#'+id+' a.pmt').addClass('current').removeClass('_current');} else {$('#'+id+' a.pmt').addClass('default').removeClass('active');}
		$("#menubar span").empty();
		$('#'+id+'-child').css("display","none"); 
	}
	
	
	/* Sharing */
	/* ------------------------------------ */
	
	
	$(".share").click(function() {
			
		// Get The Basic Post Data
		// ---------------------------------------------
		
		var cfg_ClickThroughLink 	= $(this);
		var cfg_Service 			= $(this).attr('id').toLowerCase();
		var cfg_DocTitle 			= document.title;
		var cfg_Doc_Location 		= parseUri(window.location);
		var cfg_DocSummary			= $(this).attr('name');
		var cfg_DocTags				= "Revenue Cycle Management, Revenue Cycle Management Software, Revenue Cycle Management Best Practices, Revenue Cycle Management Optimization";
		
		
		// Register The Supported Services
		// ---------------------------------------------
		var services = new Array();
	
		// Service {name, postToUrl, key_Url, Key_Title, Key_Summary, Key_Tags}
		
		services.push(new Array("digg",			"http://digg.com/submit?phase=2&","url","title",false,false));
		services.push(new Array("twitter",		"http://twitter.com/home?","status",false,false,false));
		services.push(new Array("stumbleupon",	"http://www.stumbleupon.com/submit?","url",false,false,false));
		services.push(new Array("delicious",	"http://del.icio.us/post?","url","title",false,false));
		services.push(new Array("facebook",		"http://www.facebook.com/share.php?","u",false,false,false));
		services.push(new Array("myspace",		"http://www.myspace.com/Modules/PostTo/Pages/?l=3&","u",false,false,false));
		services.push(new Array("google",		"http://www.google.com/bookmarks/mark?op=edit","bkmk","title","annotation","labels"));
		services.push(new Array("technorati",	"http://technorati.com/cosmos/search.html?","url",false,false,false));
		services.push(new Array("reddit",		"http://reddit.com/submit?","url",false,false,false));
		services.push(new Array("linkedin",		"http://www.linkedin.com/shareArticle?mini=true&source=http://www.xifin.com","url","title","summary",false));
	
				
		// Compile The Page URL
		// ---------------------------------------------
		
		var uriParts = new Array();
		
		uriParts.push('http://www.xifin.com');
		uriParts.push(cfg_Doc_Location['directoryPath'].toLowerCase());
		uriParts.push(cfg_Doc_Location['fileName'].toLowerCase());
		
		cfg_Doc_BaseUrl = implode("",uriParts);
		cfg_Doc_Location 	= cfg_Doc_BaseUrl;
		
		
		// Service Specific Settings
		// ---------------------------------------------
		
		if(cfg_Service=="twitter")	{
			if(cfg_DocSummary=="Press")	{
				var maxLength = 140;
				var titleLength = maxLength-(cfg_Doc_Location.length+15);
				cfg_Doc_Location = urlencode("XIFIN News: "+cfg_DocTitle.substring(0,titleLength)+" - ")+cfg_Doc_Location;
			} else if(cfg_DocSummary=="Resources")	{
				var maxLength = 140;
				var titleLength = maxLength-(cfg_Doc_Location.length+3);
				cfg_Doc_Location = urlencode(cfg_DocTitle.substring(0,titleLength)+" - ")+cfg_Doc_Location;
			} else {cfg_Doc_Location = urlencode(cfg_DocSummary)+" "+cfg_Doc_Location;}
		}
		
		
		// Get The Basic Post Data
		// ---------------------------------------------
		var request = new Array();
	
		for (i=0;i<services.length;i++) {
			
					
			if(cfg_Service == services[i][0])	{
				request.push(services[i][1]);
				request.push(services[i][2]+'='+cfg_Doc_Location);
				
				if(services[i].length>3)	{
					request.push(services[i][3]+'='+urlencode(cfg_DocTitle));
				}
				
				if(services[i].length>4)	{
					if(services[i][4])	{
						request.push(services[i][4]+'='+urlencode(cfg_DocSummary));
					}
				}
				
				if(services[i].length>4)	{
					if(services[i][5])	{
						request.push(services[i][5]+'='+urlencode(cfg_DocTags));
					}
				}
				
				var postUri = implode("&",request);
			}
		}
		
		cfg_ClickThroughLink.attr('href',postUri);
		
		//pageTrackerAlt._trackEvent("share", cfg_Service, "page", cfg_Doc_BaseUrl);
		
		return;
	});
	
	function implode(glue,pieces) {
		return ((pieces)?pieces.join(glue):pieces);
	}
	
	function parseUri(sourceUri){
   		var uriPartNames = ["source","protocol","authority","domain","port","path","directoryPath","fileName","query","anchor"];
    	var uriParts = new RegExp("^(?:([^:/?#.]+):)?(?://)?(([^:/?#]*)(?::(\\d*))?)?((/(?:[^?#](?![^?#/]*\\.[^?#/.]+(?:[\\?#]|$)))*/?)?([^?#/]*))?(?:\\?([^#]*))?(?:#(.*))?").exec(sourceUri);
    	var uri = {};
    
    	for(var i = 0; i < 10; i++){
    	    uri[uriPartNames[i]] = (uriParts[i] ? uriParts[i] : "");
    	}
    
    	// Always end directoryPath with a trailing backslash if a path was present in the source URI
    	// Note that a trailing backslash is NOT automatically inserted within or appended to the "path" key
    	if(uri.directoryPath.length > 0){
    	    uri.directoryPath = uri.directoryPath.replace(/\/?$/, "/");
    	}
    
    	return uri;
	}

	function urlencode(str) {
   
    	var histogram = {}, unicodeStr='', hexEscStr='';
    	var ret = (str+'').toString();
    
    	var replacer = function(search, replace, str) {
    	    var tmp_arr = [];
    	    tmp_arr = str.split(search);
    	    return tmp_arr.join(replace);
    	};
    
    	// The histogram is identical to the one in urldecode.
    	histogram["'"]   = '%27';
    	histogram['(']   = '%28';
    	histogram[')']   = '%29';
    	histogram['*']   = '%2A';
    	histogram['~']   = '%7E';
    	histogram['!']   = '%21';
    	histogram['%20'] = '+';
    	histogram['\u00DC'] = '%DC';
    	histogram['\u00FC'] = '%FC';
    	histogram['\u00C4'] = '%D4';
    	histogram['\u00E4'] = '%E4';
    	histogram['\u00D6'] = '%D6';
    	histogram['\u00F6'] = '%F6';
    	histogram['\u00DF'] = '%DF';
    	histogram['\u20AC'] = '%80';
    	histogram['\u0081'] = '%81';
    	histogram['\u201A'] = '%82';
    	histogram['\u0192'] = '%83';
    	histogram['\u201E'] = '%84';
    	histogram['\u2026'] = '%85';
    	histogram['\u2020'] = '%86';
    	histogram['\u2021'] = '%87';
    	histogram['\u02C6'] = '%88';
    	histogram['\u2030'] = '%89';
    	histogram['\u0160'] = '%8A';
    	histogram['\u2039'] = '%8B';
    	histogram['\u0152'] = '%8C';
    	histogram['\u008D'] = '%8D';
    	histogram['\u017D'] = '%8E';
    	histogram['\u008F'] = '%8F';
   		histogram['\u0090'] = '%90';
    	histogram['\u2018'] = '%91';
    	histogram['\u2019'] = '%92';
    	histogram['\u201C'] = '%93';
    	histogram['\u201D'] = '%94';
    	histogram['\u2022'] = '%95';
    	histogram['\u2013'] = '%96';
    	histogram['\u2014'] = '%97';
    	histogram['\u02DC'] = '%98';
    	histogram['\u2122'] = '%99';
    	histogram['\u0161'] = '%9A';
    	histogram['\u203A'] = '%9B';
    	histogram['\u0153'] = '%9C';
    	histogram['\u009D'] = '%9D';
    	histogram['\u017E'] = '%9E';
    	histogram['\u0178'] = '%9F';
    
    	// Begin with encodeURIComponent, which most resembles PHP's encoding functions
    	ret = encodeURIComponent(ret);

    	for (unicodeStr in histogram) {
    	    hexEscStr = histogram[unicodeStr];
    	    ret = replacer(unicodeStr, hexEscStr, ret); // Custom replace. No regexing
    	}
    
    	// Uppercase for full PHP compatibility
    	return ret.replace(/(\%([a-z0-9]{2}))/g, function(full, m1, m2) {
    	    return "%"+m2.toUpperCase();
    	});
	}
	
});
	
	
jQuery.preloadImages = function() {for(var i = 0; i<arguments.length; i++){jQuery("<img>").attr("src", arguments[i]);}}

$.preloadImages(
	"/ui/img/bubble-4.png",
	"/ui/img/bubble-5.png",
	"/ui/img/bubble-6.png",
	"/ui/img/bubble-7.png",
	"/ui/img/bubble-8.png"
);	

	
//jQuery HoverIntent Plugin
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
        
//jQuery Cycle Plugin
//http://jquery.malsup.com/cycle/
(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return }var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return }var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return }if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery)
       
/**
 * SWFObject v1.5.1: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*/
if(typeof deconcept=="undefined"){var deconcept={};}if(typeof deconcept.util=="undefined"){deconcept.util={};}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={};}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10]||"";},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15]||"";},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=[];var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+(this.getAttribute("style")||"")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+(this.getAttribute("style")||"")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

