/**
 * @author raj
 */

$(document).ready(function(){$("#contactcall-content").hide();$("#contactreach-content").hide();$("#contactcall").click(function(){$("#contactcall-content").toggle();});$("#contactreach").click(function(){$("#contactreach-content").toggle();});$("span.close-pop").click(function(){$(this).parent('div').hide();});});var testimonial_count;var testimonial_interval;var old_testimonial=0;var current_testimonial=0;var curindex=0;var delay=5000;var stop=false;$(document).ready(function(){$("#client-feedback-show > li").not(":eq(0)").hide().end();testimonial_count=$("li.client-feedback-content").size();function contract_all(){for(y=0;y<testimonial_count;y++){$("#client-feedback li.client-feedback-content").eq(y).hide();}}
function expand_one(which){$("#client-feedback li.client-feedback-content").eq(which).animate({opacity:'show'},'slow');}
$("#client-feedback-nav a#cf-start-show").click(function(){stop=false;if(testimonial_count<=1){$("#loading-image").css('left','900px').css('top','700px').fadeIn("slow");$.get('scripts/get_data.php',{caller:"clientfeedback",cname:this.value},function(data){$("#client-feedback-show").append(data);testimonial_count=$("#client-feedback-show > li").not(":eq(0)").hide().end().size();$("#client-feedback-show >li:eq(0)").show();$("#loading-image").fadeOut("slow");});}
testimonial_interval=setInterval(rotate_content,delay);$("#cf-stop-show").show();$('#client-feedback-show').hover(function(){clearInterval(testimonial_interval);},function(){if(!stop){testimonial_interval=setInterval(rotate_content,delay);rotate_content();}});});function rotate_content(){contract_all()
expand_one(curindex)
curindex=(curindex<testimonial_count-1)?curindex+1:0}
$("#client-feedback-nav a#cf-stop-show").click(function(){clearInterval(testimonial_interval);stop=true;});});$(document).ready(function(){$("#searchform").submit(function(){var params={};$(this).find("input[@checked], input[@type='text'], input[@type='hidden'], input[@type='password'], input[@type='submit'], option[@selected], textarea").filter(":enabled").each(function(){params[this.name||this.id||this.parentNode.name||this.parentNode.id]=this.value;});$.post(this.getAttribute("action")+"?caller=ask",params,function(resp){$("#searchform").html(resp);});return false;});})
$(document).ready(function(){$('#searchform img:eq(0)').toggle
(function()
{$('#look-back').hide();$('#search-box input:eq(0)').animate({'opacity':'show','width':'show'},'slow');$('#search-box input:eq(1)').animate({'opacity':'show','width':'show'},'slow');},function()
{$('#search-box input:eq(1)').hide('slow');$('#search-box input:eq(0)').hide('slow');$('#look-back').show('slow');});var _stime=50;$('#searchform').hover
(function()
{clearTimeout(_stime);},function()
{_stime=setTimeout(function(){$('#search-box input:eq(1)').hide('slow');$('#search-box input:eq(0)').hide('slow');$('#look-back').show();},'5000');});$('#look-back').hover(function()
{$('.look-back-content').show();},function()
{$('.look-back-content').hide();});});$(document).ready(function(){var curr_rank=0;var img_width=370;var num_items;var n;var loading="<span class='loading-on'></span>";var cur="#"+$("#projectoftheweek >div.project-details:visible").attr('id');;var weeknum=cur.substr(17,6);var f="#slide-navigator-"+weeknum;var curslider="#project-slider-"+weeknum;function init(mode){cur="#"+$("#projectoftheweek >div.project-details:visible").attr('id');curr_rank=0;num_items=$("#projectoftheweek >div.project-details:visible >div.slide-navigator ul li").size();n=$("#projectoftheweek >div.project-details:visible >div.project-slideshow>div.project-slider>div.project-slides").size();weeknum=cur.substr(17,6);f="#slide-navigator-"+weeknum;curslider="#project-slider-"+weeknum;loading="<span class='loading-on'></span>";if(mode!=1)
{$('#projectoftheweek >div.project-details:visible >.slide-navigator ul li').eq(curr_rank).addClass('selected');}
checkactives();}
function checkactives(){if(curr_rank==0){$(f).children('span').children('img.navigator:first').attr({'src':'img/arrow_left_inactive.gif'}).css('cursor','text');}
else{$(f).children('span').children('img.navigator:first').attr({'src':'img/arrow_left.jpg'}).css('cursor','pointer');}
if(curr_rank==num_items-1){$(f).children('span').children('img.navigator:last').attr({'src':'img/arrow_right_inactive.gif'}).css('cursor','text');}
else{$(f).children('span').children('img.navigator:last').attr({'src':'img/arrow_right.jpg'}).css('cursor','pointer');}}
function getSlide(slideid){var pscID='#psc-'+slideid;var kids=$(pscID).children().size();if(kids>0){checkactives();}
else{$(pscID).html(loading);$.ajax({type:"POST",url:"scripts/mt_rpc.php",data:"caller=pow&entry_id="+slideid,success:function(data){$(pscID).html(data);checkactives();},error:function(){$(pscID).html("<span>Error</span>");}});}}
init();$('#projectoftheweek >div.project-details:visible >.slide-navigator> span> img.navigator:first').livequery('click',function(e){if(curr_rank>0){var slide_id=$('.slide-navigator ul li a').eq(curr_rank-1).attr('id').substring(3);var pscID='#psc-'+slide_id;getSlide(slide_id);$(curslider).animate({'left':"-="+-img_width},'slow');curr_rank=curr_rank-1;$(f).children('span').children('ul').children('li').removeClass('selected');$(f).children('span').children('ul').children('li').eq(curr_rank).addClass('selected');}
checkactives();});$('#projectoftheweek >div.project-details:visible >.slide-navigator> span>img.navigator:last').livequery('click',function(e){if(curr_rank<num_items-1){var slide_id=$('.slide-navigator ul li a').eq(curr_rank+1).attr('id').substring(3);getSlide(slide_id);$(curslider).animate({'left':"+="+-img_width},'slow');curr_rank=curr_rank+1;$('.slide-navigator ul li').removeClass('selected');$('.slide-navigator ul li').eq(curr_rank).addClass('selected');}
checkactives();});$('#projectoftheweek >div.project-details:visible >.slide-navigator ul li a').livequery('click',function(e){var slide_id=$(this).attr('id').substring(3);getSlide(slide_id);var rank=parseInt($(this).html());$(curslider).animate({'left':-(rank-1)*img_width},'slow');curr_rank=rank-1;$('.slide-navigator ul li').removeClass('selected');$('.slide-navigator ul li').eq(curr_rank).addClass('selected');checkactives();});$("#project-archive").change(function(){var showweek=this.value;var g="#project-details-"+showweek;if(showweek!="x"){$(this).siblings().hide('slow');if($(g).length){$("#projectoftheweek >div.project-details").hide();$(g).show();init(1);}
else{$("#project-archive").before(loading);$.get('scripts/get_data.php',{caller:"getpow",week:showweek},function(data){$("#projectoftheweek >div.project-details").hide();$("#projectdetailfooter").before(data);$('#projectoftheweek span.loading-on').remove();$(g).show();init(0);});}}});});$(document).ready(function(){var loading="<span class='loading-on'></span>";$('#ourlearnings').css('display','none');$('#ourstory').css('display','none');$('.showcase-content').hide();$("#rightnav-menu h3").click(function(){if($(this).className=="r-selected"){return false;}
var str=$(this).text();var replaced=$('#rightnav-menu h3.r-selected').text();$('#rightnav-menu h3.r-selected').html(str);$(this).html(replaced);$('#rightnav-menu div.rightnav-content').css('display','none');if(str.toUpperCase()=='OUR LEARNINGS'){$('#ourlearnings').css('display','block');}
else
if(str.toUpperCase()=='OUR STORY'){$('#ourstory').css('display','block');}
else{$('#showcase').css('display','block');}
$('#rightnav-menu h3').css('cursor','pointer');$('#rightnav-menu h3.r-selected').css('cursor','text');});function get_showcase(showcontent){var kids=$(showcontent).children().size();if(kids>0){}
else{var showname=showcontent.substring(9);$('#rightnav-menu h3.r-selected').after(loading);$('#rightnav-menu span.loading-on').css('margin','-29px 0px 0px 170px');$.get('scripts/get_data.php',{caller:"showcase",sname:showname},function(data){$(showcontent).html(data);$('#rightnav-menu span.loading-on').remove();});}}
$('#showcase .r-showcase img').click(function(){var showcontent=$(this).attr('id');get_showcase(showcontent);$(showcontent).animate({"opacity":"show"},"slow").css({'top':'0px'});return false;});$("#showcase-gallery").click(function(e){if($(e.target).is('a')){$(".showcase-content").animate({"opacity":"hide"},"slow");}});$(".showcase-content").click(function(e){if($(e.target).is('img')){$('.showcase-content').animate({"opacity":"hide"},"slow");}});function isValidEmail(str){return(str.indexOf(".")>2)&&(str.indexOf("@")>0);}
$("#subscribe-form").submit(function(){var v=$("#email").value;var params={};$(this).find("input[@checked], input[@type='text'], input[@type='hidden'], input[@type='password'], input[@type='submit'], option[@selected], textarea").filter(":enabled").each(function(){params[this.name||this.id||this.parentNode.name||this.parentNode.id]=this.value;});$.post(this.getAttribute("action")+"?caller=subscribe",params,function(resp){$("#subscribe").html(resp);});return false;});});$(document).ready(function()
{var n=$("#f-images div").length;var pic_width=390;var tick=65;var slider_minx=0;var slider_maxx=334;var factor=(n-1)*(pic_width)/slider_maxx;var xStart=0;var mov_slide=100;$("#sliderthumb").mousedown
(function(e)
{xStart=parseInt(e.clientX);var xslider=parseInt($("#sliderthumb").css('left'));var sliderpos=xslider;var albumpos=0;$(document).bind('mousemove',function(e)
{var xpos=parseInt(e.clientX);var xdelta=xStart-xpos;sliderpos=xslider-xdelta;if(sliderpos>=slider_minx&&sliderpos<=slider_maxx)
{$("#sliderthumb").css('left',sliderpos);xslider=sliderpos;xStart=xpos;$("#f-images").css('left',-sliderpos*factor);albumpos=-sliderpos*factor;}
return false;});$(document).bind('mouseup',function(e)
{var album_pos=parseInt($("#f-images").css('left'));var j=0;for(i=0;i<n*pic_width;i=i+pic_width)
{j=i/pic_width;if(album_pos>-(i+mov_slide))
{sliderpos=j*tick;album_pos=-j*pic_width;break;}
else if(-(i+mov_slide)>album_pos&&album_pos>-(i+pic_width))
{sliderpos=(j+1)*tick;album_pos=-(j+1)*pic_width;break;}}
$("#sliderthumb").animate({'left':sliderpos},'slow');$("#f-images").animate({'left':album_pos},'slow');$(document).unbind("mousemove");$(document).unbind("mouseup");return false;});return false;});$("#next-nav").click(function(e)
{var posx_slider=parseInt($("#sliderthumb").css('left'));var posx_f_images=parseInt($("#f-images").css('left'));if(posx_slider<((n-1)*tick))
{if((posx_slider+tick)<slider_maxx)
{$("#sliderthumb").animate({'left':(posx_slider+tick)},'slow');$("#f-images").animate({'left':(posx_f_images-pic_width)},'slow');}
else
{$("#sliderthumb").animate({'left':(n-1)*tick},'fast');$("#f-images").animate({'left':(n-1)*(-pic_width)},'fast');}}
return false;});$("#pre-nav").click(function(e)
{var posx_slider=parseInt($("#sliderthumb").css('left'));var posx_f_images=parseInt($("#f-images").css('left'));if(posx_slider>slider_minx)
{if((posx_slider-tick)>=slider_minx)
{$("#sliderthumb").animate({'left':posx_slider-tick},'slow');$("#f-images").animate({'left':posx_f_images+pic_width},'slow');}
else
{$("#sliderthumb").animate({'left':slider_minx},'fast');$("#f-images").animate({'left':0},'fast');}}
return false;});});$(document).ready(function(){var loading="<span class='loading-on'></span>";$("#middle-column > div ul li a").bind('click',function(){var thisClass=$(this).attr('class');if(thisClass!="selected"){var showdiv=$(this).attr('id');if(showdiv=='#about-us'){$('#about-applicants').hide();$('#about-alumni').hide();$("#middle-navigator").css('background-image','url(img/for_01.gif)');$("#middle-navigator").css('background-repeat','no-repeat');$("#middle-column > div ul li a:eq(1)").html("Applicants");$("#middle-column > div ul li a:eq(2)").html("Alumni");}
else
if(showdiv=='#about-applicants'){$('#about-us').hide();$('#about-alumni').hide();$("#middle-navigator").css('background-image','url(img/for_02.gif)');$("#middle-navigator").css('background-repeat','no-repeat');$("#middle-column > div ul li a:eq(0)").html("Clients");$("#middle-column > div ul li a:eq(2)").html("Alumni");$("#middle-column > div ul li a:eq(0)").css('padding-left','1px');}
else
if(showdiv=='#about-alumni'){$('#about-us').hide();$('#about-applicants').hide();$("#middle-navigator").css('background-image','url(img/for_03.gif)');$("#middle-navigator").css('background-repeat','no-repeat');$("#middle-column > div ul li a:eq(0)").html("Clients");$("#middle-column > div ul li a:eq(1)").html("Applicants");$("#middle-column > div ul li:eq(2)").css('padding-left','15px');}
var new_title="For "+$(this).html();$("#middle-column > div ul li a").removeClass("selected");$(this).html(new_title).addClass("selected");$(showdiv).show('fast');}
return false;});$("#about-us >div >span").hover(function(){$(this).css('background-color','#d5edff');},function(){$(this).css('background-color','#fff');});$("#wwd >span.link-more").click(function(){$("#wwd-link-more-content").toggle('slow');});$("#hww >span.link-more").click(function(){$("#hww-link-more-content").toggle('slow');});$("#oc-selector").change(function(){var showclient=this.value;var g="#client"+showclient;var v=$("#oc > p:visible").attr('id');var p="#"+$(this).prev('div >p:eq(0)').attr('id');if(showclient!="x"){if(v!=g.substr(1)){$(this).siblings().hide('slow');}
if($(g).length){$(g).show();}
else{$("#oc-selector").before(loading);$.get('scripts/get_data.php',{caller:"showclient",cname:this.value},function(data){$(p).after(data);$('#oc span.loading-on').remove();});$(g).show();}}});});$(document).ready(function()
{$('#time-line').css('display','block');var xStart=0;var xmin=0;var xDelta=0;var mov_screen=200;var w=$(window).width();if(w<950)
{$("#time-line-viewer").css('width',950);}
else
{$("#time-line-viewer").css('width',w);}
$(window).resize(function(){var w=$(window).width();if(w<950)
{$("#time-line-viewer").css('width',950);}
else
{$("#time-line-viewer").css('width',w);}});var firstmonth_width=$(".header-mon:first").width()+$(".timeline-mon:first").width();var d=0;$(".header-mon").each
(function(intindex)
{wid=parseInt($(".header-mon").eq(intindex).width());d=wid+d;return;});var d2=0;$(".timeline-mon").each
(function(intindex)
{wid2=parseInt($(".timeline-mon").eq(intindex).width());d2=wid2+d2;return;});var total_width=d+d2+firstmonth_width;var xmax=total_width+mov_screen-2*(w);$("#time-line").css('width',total_width);$("#time-line").css('left',0);$("#time-line-viewer").css('left',0);$("#time-line-viewer").css('cursor','pointer');function createnavicon(src,cls)
{return $('<img/>').attr('src',src).addClass(cls).css('opacity',0.6).hide();}
function showhidenavicons(x_position)
{if(x_position<=xmin&&x_position>-xmax)
{$rightnavicon.appendTo("#nav").show();}
else
{$rightnavicon.hide();}
if(x_position<xmin)
{$leftnavicon.appendTo($("#nav")).show();}
else
{$leftnavicon.hide();}}
var $leftnavicon=createnavicon('img/timeline/left-arrow.gif','left-arrow');var $rightnavicon=createnavicon('img/timeline/right-arrow.gif','right-arrow');var posx=parseInt($("#time-line").css('left'));showhidenavicons(posx);$("#time-line").mousedown
(function(e)
{xStart=parseInt(e.clientX);$(document).bind('mousemove',function(e)
{xDelta=xStart-parseInt(e.clientX);xStart=parseInt(e.clientX);var x=parseInt($("#time-line").css('left'));if(x-xDelta<=xmin&&x-xDelta>=-xmax)
{$("#time-line").css('left',x-xDelta);}
showhidenavicons(x-xDelta);return false;});$(document).bind('mouseup',function(e)
{$(document).unbind("mousemove");$(document).unbind("mouseup");return false;});return false;});$leftnavicon.bind
('click',function(e)
{var posx=parseInt($("#time-line").css('left'));if((mov_screen+posx)>=xmin||(mov_screen+posx)>-mov_screen)
{$("#time-line").animate({'left':xmin},'fast');}
else
{var left_move=mov_screen+posx;$("#time-line").animate({'left':left_move},'fast');if(left_move>=xmin||left_move>-mov_screen)
{$("#time-line").animate({'left':xmin},'fast');}}
showhidenavicons(posx);return;});$rightnavicon.bind
('click',function(e)
{var posx=parseInt($("#time-line").css('left'));if((posx-mov_screen)<-xmax)
{$("#time-line").animate({'left':-xmax},'fast');}
else
{var right_move=posx-mov_screen;if(right_move<-xmax)
{$("#time-line").animate({'left':-xmax},'fast');}
else
{$("#time-line").animate({'left':right_move},'fast');}}
showhidenavicons(posx);return;});});(function($){var $cluetip,$cluetipInner,$cluetipOuter,$cluetipTitle,$dropShadow,imgCount;var msie6=$.browser.msie&&($.browser.version&&$.browser.version<7||(/5\.5|6.0/).test(navigator.userAgent));$.fn.cluetip=function(options){var defaults={width:275,height:'auto',local:false,hideLocal:true,attribute:'rel',titleAttribute:'title',splitTitle:'',showTitle:true,cluetipClass:'default',hoverClass:'',waitImage:true,cursor:'help',arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:'hover',closePosition:'top',closeText:'Close',truncate:0,cluezIndex:97,positionBy:'auto',fx:{open:'show',openSpeed:'',close:'hide',closeSpeed:''},hoverIntent:{sensitivity:3,interval:50,timeout:0},onShow:function(ct,c){},ajaxCache:true,ajaxProcess:function(data){data=$(data).not('style, meta, link, script, title');return data;},ajaxSettings:{dataType:'html'}};if(options&&options.ajaxSettings){$.extend(defaults.ajaxSettings,options.ajaxSettings);delete options.ajaxSettings;}
if(options&&options.fx){$.extend(defaults.fx,options.fx);delete options.fx;}
if(options&&options.hoverIntent){$.extend(defaults.hoverIntent,options.hoverIntent);delete options.hoverIntent;}
$.extend(defaults,options);return this.each(function(){var cluetipContents=false;var cluezIndex=parseInt(defaults.cluezIndex,10)-1;var isActive=false;if(!$cluetip){$cluetipInner=$('<div id="cluetip-inner"></div>');$cluetipTitle=$('<h3 id="cluetip-title"></h3>');$cluetipOuter=$('<div id="cluetip-outer"></div>').append($cluetipInner).prepend($cluetipTitle);$cluetip=$('<div></div>').attr({'id':'cluetip'}).css({zIndex:defaults.cluezIndex}).append($cluetipOuter)[insertionType](insertionElement).hide();$('<div id="cluetip-waitimage"></div>').css({position:'absolute',zIndex:cluezIndex-1}).insertBefore('#cluetip').hide();$cluetip.css({position:'absolute',zIndex:cluezIndex});$cluetipOuter.css({position:'relative',zIndex:cluezIndex+1});}
var dropShadowSteps=(defaults.dropShadow)?+defaults.dropShadowSteps:0;if(!$dropShadow){$dropShadow=$([]);for(var i=0;i<dropShadowSteps;i++){$dropShadow=$dropShadow.add($('<div></div>').css({zIndex:cluezIndex-i-1,opacity:.1,top:1+i,left:1+i}));};$dropShadow.css({position:'absolute',backgroundColor:'#000'}).prependTo($cluetip);}
var $this=$(this);var tipAttribute=$this.attr(defaults.attribute),ctClass=defaults.cluetipClass;if(!tipAttribute&&!defaults.splitTitle)return true;if(defaults.local&&defaults.hideLocal){$(tipAttribute).hide();}
var tipHeight,wHeight;var defHeight=isNaN(parseInt(defaults.height,10))?'auto':(/\D/g).test(defaults.height)?defaults.height:defaults.height+'px';var sTop,linkTop,posY,tipY,mouseY;var tipWidth=parseInt(defaults.width,10)+parseInt($cluetip.css('paddingLeft'))+parseInt($cluetip.css('paddingRight'))+dropShadowSteps;if(isNaN(tipWidth))tipWidth=275;var linkWidth=this.offsetWidth;var linkLeft,posX,tipX,mouseX,winWidth;var tipParts;var tipTitle=(defaults.attribute!='title')?$this.attr(defaults.titleAttribute):'';if(defaults.splitTitle){tipParts=tipTitle.split(defaults.splitTitle);tipTitle=tipParts.shift();}
var localContent;var activate=function(event){isActive=true;$cluetip.removeClass().css({width:defaults.width});if(tipAttribute==$this.attr('href')){$this.css('cursor',defaults.cursor);}
$this.attr('title','');if(defaults.hoverClass){$this.addClass(defaults.hoverClass);}
linkTop=posY=$this.offset().top;linkLeft=$this.offset().left;mouseX=event.pageX;mouseY=event.pageY;if($this[0].tagName.toLowerCase()!='area'){sTop=$(document).scrollTop();winWidth=$(window).width();}
posX=(linkWidth>linkLeft&&linkLeft>tipWidth)||linkLeft+linkWidth+tipWidth>winWidth?linkLeft-tipWidth-15:linkWidth+linkLeft+15;if($this[0].tagName.toLowerCase()=='area'||defaults.positionBy=='mouse'||linkWidth+tipWidth>winWidth){if(mouseX+20+tipWidth>winWidth){posX=(mouseX-tipWidth-20)>=0?mouseX-tipWidth-20:mouseX-(tipWidth/2);}else{posX=mouseX+20;}
var pY=posX<0?event.pageY+20:event.pageY;}
posX<linkLeft?$cluetip.addClass('clue-left-'+ctClass).removeClass('clue-right-'+ctClass):$cluetip.addClass('clue-right-'+ctClass).removeClass('clue-left-'+ctClass);$cluetip.css({left:(posX>0&&defaults.positionBy!='bottomTop')?posX:(mouseX+(tipWidth/2)>winWidth)?winWidth/2-tipWidth/2:Math.max(mouseX-(tipWidth/2),0)});wHeight=$(window).height();if(tipParts){for(var i=0;i<tipParts.length;i++){if(i==0){$cluetipInner.html(tipParts[i]);}else{$cluetipInner.append('<div class="split-body">'+tipParts[i]+'</div>');}};cluetipShow(pY);}
else if(!defaults.local&&tipAttribute.indexOf('#')!=0){if(cluetipContents&&defaults.ajaxCache){$cluetipInner.html(cluetipContents);cluetipShow(pY);}
else{var ajaxSettings=defaults.ajaxSettings;ajaxSettings.url=tipAttribute;ajaxSettings.beforeSend=function(){$cluetipOuter.children().empty();if(defaults.waitImage){$('#cluetip-waitimage').css({top:mouseY-10,left:parseInt(posX+(tipWidth/2),10)}).show();}};ajaxSettings.error=function(){if(isActive){$cluetipInner.html('<i>sorry, the contents could not be loaded</i>');}};ajaxSettings.success=function(data){cluetipContents=defaults.ajaxProcess(data);if(isActive){$cluetipInner.html(cluetipContents);}};ajaxSettings.complete=function(){imgCount=$('#cluetip-inner img').length;if(imgCount){$('#cluetip-inner img').load(function(){imgCount--;if(imgCount<1){$('#cluetip-waitimage').hide();if(isActive)cluetipShow(pY);}});}else{$('#cluetip-waitimage').hide();cluetipShow(pY);}};$.ajax(ajaxSettings);}}else if(defaults.local&&tipAttribute.indexOf('#')==0){var localContent=$(tipAttribute).html();$cluetipInner.html(localContent);cluetipShow(pY);}};var cluetipShow=function(bpY){$cluetip.addClass('cluetip-'+ctClass);if(defaults.truncate){var $truncloaded=$cluetipInner.text().slice(0,defaults.truncate)+'...';$cluetipInner.html($truncloaded);}
function doNothing(){};tipTitle?$cluetipTitle.show().html(tipTitle):(defaults.showTitle)?$cluetipTitle.show().html(' '):$cluetipTitle.hide();if(defaults.sticky){var $closeLink=$('<div id="cluetip-close"><a href="#">'+defaults.closeText+'</a></div>');(defaults.closePosition=='bottom')?$closeLink.appendTo($cluetipInner):(defaults.closePosition=='title')?$closeLink.prependTo($cluetipTitle):$closeLink.prependTo($cluetipInner);$closeLink.click(function(){cluetipClose();return false;});if(defaults.mouseOutClose){$cluetip.hover(function(){doNothing();},function(){$closeLink.trigger('click');});}else{$cluetip.unbind('mouseout');}}
$cluetipOuter.css({overflow:defHeight=='auto'?'visible':'auto',height:defHeight});tipHeight=defHeight=='auto'?$cluetip.outerHeight():parseInt(defHeight,10);tipY=posY;if((posX<mouseX&&Math.max(posX,0)+tipWidth>mouseX)||defaults.positionBy=='bottomTop'){tipY=posY+tipHeight>sTop+wHeight&&mouseY-sTop>tipHeight+10?mouseY-tipHeight-16:mouseY+20;}else if(posY+tipHeight>sTop+wHeight){tipY=(tipHeight>=wHeight)?sTop:sTop+wHeight-tipHeight-10;}else if($this.css('display')=='block'||$this[0].tagName.toLowerCase()=='area'||defaults.positionBy=="mouse"){tipY=bpY-10;}else{tipY=posY-defaults.dropShadowSteps;}
$cluetip.css({top:tipY+'px'});if(defaults.arrows){var bgPos='0 0';var bgY=(posY-tipY-defaults.dropShadowSteps);if($cluetip.is('.clue-left-'+ctClass)){bgPos=posX>=0?'100% '+bgY+'px':'100% 0';}else if($cluetip.is('.clue-right-'+ctClass)){bgPos=(posX>=0&&bgY>0)?'0 '+bgY+'px':'0 0';}}else{bgPos='0 100%';}
$cluetip.css({backgroundPosition:bgPos});$dropShadow.hide();$cluetip.hide()[defaults.fx.open](defaults.fx.open!='show'&&defaults.fx.openSpeed);if(defaults.dropShadow)$dropShadow.css({height:tipHeight,width:defaults.width}).show();defaults.onShow($cluetip,$cluetipInner);};var inactivate=function(){isActive=false;$('#cluetip-waitimage').hide();if(!defaults.sticky){cluetipClose();};if(defaults.hoverClass){$this.removeClass(defaults.hoverClass);}};var cluetipClose=function(){$cluetipOuter.parent()[defaults.fx.close](defaults.fx.closeSpeed).removeClass().end().children().empty();if(tipTitle){$this.attr('title',tipTitle);}};if(defaults.activation=='click'||defaults.activation=='toggle'){$this.click(function(event){if($cluetip.is(':hidden')){activate(event);}else{inactivate(event);}
this.blur();return false;});}else{$this.click(function(){if(tipAttribute==$this.attr('href')){return false;}});if($.fn.hoverIntent&&defaults.hoverIntent){$this.hoverIntent({sensitivity:defaults.hoverIntent.sensitivity,interval:defaults.hoverIntent.interval,over:function(event){activate(event);},timeout:defaults.hoverIntent.timeout,out:function(event){inactivate(event);}});}else{$this.hover(function(event){activate(event);},function(event){inactivate(event);});}}});};var insertionType='appendTo',insertionElement='body';$.cluetip={};$.cluetip.setup=function(options){if(options&&options.insertionType&&(options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){insertionType=options.insertionType;}
if(options&&options.insertionElement){insertionElement=options.insertionElement;}};})(jQuery);$(document).ready(function(){$('a.load-timeline-tip').cluetip({local:true,cluetipClass:'jtip',arrows:true,dropShadow:false,sticky:true,mouseOutClose:true,closePosition:'title',width:400,closeText:'<img src="img/close.gif" alt="close" />'});$('a.jt:eq(1)').cluetip({cluetipClass:'jtip',arrows:true,dropShadow:false,hoverIntent:false});$('a.jt:eq(2)').cluetip({cluetipClass:'jtip',arrows:true,dropShadow:false,height:'150px',sticky:true});});window.onload=function(){var imgs=$("#people-slider ul li img");imgs.css('opacity',0.3)
$(document).ready(function(e){$("#people-slider >ul li span").hide();var xmin=0;var mov_pslider=200;$('#peoples').css('display','block');$("#people-slider ul li img").bind('click',function(){return false});var n=$("#people-slider ul li img").length;var d=0;var firstimg_width=$("#people-slider ul li img:first").width();$("#people-slider ul li img").each(function(intindex){wid=parseInt($("#people-slider ul li img").eq(intindex).width());d=wid+d;return;});var total_width=d+firstimg_width;var de=document.documentElement;var w=$(window).width();if(w<950){$("#peoples").css('width',950);}
else{$("#peoples").css('width',w);}
$(window).resize(function(){var w=$(window).width();if(w<950){$("#peoples").css('width',950);}
else{$("#peoples").css('width',w);}});var slider_xmax=total_width-w;var xmax=total_width-w;function createp_navicon(src,cls){return $('<img/>').attr('src',src).addClass(cls).css('opacity',0.6).hide();}
function showhidep_navicons(x_position){if(x_position<=xmin&&x_position>-xmax){$p_rightnavicon.appendTo("#p_nav").show();}
else{$p_rightnavicon.hide();}
if(x_position<xmin){$p_leftnavicon.appendTo($("#p_nav")).show();}
else{$p_leftnavicon.hide();}}
var $p_leftnavicon=createp_navicon('img/people/left-arrow.gif','p_left-arrow');var $p_rightnavicon=createp_navicon('img/people/right-arrow.gif','p_right-arrow');var posx=parseInt($("#people-slider").css('left'));showhidep_navicons(posx);$p_leftnavicon.bind('click',function(e){var posx=parseInt($("#people-slider").css('left'));if((mov_pslider+posx)>=xmin||(mov_pslider+posx)>-mov_pslider){$("#people-slider").animate({'left':xmin},'fast');}
else{var left_move=mov_pslider+posx;$("#people-slider").animate({'left':left_move},'fast');if(left_move>=xmin||left_move>-mov_pslider){$("#people-slider").animate({'left':xmin},'fast');}}
showhidep_navicons(posx);return;});$p_rightnavicon.bind('click',function(e){var posx=parseInt($("#people-slider").css('left'));if((posx-mov_pslider)<-xmax){$("#people-slider").animate({'left':-xmax},'fast');}
else{var right_move=posx-mov_pslider;if(right_move<-xmax){$("#people-slider").animate({'left':-xmax},'fast');}
else{$("#people-slider").animate({'left':right_move},'fast');}}
showhidep_navicons(posx);return;});$("#people-slider ul li a").bind('mousedown',function(e){var $cursor=$("#people-slider").css('cursor');$("#people-slider").css('cursor','pointer');var xslider=parseInt($("#people-slider").css('left'));var xStart=parseInt(e.clientX);if($(this).css('opacity')>0.3){$(this).css('opacity',0.3);document.title=$(this).css('opacity');}
$("#people-slider ul li img").unbind('mouseover');$("#people-slider ul li img").unbind('mouseout');$(document).bind('mousemove',function(e){$('#PT').remove();var xpos=e.clientX;var moved=xStart-xpos;xslider=xslider-moved;if(xslider<=0&&xslider>-slider_xmax){$("#people-slider").css('left',xslider);showhidep_navicons(xslider);xStart=xpos;}
e.stopPropagation();return false;});$(document).bind('mouseup',function(e){$("#people-slider").css('cursor',$cursor);$(document).unbind('mousemove');$(document).unbind('mouseup');$("#people-slider ul li a").bind('mouseover',function(e){PT_show(this.id,this.href,e);$(this).css('opacity',1);return false;});$("#people-slider ul li img").bind('mouseout',function(){PT_hide(this.id);$(this).css('opacity',0.3);return false});return false;});return false;});$("#people-slider ul li img").bind('mouseover',function(e){PT_show(this.id,this.href,e);$(this).css('opacity',1);return false;});$("#people-slider ul li img").bind('mouseout',function(){PT_hide(this.id);$(this).css('opacity',0.3);return false});function positionTooltip(src,url,e){var de=document.documentElement;var w=self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;var hasArea=w-getAbsoluteLeft(src);var dv_width=200;var clickElementx=e.pageX+10;var clickElementy=e.pageY+10;$("body").append("<div id='PT' style='width:"+dv_width+"px'><div id='PT_detail'></div></div>");if(hasArea<((dv_width)+75)){clickElementx=getAbsoluteLeft(src)-((dv_width)+15);}
else{}
$('#PT').css({'top':clickElementy,'left':clickElementx});$('#PT').show();var h=$(src).html();$('#PT_detail').html(h);}
function PT_show(src,url,e){positionTooltip(src,url,e);}
function PT_hide(src){$('#PT').remove();}
function getElementWidth(objectId){x=document.getElementById(objectId);return x.offsetWidth;}
function getAbsoluteLeft(objectId){o=document.getElementById(objectId)
oLeft=o.offsetLeft
while(o.offsetParent!=null){oParent=o.offsetParent
oLeft+=oParent.offsetLeft
o=oParent}
return oLeft}
function getAbsoluteTop(objectId){o=document.getElementById(objectId)
oTop=o.offsetTop
while(o.offsetParent!=null){oParent=o.offsetParent
oTop+=oParent.offsetTop
o=oParent}
return oTop}});}
$(document).ready(function()
{$("#info-section > ul li:first span").addClass('current');$("#info-section > div").hide();$("#info-section > div:first").show();$("#info-section > ul li span").bind('click',function()
{$("#info-section > ul li span").removeClass('current');$(this).addClass('current');var showdiv=$(this).attr('id');$('#info-section div').hide();$(showdiv).slideDown('slow');return false;});});






