
var JSON;if(!JSON){JSON={};}
(function(){"use strict";function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==='string'){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());
$.belowthefold=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).height()+$(window).scrollTop();}else{var fold=$(settings.container).offset().top+$(settings.container).height();}
return fold<=$(element).offset().top-settings.threshold;};$.rightoffold=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).width()+$(window).scrollLeft();}else{var fold=$(settings.container).offset().left+$(settings.container).width();}
return fold<=$(element).offset().left-settings.threshold;};$.abovethetop=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).scrollTop();}else{var fold=$(settings.container).offset().top;}
return fold>=$(element).offset().top+settings.threshold+$(element).height();};$.leftofbegin=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).scrollLeft();}else{var fold=$(settings.container).offset().left;}
return fold>=$(element).offset().left+settings.threshold+$(element).width();};$.extend($.expr[':'],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"});
(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 ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
if(e.type=="mouseenter"){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.bind('mouseenter',handleHover).bind('mouseleave',handleHover);};})(jQuery);
window.U=window.U||{};U.get_jq_ui={has:false,go:function(){if(!U.get_jq_ui.has){$.getScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js');U.get_jq_ui.has=true;}}};
window.U=window.U||{};U.new_window={init:function(){$('a.new-window').live('click',function(){window.open($(this).attr('href'));return false;});}};
window.U=window.U||{};U.ajax_email_form={$parent:'',$submit:'',to_email:'',init:function(){U.ajax_email_form.$parent=$("#ajaxform");if(U.ajax_email_form.$parent.length>0){U.ajax_email_form.bind_on_submit();}},bind_on_submit:function(){U.ajax_email_form.$submit=U.ajax_email_form.$parent.find(':submit');U.ajax_email_form.$parent.submit(U.ajax_email_form.on_submit);U.ajax_email_form.to_email=U.ajax_email_form.$parent.data('to-email')||'sales@paloalto.com';},on_submit:function(){var success=true;$(this).find('.required').each(function(){if($(this).val().length>0){$(this).css({borderColor:'#cccccc'});}else{$(this).css({borderColor:'#d8000c'});success=false;}});if(!success){U.ajax_email_form.show_message('Required fields are empty');return false;}
U.ajax_email_form.show_message('Sending...');U.ajax_email_form.$submit.hide();var data={'to':U.ajax_email_form.to_email,'referer':window.location.href};$(this).find('select, input, textarea').each(function(){var name=$(this).attr('name');var type=$(this).attr('type');var value=$(this).val();if(type==='checkbox'||type=='radio'){if($(this).is(':checked')){if(data[name]){data[name]+=", "+value;}else{data[name]=value;}}}else{if(data[name]){data[name]+=", "+value;}else{data[name]=value;}}});$.getJSON('http://ws.paloalto.com/mail/ajax_email.php?callback=?',data,function(msg){U.ajax_email_form.show_message(msg.msg);if(msg.msg.indexOf('getting in touch')!==-1){U.ajax_email_form.$parent.find('label, select, input, textarea').slideUp();window.location.hash='ajaxform';}else{U.ajax_email_form.$submit.show();}});return false;},show_message:function(msg){$('.ajaxform-msg').remove();U.ajax_email_form.$submit.after('<p class="ajaxform-msg" style="font-weight:bold">'+msg+'</p>');}};
window.U=window.U||{};U.placeholder={init:function(){if(U.placeholder.has_no_support()){U.placeholder.run();}},has_no_support:function(){var input=document.createElement("input");if('placeholder'in input){$.fn.placeholder=$.fn.unplaceholder=function(){};input=null;return false;}
input=null;return true;},run:function(){$('input[placeholder], textarea[placeholder]').each(function(){if($(this).val()===''){$(this).val($(this).attr('placeholder'));}else{return false;}});$('input[placeholder], textarea[placeholder]').live('focusin focusout',function(event){if(event.type==='focusout'&&this.value===''){this.value=$(this).attr('placeholder');}else if(this.value===$(this).attr('placeholder')){this.value='';}else{return false;}});}};
window.U=window.U||{};U.tack_modal={current_name:'',body_string:'<div id="modal-overlay" style="display:none" /><div id="modal-body" style="display:none"><div id="modal-header"><div id="modal-header-title" class="af text-shadow" /><a href="#" id="modal-close" class="pngBg" /></div><div id="modal-content" /></div>',$trigger:'.modal-trigger',$contents:'.modal-content',$overlay:'',$body:'',$header:'',$title:'',$close:'',$content:'',default_width:700,default_height:450,head_height:0,use_position_absolute:false,init:function(){if($.browser.msie&&parseInt($.browser.version,10)<8){U.tack_modal.use_position_absolute=true;}
U.tack_modal.$trigger=$(U.tack_modal.$trigger);U.tack_modal.$contents=$(U.tack_modal.$contents);if(U.tack_modal.$contents.length>0){U.tack_modal.create_modal();U.tack_modal.test_hash();U.tack_modal.test_get();}},create_modal:function(){$('body').append(U.tack_modal.body_string);U.tack_modal.$overlay=$('#modal-overlay');U.tack_modal.$body=$('#modal-body');U.tack_modal.$header=$('#modal-header');U.tack_modal.$title=$('#modal-header-title');U.tack_modal.$close=$('#modal-close');U.tack_modal.$content=$('#modal-content');U.tack_modal.$trigger.live('click',U.tack_modal.click_trigger);U.tack_modal.$close.click(U.tack_modal.close_modal);U.tack_modal.$overlay.click(U.tack_modal.close_modal);$(document).keypress(function(e){if(e.which===27){U.tack_modal.close_modal();}});if(U.tack_modal.use_position_absolute){$(window).bind('scroll resize',function(){U.tack_modal.adjust_position();});U.tack_modal.$overlay.css('position','absolute');U.tack_modal.$body.css('position','absolute');}
U.tack_modal.head_height=U.tack_modal.$header.outerHeight(true);},click_trigger:function(){U.tack_modal.current_name=$(this).data('modal');U.tack_modal.change_content();if(_gaq!==undefined){_gaq.push(['_trackEvent','modal','click-trigger-open',U.tack_modal.current_name,1]);}
return false;},test_hash:function(){var hash=window.location.hash.substring(1),$match=U.tack_modal.$contents.filter('[data-modal="'+hash+'"]');if($match.length>0){U.tack_modal.current_name=hash;U.tack_modal.change_content();return false;}},test_get:function(){var get=U.tack_modal.parseQueryString(),hash=get.modal,$match;if(hash!==undefined){hash=hash[0];}
if(hash!==undefined){$match=U.tack_modal.$contents.filter('[data-modal="'+hash+'"]');}
if($match!==undefined&&$match.length>0){U.tack_modal.current_name=hash;U.tack_modal.change_content();return false;}},open_modal:function(string){var $match=U.tack_modal.$contents.filter('[data-modal="'+string+'"]');if($match.length>0){U.tack_modal.current_name=string;U.tack_modal.change_content();return false;}},change_content:function(){U.tack_modal.$content.empty();U.tack_modal.$title.empty();var $content_ref=U.tack_modal.$contents.filter('[data-modal="'+U.tack_modal.current_name+'"]'),$content=$content_ref.clone();U.tack_modal.check_and_add_video($content,$content_ref);U.tack_modal.check_matches_and_setup($content);U.tack_modal.adjust_size($content);if(U.tack_modal.use_position_absolute){U.tack_modal.adjust_position();}
U.tack_modal.show_modal();U.tack_modal.$content.trigger('ready');},check_matches_and_setup:function($content){if($content.length===0){U.tack_modal.$content.append('<p>No matching content.</p>');}else if($content.length>1){U.tack_modal.$content.append('<p>More than one matching content element.</p>');}else{U.tack_modal.$content.append($content.html());U.tack_modal.$title.append($content.attr('title'));}
U.tack_modal.$content.hide();},check_and_add_video:function($content,$content_ref){if($content_ref.data('youtube')!==undefined||$content_ref.data('vimeo')!==undefined){var vid={},vid_params,$vid;if($content_ref.data('vimeo')!==undefined){vid.type='vimeo';}else{vid.type='youtube';}
vid.data=$content_ref.data(vid.type);vid.data=vid.data.split(':');if(vid.type==='vimeo'){vid.code='http://player.vimeo.com/video/'+vid.data[0];vid.code+='?title=0&byline=0&portrait=0&autoplay=1';}else{vid.code='http://www.youtube.com/embed/'+vid.data[0];vid.code+='?hd=1&rel=0&wmode=opaque&autoplay=1';}
vid_params={width:vid.data[1],height:vid.data[2],frameborder:0,src:vid.code};$vid=$('<iframe />',vid_params);$content.prepend($vid);}},adjust_size:function($content){var h=$content.data('modal-height'),w=$content.data('modal-width'),p=$content.data('modal-pad'),total_height,total_width;w=parseInt(w,10)||false;h=parseInt(h,10)||false;p=parseInt(p,10)||0;if(h!==undefined&&h){total_height=h+p*2+U.tack_modal.head_height;U.tack_modal.$body.css({height:total_height,'margin-top':-(total_height/2)});U.tack_modal.$content.css({height:h,padding:p});}else{U.tack_modal.$body.css({height:U.tack_modal.default_height,'margin-top':-(U.tack_modal.default_height/2)});U.tack_modal.$content.css({height:U.tack_modal.default_height,padding:0});}
if(w!==undefined&&w){total_width=w+p*2;U.tack_modal.$body.css({width:total_width,'margin-left':-(total_width/2)});}else{U.tack_modal.$body.css({width:U.tack_modal.default_width,'margin-left':-(U.tack_modal.default_width/2)});}},adjust_position:function(){U.tack_modal.$overlay.css({top:$(window).scrollTop()});U.tack_modal.$body.css({top:$(window).scrollTop()+$(window).height()/2-U.tack_modal.$body.outerHeight()/2,'margin-top':0});},show_modal:function(){U.tack_modal.$overlay.fadeIn(100,function(){U.tack_modal.$body.show(500,function(){U.tack_modal.$content.show();});});},close_modal:function(){U.tack_modal.$content.trigger('close');if(_gaq!==undefined){_gaq.push(['_trackEvent','modal','close-modal',U.tack_modal.current_name,1]);}
U.tack_modal.$title.empty();U.tack_modal.$content.empty();U.tack_modal.$body.hide(500,function(){U.tack_modal.$overlay.fadeOut(100);});return false;}};U.tack_modal.parseQueryString=function(queryString){var result={};if(queryString===undefined){queryString=location.search?location.search:'';}
if(queryString.charAt(0)=='?')queryString=queryString.substring(1);queryString=queryString.replace(/\+/g,' ');var queryComponents=queryString.split(/[&;]/g);for(var i=0;i<queryComponents.length;i++){var keyValuePair=queryComponents[i].split('=');var key=decodeURIComponent(keyValuePair[0]);var value=decodeURIComponent(keyValuePair[1]);if(!result[key])result[key]=[];result[key].push((keyValuePair.length==1)?'':value);}
return result;};
window.U=window.U||{};U.tablet={$parent:'',$buttons:'',$content:'',current:0,in_transition:false,init:function(){U.tablet.$parent=$('.tablet');if(U.tablet.$parent.length>0){U.get_jq_ui.go();U.tablet.add_functionality();}},add_functionality:function(){U.tablet.$buttons=U.tablet.$parent.find('header a');U.tablet.$content=U.tablet.$parent.find('div');U.tablet.$buttons.eq(U.tablet.current).addClass('current');U.tablet.$buttons.click(U.tablet.click_button);},click_button:function(){if(!U.tablet.in_transition&&U.tablet.current!==$(this).index()){U.tablet.in_transition=true;U.tablet.$content.eq(U.tablet.current).hide('slide',{direction:'left'},500);U.tablet.$buttons.removeClass('current');U.tablet.current=$(this).index();U.tablet.$buttons.eq(U.tablet.current).addClass('current');U.tablet.$content.eq(U.tablet.current).show('slide',{direction:'right'},500,function(){U.tablet.in_transition=false;});}
return false;}};
var jaaulde=window.jaaulde||{};jaaulde.utils=jaaulde.utils||{};jaaulde.utils.cookies=(function()
{var resolveOptions,assembleOptionsString,parseCookies,constructor,defaultOptions={expiresAt:null,path:'/',domain:null,secure:false};resolveOptions=function(options)
{var returnValue,expireDate;if(typeof options!=='object'||options===null)
{returnValue=defaultOptions;}
else
{returnValue={expiresAt:defaultOptions.expiresAt,path:defaultOptions.path,domain:defaultOptions.domain,secure:defaultOptions.secure};if(typeof options.expiresAt==='object'&&options.expiresAt instanceof Date)
{returnValue.expiresAt=options.expiresAt;}
else if(typeof options.hoursToLive==='number'&&options.hoursToLive!==0)
{expireDate=new Date();expireDate.setTime(expireDate.getTime()+(options.hoursToLive*60*60*1000));returnValue.expiresAt=expireDate;}
if(typeof options.path==='string'&&options.path!=='')
{returnValue.path=options.path;}
if(typeof options.domain==='string'&&options.domain!=='')
{returnValue.domain=options.domain;}
if(options.secure===true)
{returnValue.secure=options.secure;}}
return returnValue;};assembleOptionsString=function(options)
{options=resolveOptions(options);return((typeof options.expiresAt==='object'&&options.expiresAt instanceof Date?'; expires='+options.expiresAt.toGMTString():'')+'; path='+options.path+
(typeof options.domain==='string'?'; domain='+options.domain:'')+
(options.secure===true?'; secure':''));};parseCookies=function()
{var cookies={},i,pair,name,value,separated=document.cookie.split(';'),unparsedValue;for(i=0;i<separated.length;i=i+1)
{pair=separated[i].split('=');name=pair[0].replace(/^\s*/,'').replace(/\s*$/,'');try
{value=decodeURIComponent(pair[1]);}
catch(e1)
{value=pair[1];}
if(typeof JSON==='object'&&JSON!==null&&typeof JSON.parse==='function')
{try
{unparsedValue=value;value=JSON.parse(value);}
catch(e2)
{value=unparsedValue;}}
cookies[name]=value;}
return cookies;};constructor=function(){};constructor.prototype.get=function(cookieName)
{var returnValue,item,cookies=parseCookies();if(typeof cookieName==='string')
{returnValue=(typeof cookies[cookieName]!=='undefined')?cookies[cookieName]:null;}
else if(typeof cookieName==='object'&&cookieName!==null)
{returnValue={};for(item in cookieName)
{if(typeof cookies[cookieName[item]]!=='undefined')
{returnValue[cookieName[item]]=cookies[cookieName[item]];}
else
{returnValue[cookieName[item]]=null;}}}
else
{returnValue=cookies;}
return returnValue;};constructor.prototype.filter=function(cookieNameRegExp)
{var cookieName,returnValue={},cookies=parseCookies();if(typeof cookieNameRegExp==='string')
{cookieNameRegExp=new RegExp(cookieNameRegExp);}
for(cookieName in cookies)
{if(cookieName.match(cookieNameRegExp))
{returnValue[cookieName]=cookies[cookieName];}}
return returnValue;};constructor.prototype.set=function(cookieName,value,options)
{if(typeof options!=='object'||options===null)
{options={};}
if(typeof value==='undefined'||value===null)
{value='';options.hoursToLive=-8760;}
else if(typeof value!=='string')
{if(typeof JSON==='object'&&JSON!==null&&typeof JSON.stringify==='function')
{value=JSON.stringify(value);}
else
{throw new Error('cookies.set() received non-string value and could not serialize.');}}
var optionsString=assembleOptionsString(options);document.cookie=cookieName+'='+encodeURIComponent(value)+optionsString;};constructor.prototype.del=function(cookieName,options)
{var allCookies={},name;if(typeof options!=='object'||options===null)
{options={};}
if(typeof cookieName==='boolean'&&cookieName===true)
{allCookies=this.get();}
else if(typeof cookieName==='string')
{allCookies[cookieName]=true;}
for(name in allCookies)
{if(typeof name==='string'&&name!=='')
{this.set(name,null,options);}}};constructor.prototype.test=function()
{var returnValue=false,testName='cT',testValue='data';this.set(testName,testValue);if(this.get(testName)===testValue)
{this.del(testName);returnValue=true;}
return returnValue;};constructor.prototype.setOptions=function(options)
{if(typeof options!=='object')
{options=null;}
defaultOptions=resolveOptions(options);};return new constructor();})();(function()
{if(window.jQuery)
{(function($)
{$.cookies=jaaulde.utils.cookies;var extensions={cookify:function(options)
{return this.each(function()
{var i,nameAttrs=['name','id'],name,$this=$(this),value;for(i in nameAttrs)
{if(!isNaN(i))
{name=$this.attr(nameAttrs[i]);if(typeof name==='string'&&name!=='')
{if($this.is(':checkbox, :radio'))
{if($this.attr('checked'))
{value=$this.val();}}
else if($this.is(':input'))
{value=$this.val();}
else
{value=$this.html();}
if(typeof value!=='string'||value==='')
{value=null;}
$.cookies.set(name,value,options);break;}}}});},cookieFill:function()
{return this.each(function()
{var n,getN,nameAttrs=['name','id'],name,$this=$(this),value;getN=function()
{n=nameAttrs.pop();return!!n;};while(getN())
{name=$this.attr(n);if(typeof name==='string'&&name!=='')
{value=$.cookies.get(name);if(value!==null)
{if($this.is(':checkbox, :radio'))
{if($this.val()===value)
{$this.attr('checked','checked');}
else
{$this.removeAttr('checked');}}
else if($this.is(':input'))
{$this.val(value);}
else
{$this.html(value);}}
break;}}});},cookieBind:function(options)
{return this.each(function()
{var $this=$(this);$this.cookieFill().change(function()
{$this.cookify(options);});});}};$.each(extensions,function(i)
{$.fn[i]=this;});})(window.jQuery);}})();
window.U=window.U||{};U.rotator={$articles:'',count:0,max:0,init:function(selector){if(!selector){return false;}
U.rotator.$articles=$(selector);if(U.rotator.$articles.length>0){U.rotator.max=U.rotator.$articles.length;U.rotator.$articles.hide().first().show().delay(5000).queue(U.rotator.hide_current);}},hide_current:function(){var $current=U.rotator.$articles.eq(U.rotator.count);$current.stop(true,true).fadeOut(200,U.rotator.show_next);},show_next:function(){U.rotator.count++;if(U.rotator.count>=U.rotator.max){U.rotator.count=0;}
var $next=U.rotator.$articles.eq(U.rotator.count);$next.stop(true,true).fadeIn(500).delay(5000).queue(U.rotator.hide_current);}};
window.U=window.U||{};U.init_objs=function(parent,objs){if(parent===undefined||objs===undefined){return false;}
if(objs.constructor==Array){for(var i in objs){var obj=parent[objs[i]];if(obj!==undefined&&$.isFunction(obj.init)){obj.init();}}}else if(parent[objs]!==undefined&&$.isFunction(parent[objs].init)){parent[objs].init();}};U.test_in_url=function(test){return window.location.href.indexOf(test)!==-1;};
window.PS={};$(function(){U.init_objs(U,['tack_modal','new_window','placeholder','tablet','ajax_email_form']);U.init_objs(PS,['site_nav','network_slider','breadcrumbs_last_remove','mac_liveplan_check','track_banners','home_slider','to_us']);if(U.test_in_url('leadership')){U.rotator.init('.leadership-overview-image');}
if(U.test_in_url('business_plan_software')){U.init_objs(PS,['cart_menu','bpp_ov_tabs','bpp_ov_slideshow','bpp_ov_tabs_aside','bpp_reviews_top_quotes','bpp_reviews_quotes_horizontal','masterplanner_add_title','masterplanner_pullup']);U.rotator.init('#bpp-overview-slide-quotes blockquote');}});PS.site_nav={$sliders:'',intent_delay:600,init:function(){this.$sliders=$('#site-header .sub_nav, #site-header-products, #site-header-support');this.$sliders.each(function(){$(this).css({display:'block'});if($.support.opacity){$(this).fadeTo(0,0.95);}
$(this).hide();});$('.site-header-nav-main-li').hoverIntent({over:PS.site_nav.show,out:PS.site_nav.hide,timeout:PS.site_nav.intent_delay});$('#site-nav-products, #site-nav-support').hoverIntent({over:PS.site_nav.show_panel,out:PS.site_nav.hide_panel,timeout:PS.site_nav.intent_delay});if($.support.opacity){this.$sliders.hover(function(){$(this).fadeTo(100,1);},function(){$(this).fadeTo(100,0.95);});}
$(window).unload(function(){PS.site_nav=null;});},show:function(){PS.site_nav.$sliders.hide();if($.support.opacity){$(this).find('ul').slideDown(150);}else{$(this).find('ul').show();}},hide:function(){if($.support.opacity){$(this).find('ul').slideUp(150);}else{$(this).find('ul').hide();}},show_panel:function(){PS.site_nav.$sliders.hide();if($.support.opacity){$(this).find('div').slideDown(150);}else{$(this).find('div').show();}},hide_panel:function(){if($.support.opacity){$(this).find('div').slideUp(150);}else{$(this).find('div').hide();}}};PS.network_slider={$parent:'',init:function(){PS.network_slider.$parent=$("#site-footer-full-paloalto");if(PS.network_slider.$parent.length>0){PS.network_slider.bind_slide();}},bind_slide:function(){$("#site-footer-full-paloalto").hoverIntent({'over':function(){PS.network_slider.$parent.find('ul').slideToggle(300);},'out':function(){PS.network_slider.$parent.find('ul').slideToggle(300);},'timeout':600});}};PS.breadcrumbs_last_remove={$parent:'',init:function(){PS.breadcrumbs_last_remove.$parent=$('menu#breadcrumbs');if(PS.breadcrumbs_last_remove.$parent.length>0){PS.breadcrumbs_last_remove.remove_last_arrow();}},remove_last_arrow:function(){PS.breadcrumbs_last_remove.$parent.find('li').filter(':last').css({background:'none'});}};PS.cart_menu={$button:'',$menu:'',init:function(){PS.cart_menu.$button=$('.add-to-cart-menu').parent();PS.cart_menu.$menu=$('#add-to-cart-menu-drop');if(PS.cart_menu.$button.length>0){PS.cart_menu.add_hover();}},add_hover:function(){PS.cart_menu.$button.hoverIntent({over:function(){PS.cart_menu.$menu.slideDown(150);},out:function(){PS.cart_menu.$menu.slideUp(150);},timeout:600});$('.add-to-cart-menu').click(function(){return false;});}};PS.bpp_ov_tabs={$tabs:'',$articles:'',current:'',init:function(){if($('body').hasClass('ie6')){PS.bpp_ov_tabs_ie6.init();return false;}
PS.bpp_ov_tabs.$tabs=$('#bpp-overview-tabs-menu li, #bpp-overview-tabs-menu-light li');PS.bpp_ov_tabs.$articles=$('.bpp-overview-tab-c');if(PS.bpp_ov_tabs.$tabs.length>0){PS.bpp_ov_tabs.add_click();}},add_click:function(){PS.bpp_ov_tabs.$tabs.click(function(){var id=$(this).index();if(id!==PS.bpp_ov_tabs.current){PS.bpp_ov_tabs.$tabs.removeClass('current').eq(id).addClass('current');PS.bpp_ov_tabs.$articles.eq(PS.bpp_ov_tabs.current).fadeOut(250,function(){PS.bpp_ov_tabs.$articles.eq(id).fadeIn(250);});}
PS.bpp_ov_tabs.current=id;});}};PS.bpp_ov_tabs_ie6={init:function(){PS.bpp_ov_tabs.$tabs=$('#bpp-overview-tabs-menu');PS.bpp_ov_tabs.$articles=$('.bpp-overview-tab-c');if(PS.bpp_ov_tabs.$tabs.length>0){PS.bpp_ov_tabs.$tabs.hide();PS.bpp_ov_tabs.$articles.show(100);}}};PS.bpp_ov_slideshow={currentImage:0,prev_image:0,html:'<div id="slideshow-menu"><a id="slideshow-left" href="#" name="slideshow-left">Left</a><a id="slideshow-right" href="#" name="slideshow-right">Right</a><a id="slideshow-buy-now" class="action-button-140 pngBg" href="/uk/business_plan_software/compare" name="slideshow-buy-now">Buy Now!</a></div>',$parent:'',$images:'',init:function(){this.$parent=$('#bpp-overview-slideshow-content');if($('#bpp-overview-slideshow-content').length>0){U.tack_modal.$content.bind('ready',function(){PS.bpp_ov_slideshow.begin();});}},begin:function(){PS.bpp_ov_slideshow.$images=$('#modal-content img');if(PS.bpp_ov_slideshow.$images.length===0){return false;}
$('#modal-content').css({position:'relative'});PS.bpp_ov_slideshow.$images.css({display:'none',position:'absolute'});PS.bpp_ov_slideshow.$images.each(function(){$(this).attr('src',$(this).data('src'));});$('#modal-content').append(PS.bpp_ov_slideshow.html);var max_width=400-40;for(var i=0;i<PS.bpp_ov_slideshow.$images.length;i++){if(true){var l_left=max_width/PS.bpp_ov_slideshow.$images.length*i+47;var $bullet=$('<a class="slideshow-bullet" href="#"></a>');$bullet.insertBefore('#slideshow-right');$bullet.css({'left':l_left});}}
$('.slideshow-bullet').click(PS.bpp_ov_slideshow.handleBulletClick);$('#slideshow-left').click(function(){return PS.bpp_ov_slideshow.handleDirClick('L');});$('#slideshow-right').click(function(){return PS.bpp_ov_slideshow.handleDirClick('R');});$(document).bind('keypress',PS.bpp_ov_slideshow.bindKeys);PS.bpp_ov_slideshow.updateImage();},bindKeys:function(e){switch(e.which){case 39:PS.bpp_ov_slideshow.handleDirClick('R');break;case 32:PS.bpp_ov_slideshow.handleDirClick('R');break;case 37:PS.bpp_ov_slideshow.handleDirClick('L');break;}},handleBulletClick:function(){if($(this).index()-1!==PS.bpp_ov_slideshow.currentImage){PS.bpp_ov_slideshow.currentImage=$(this).index()-1;return PS.bpp_ov_slideshow.updateImage();}
else{return false;}},handleDirClick:function(str){if(str==='L'){PS.bpp_ov_slideshow.currentImage--;}else{PS.bpp_ov_slideshow.currentImage++;}
return PS.bpp_ov_slideshow.updateImage();},updateImage:function(){PS.bpp_ov_slideshow.$images.eq(PS.bpp_ov_slideshow.prev_image).fadeOut(500);if(PS.bpp_ov_slideshow.currentImage>=PS.bpp_ov_slideshow.$images.length){PS.bpp_ov_slideshow.currentImage=0;}
if(PS.bpp_ov_slideshow.currentImage<0){PS.bpp_ov_slideshow.currentImage=PS.bpp_ov_slideshow.$images.length-1;}
PS.bpp_ov_slideshow.prev_image=PS.bpp_ov_slideshow.currentImage;$('.slideshow-bullet').each(function(){$(this).removeClass('slideshow-bullet-current');});$('.slideshow-bullet').eq(PS.bpp_ov_slideshow.currentImage).addClass('slideshow-bullet-current');PS.bpp_ov_slideshow.$images.eq(PS.bpp_ov_slideshow.currentImage).fadeIn(500);return false;}};PS.bpp_reviews_top_quotes={$parent:'',$quotes:'',$cites:'',count:0,timer:0,init:function(){if($('body').hasClass('ie8')||$('body').hasClass('ie7')||$('body').hasClass('ie6')){return false;}
PS.bpp_reviews_top_quotes.$parent=$('#bpp-reviews-quotes');if(PS.bpp_reviews_top_quotes.$parent.length>0){PS.bpp_reviews_top_quotes.$quotes=$('#bpp-reviews-quotes-blockquotes blockquote');PS.bpp_reviews_top_quotes.$cites=$('#bpp-reviews-quotes-cites li');PS.bpp_reviews_top_quotes.start_tick();}},start_tick:function(){PS.bpp_reviews_top_quotes.timer=setTimeout(function(){PS.bpp_reviews_top_quotes.tick();},5000);PS.bpp_reviews_top_quotes.$cites.hover(function(){PS.bpp_reviews_top_quotes.$quotes.hide();PS.bpp_reviews_top_quotes.count=$(this).index();PS.bpp_reviews_top_quotes.update_quotes();},function(){PS.bpp_reviews_top_quotes.timer=setTimeout(function(){PS.bpp_reviews_top_quotes.tick();},1000);});},tick:function(){PS.bpp_reviews_top_quotes.count++;if(PS.bpp_reviews_top_quotes.count>=PS.bpp_reviews_top_quotes.$quotes.length){PS.bpp_reviews_top_quotes.count=0;}
PS.bpp_reviews_top_quotes.update_quotes();PS.bpp_reviews_top_quotes.timer=setTimeout(function(){PS.bpp_reviews_top_quotes.tick();},5000);},update_quotes:function(){clearTimeout(PS.bpp_reviews_top_quotes.timer);PS.bpp_reviews_top_quotes.$quotes.fadeOut(250).eq(PS.bpp_reviews_top_quotes.count).fadeIn(250);PS.bpp_reviews_top_quotes.$cites.removeClass('current').eq(PS.bpp_reviews_top_quotes.count).addClass('current');}};PS.bpp_reviews_quotes_horizontal={$parent:'',$buttons:'',$back:'',$next:'',$quotes:'',count:'',timer:'',in_transition:false,init:function(){PS.bpp_reviews_quotes_horizontal.$parent=$('#bpp-reviews-excerpts');if(PS.bpp_reviews_quotes_horizontal.$parent.length>0){PS.bpp_reviews_quotes_horizontal.$buttons=PS.bpp_reviews_quotes_horizontal.$parent.find('a');PS.bpp_reviews_quotes_horizontal.$back=PS.bpp_reviews_quotes_horizontal.$buttons.filter('.back');PS.bpp_reviews_quotes_horizontal.$next=PS.bpp_reviews_quotes_horizontal.$buttons.filter('.next').addClass('active');PS.bpp_reviews_quotes_horizontal.$quotes=PS.bpp_reviews_quotes_horizontal.$parent.find('blockquote');PS.bpp_reviews_quotes_horizontal.start_tick();}},start_tick:function(){PS.bpp_reviews_quotes_horizontal.$buttons.click(PS.bpp_reviews_quotes_horizontal.click_button);},tick:function(){PS.bpp_reviews_quotes_horizontal.count++;if(PS.bpp_reviews_quotes_horizontal.count>PS.bpp_reviews_quotes_horizontal.$quotes.length-4){PS.bpp_reviews_quotes_horizontal.count=PS.bpp_reviews_quotes_horizontal.$quotes.length-4;}
else{PS.bpp_reviews_quotes_horizontal.update_scroll('back');}},manage_active_state:function(){if(PS.bpp_reviews_quotes_horizontal.count===0){PS.bpp_reviews_quotes_horizontal.$back.removeClass('active');PS.bpp_reviews_quotes_horizontal.$next.addClass('active');}else if(PS.bpp_reviews_quotes_horizontal.count>=PS.bpp_reviews_quotes_horizontal.$quotes.length-4){PS.bpp_reviews_quotes_horizontal.$back.addClass('active');PS.bpp_reviews_quotes_horizontal.$next.removeClass('active');}else{PS.bpp_reviews_quotes_horizontal.$back.addClass('active');PS.bpp_reviews_quotes_horizontal.$next.addClass('active');}},click_button:function(){if(!PS.bpp_reviews_quotes_horizontal.in_transition){if($(this).hasClass('back')){PS.bpp_reviews_quotes_horizontal.count--;if(PS.bpp_reviews_quotes_horizontal.count>=0){PS.bpp_reviews_quotes_horizontal.update_scroll('next');}else{PS.bpp_reviews_quotes_horizontal.count=0;}}
else{PS.bpp_reviews_quotes_horizontal.tick();}}
return false;},update_scroll:function(type){PS.bpp_reviews_quotes_horizontal.manage_active_state();clearTimeout(PS.bpp_reviews_quotes_horizontal.timer);PS.bpp_reviews_quotes_horizontal.in_transition=true;switch(type){case'back':PS.bpp_reviews_quotes_horizontal.$quotes.eq(PS.bpp_reviews_quotes_horizontal.count-1).hide(250,function(){PS.bpp_reviews_quotes_horizontal.$quotes.eq(PS.bpp_reviews_quotes_horizontal.count+3).stop(true,true).show(250,function(){PS.bpp_reviews_quotes_horizontal.in_transition=false;});});break;case'next':PS.bpp_reviews_quotes_horizontal.$quotes.eq(PS.bpp_reviews_quotes_horizontal.count+4).hide(250,function(){PS.bpp_reviews_quotes_horizontal.$quotes.eq(PS.bpp_reviews_quotes_horizontal.count).stop(true,true).show(250,function(){PS.bpp_reviews_quotes_horizontal.in_transition=false;});});break;}}};PS.bpp_ov_tabs_aside={$parent:'',init:function(){this.$parent=$('.bpp-overview-tabs-aside');if(this.$parent.length>0){this.$parent.click(function(){window.location='/business_plan_software/reviews';});}}};PS.track_banners={$banner:'',init:function(){PS.track_banners.$banner=$('#page-content-banner a, #listing-market-reports-ad a, #listing-shipping-ad a');PS.track_banners.$banner.click(function(){_gaq.push(['_trackEvent','banner','click',window.location.href,1]);window.location=$(this).attr('href');return false;});}};PS.home_slider={previous_panel:-1,current_panel:0,num_panels:0,$parent:0,$articles:0,$images:0,$learn_more:0,$nav_ul:0,$nav_items:0,timer:0,mode_change:3,width:940,time_between:8500,time_transition:500,is_mode_b:false,in_transition:false,is_hovering:false,init:function(){PS.home_slider.$parent=$('#home-slider');if($('body').hasClass('ie6')){$('.back-arrow, .next-arrow').hide();return false;}
if(PS.home_slider.$parent.length>0){U.get_jq_ui.go();var interval=setInterval(function(){if($.ui!==undefined){PS.home_slider.init_sequence();clearInterval(interval);}},100);}},init_sequence:function(){var self=PS.home_slider;self.define_values();self.define_init_functionality();$('#home-slider .loading').fadeOut(self.time_transition);PS.home_slider.tick();},define_values:function(){var self=PS.home_slider;self.$articles=$('#home-slider article');self.$images=$('.home-slider-bg-image');self.$learn_more=$('#home-slider-learn-more');self.$nav_ul=$('#home-slider-nav ul');self.$nav_items=$('#home-slider-nav li');self.$nav_items.first().addClass('current');self.num_panels=self.$articles.length;var href=self.$articles.first().data('href');self.$learn_more.attr('href',href);},define_init_functionality:function(){var self=PS.home_slider;self.$nav_items.click(function(){PS.home_slider.go_to($(this).index());}).css('cursor','pointer');self.$articles.hover(function(){PS.home_slider.is_hovering=true;},function(){PS.home_slider.is_hovering=false;});if(self.num_panels>self.mode_change){self.is_mode_b=true;self.init_mode_b();}},init_mode_b:function(){var self=PS.home_slider;self.$arrows=$('.back-arrow, .next-arrow');self.$arrows.fadeIn(self.time_transition).click(function(){if($(this).hasClass('back-arrow')){PS.home_slider.go('back');}else{PS.home_slider.go('next');}
return false;});self.$nav_ul.css('background-position',self.width/self.mode_change);self.$nav_items.css('position','absolute').hide();self.$nav_items.first().show().css('left',self.width/self.mode_change);self.$nav_items.eq(1).show().css('left',0);self.$nav_items.last().show().css('left',self.width/self.mode_change*2);},go:function(dir){var self=PS.home_slider;self.previous_panel=self.current_panel;if(dir==='back'){self.current_panel--;}else{self.current_panel++;}
self.show_panel(dir);},go_to:function(number){var self=PS.home_slider;if(number===self.current_panel){self.tick();return false;}
self.previous_panel=self.current_panel;self.current_panel=number;var last=self.num_panels-1;var dir='back';if(self.current_panel===0&&self.previous_panel===last){dir='next';}else if(self.current_panel===last&&self.previous_panel===0){}else if(self.current_panel>self.previous_panel){dir='next';}
self.show_panel(dir);},tick:function(){clearTimeout(PS.home_slider.timer);PS.home_slider.timer=setTimeout(function(){PS.home_slider.go('next');},PS.home_slider.time_between);},show_panel:function(direction){var self=PS.home_slider;if(self.in_transition||self.is_hovering){self.tick();return false;}
self.test_range();self.in_transition=true;var dirs;if(direction==='back'){dirs=['right','up','left','down'];}else{dirs=['left','down','right','up'];}
self.animate_images(dirs);self.animate_panels(dirs);self.animate_nav(direction);},test_range:function(){var self=PS.home_slider;self.previous_panel=self.previous_panel<0?self.num_panels-1:self.previous_panel;self.previous_panel=self.previous_panel>=self.num_panels?0:self.previous_panel;self.current_panel=self.current_panel<0?self.num_panels-1:self.current_panel;self.current_panel=self.current_panel>=self.num_panels?0:self.current_panel;},animate_images:function(dirs){var self=PS.home_slider;self.$images.eq(self.previous_panel).stop(true,true).hide('slide',{direction:dirs[0],easing:'easeInOutCirc'},self.time_transition);self.$images.eq(self.current_panel).stop(true,true).show('slide',{direction:dirs[2],easing:'easeInOutCirc'},self.time_transition);},animate_panels:function(dirs){var self=PS.home_slider;self.$articles.css('z-index',0);var $prev=self.$articles.eq(self.previous_panel);$prev.css('z-index',11);$prev.stop(true,true).hide('slide',{direction:dirs[1],easing:'easeInOutCirc'},self.time_transition);var $next=self.$articles.eq(self.current_panel);$next.css('z-index',12);$next.stop(true,true).show('slide',{direction:dirs[3],easing:'easeInOutCirc'},self.time_transition,function(){PS.home_slider.in_transition=false;PS.home_slider.tick();});var href=$next.data('href');self.$learn_more.stop(true,true).fadeOut(50).attr('href',href).delay(500).fadeIn(350);},animate_nav:function(direction){var self=PS.home_slider;self.$nav_items.removeClass('current').eq(self.current_panel).addClass('current');if(self.is_mode_b){self.animate_nav_b(direction);return true;}
self.animate_nav_a();},animate_nav_a:function(){var self=PS.home_slider;var bg_pos=self.width/self.mode_change*self.current_panel;self.$nav_ul.animate({'background-position':bg_pos},self.time_transition,'easeInOutCirc');},animate_nav_b:function(direction){var self=PS.home_slider;var $items=self.$nav_items;$items.hide();var $current=$items.eq(self.current_panel);var $previous=self.current_panel===0?$items.last():$items.eq(self.current_panel-1);var $next=self.current_panel===self.num_panels-1?$items.first():$items.eq(self.current_panel+1);var $previous2;if((self.current_panel-2)>=0){$previous2=$items.eq(self.current_panel-2);}else if((self.current_panel-2)===-1){$previous2=$items.eq(self.num_panels-1);}else if((self.current_panel-2)===-2){$previous2=$items.eq(self.num_panels-2);}
var lefts=[];var unit=self.width/self.mode_change;if(direction==='next'){lefts=[0,unit,unit,unit*2,-unit,0,unit*2,unit*3];}else{lefts=[unit*2,unit,self.width,unit*2,unit,0,0,-unit];}
$current.show().css('left',lefts[0]).animate({left:lefts[1]},self.time_transition);$previous.show().css('left',lefts[2]).animate({left:lefts[3]},self.time_transition);$next.show().css('left',lefts[4]).animate({left:lefts[5]},self.time_transition);$previous2.show().css('left',lefts[6]).animate({left:lefts[7]},self.time_transition,function(){$(this).hide();});}};PS.to_us={$parent:'',init:function(){PS.to_us.$parent=$('#uk-to-us');if(PS.to_us.$parent.length>0){U.tack_modal.open_modal('uk-to-us');$.post('/uk/ajaxy/setCookie',{'set_cookie_monster':{'custom:uktoushide':'1'}});$.post('/uk/ajaxy/setCookie',{'set_cookie_monster':{'custom:hideMacLiveplanModal':'1'}});}}};PS.mac_liveplan_check={$parent:'',$footer_a:'',init:function(){PS.mac_liveplan_check.$parent=$('#modal-mac-liveplan, #liveplan-mac-detect');PS.mac_liveplan_check.$footer_a=$('#footer-mac-liveplan a');if(PS.mac_liveplan_check.$parent.length>0&&$('#uk-to-us').length===0){PS.mac_liveplan_check.show_modal();PS.mac_liveplan_check.hide_modal();}
if(PS.mac_liveplan_check.$footer_a.length>0){PS.mac_liveplan_check.click_track_banner();PS.mac_liveplan_check.hide_banner();}},show_modal:function(){var test=Math.random()<0.5;if(test){U.tack_modal.open_modal('liveplan-mac-story');}else{U.tack_modal.open_modal('mac-liveplan-builder');}
$('.liveplan-button').click(function(){_gaq.push(['_trackEvent','modal','click-link',window.location.hash,1]);window.location=$(this).attr('href');return false;});},hide_modal:function(){$.post('/uk/ajaxy/setCookie',{'set_cookie_monster':{'custom:hideMacLiveplanModal':'1'}});},click_track_banner:function(){PS.mac_liveplan_check.$footer_a.click(function(){_gaq.push(['_trackEvent','footer','click-link',window.location,1]);window.location=$(this).attr('href');return false;});},hide_banner:function(){$('#footer-mac-liveplan-hide').click(function(){$.post('/uk/ajaxy/setCookie',{'set_cookie_monster':{'custom:hideMacLiveplanBanner':'1'}});PS.mac_liveplan_check.$footer_a.parent().parent().hide(500,function(){$(this).remove();});return false;});}}
