// JavaScript Document
ie_engine = null;
if (window.navigator.appName == "Microsoft Internet Explorer")
{
   // This is an IE browser. What mode is the engine in?
   if (document.documentMode) // IE8 or later
      ie_engine = document.documentMode;
   else // IE 5-7
   {
      ie_engine = 5; // Assume quirks mode unless proven otherwise
      if (document.compatMode)
      {
         if (document.compatMode == "CSS1Compat")
            ie_engine = 7; // standards mode
      }
      // There is no test for IE6 standards mode because that mode  
      // was replaced by IE7 standards mode; there is no emulation.
   }
   // the engine variable now contains the document compatibility mode.
}



$('.protected').live("contextmenu", function(e) {
	e.preventDefault(); 
});



$('.expandSection .expand').ready(function(){	
	$('.expandSection .expand,.expandInline .expand').hide();
	$('.javascript_notice').hide();
});


$(document).ready(function(){
	
	if(ie_engine==null || ie_engine >7){
		$('#ie_notice').hide();
	}
		
	/*if(scrollToID!=''){
		 $('html,body').animate({scrollTop: $("#"+scrollToID).offset().top},'slow');
	}*/

	$('#sideTracks').accordionMenu();
	
	track = $("#pageHeader").css("background-image");
	if(track){
		if(track.toString().search(new RegExp("st/header.png")) > 0){
			$('#sideTracks .st:has(ul:hidden) a:eq(0)').click();
			track = 'st';	
			
		}else if(track.toString().search(new RegExp("ct/header.png")) > 0){
			$('#sideTracks .ct:has(ul:hidden) a:eq(0)').click();
			track = 'ct';	
		
		}else if(track.toString().search(new RegExp("ot/header.png")) > 0){
			$('#sideTracks .ot:has(ul:hidden) a:eq(0)').click();
			track = 'ot';	
		
		}
	}
	
	
	
	 
	
	$(".expandSection > .header").not(":has(.expandNote)").append('<span class="expandNote"> (click to expand) </span>');
	$('.expandSection').append('<span class="expandNote close"> (click to close) </span>');
	$('.expandSection .expandNote.close').hide();
	$(".expandSection > .header .expandNote").show();

	$(".expandSection > .header").each(function(){
		var header = $(this).position();
		var note = $(this).find('.expandNote').position();
		
		var diff = (Math.ceil(note.top) - Math.ceil(header.top));	
		
		if(diff != 0 ){
			$(this).find('.expandNote').addClass('wrapped');
		}
	});
	

	
	$('.expandSection > .header,.expandSection .expandNote.close').css('cursor','pointer').click(function(){
		var wrapper = $(this).parents('.expandSection:eq(0)');
		
		if( wrapper.find('.expand:eq(0)').is(':visible')){
			wrapper.removeClass('open');
			wrapper.find('.expand:visible').slideToggle();
			wrapper.find('.expandNote.close:visible').hide();
			wrapper.find('> .header .triangle').removeClass('open');
						
		}else{
			wrapper.addClass('open');
			var allothers = $('.expandSection').not($(this).parents('.expandSection'));
			
			allothers.find('.expand:visible').slideToggle();
			allothers.find('.expandNote.close:visible').hide();
			allothers.find('> .header .triangle').removeClass('open');
			
			wrapper.find('> .header .triangle:eq(0)').addClass('open');
			wrapper.find('.expand:eq(0)').slideToggle();
			wrapper.find(' > .expandNote.close').show();
			
			
			wrapper.find(".expandSection > .header").each(function(){
				var header = $(this).position();
				var note = $(this).find('.expandNote').position();
				
				var diff = (Math.ceil(note.top) - Math.ceil(header.top));
							
				if(diff != 0 ){
					$(this).find('.expandNote').addClass('wrapped');
				}
			});
		}			
	});
	
	
	
	
	
	
	$('.expandInline').prepend('<span class="expandNote">... (click to expand) </span>');
	$('.expandInline > .expand').append('<span class="expandNote close"> (click to close) </span>');
	
	$('.expandInline > .expandNote,.expandInline > .expand > .expandNote').css('cursor','pointer').click(function(){
		var wrapper = $(this).parents('.expandInline:eq(0)');
		
		if( wrapper.find('.expand').is(':visible')){
			wrapper.removeClass('open');
			wrapper.find('.expand').hide();
			wrapper.find('> .expandNote').show();
				
		}else{
			wrapper.addClass('open');
			wrapper.find('.expand:eq(0)').show();
			wrapper.find('> .expandNote').hide();
		}
	});
	
	
	
//	$('#printPage').show().click(function(){
//		$('.expand:not(:visible)').addClass('printing').show();
//		window.print();
//		$('.printing').removeClass('.printing').hide();
//	});	


	$('#videoPopu .close,#Popup .close').live('click',function(event){
									event.preventDefault();
									$('#videoPopup').remove();			 
									$('#videoPopup-blackout').remove();	
									
									$('#Popup').remove();			 
									$('#Popup-blackout').remove();			 
	});





var searchRowTemp = $('.storiesSearch .expandSearch .rows div:eq(0)').html();

$('.storiesSearch .header').css('cursor','pointer').click(function(){
	var wrapper = $(this).parents('.storiesSearch:eq(0)');
	
	wrapper.find('input[type=submit]').toggle();
	wrapper.find('.expandSearch').toggle();
	wrapper.find('.header .triangle').toggleClass('open');
	wrapper.find('.expandSearch .rows div').remove();
	wrapper.find('.expandSearch .rows').append('<div>'+searchRowTemp+'</div>');
		
});

$('.storiesSearch .expandSearch').hide();


if($('.storiesSearch').length > 0){	
	$('.storiesSearch .expandSearch span').click(function(){
		var wrapper = $(this).parents('.storiesSearch:eq(0)');
		wrapper.find('.expandSearch .rows').append('<div>'+searchRowTemp+'<span>x</span></div>');
	});
	
	$('.storiesSearch .expandSearch .rows div span').live('click',function(){
		$(this).parents('div:eq(0)').remove();	
	});
}



	if($('#clientstories .result a.url').length > 0){
		$('#clientstories .result a.url').each(function(){
			
			var par = $(this).parents('.result:eq(0)');
			
			$(this).addClass('addthis_button').attr({
				'addthis:url' 			: $(this).attr('href'),
				'addthis:title'			: par.find('h3:eq(0)').text(),
				'addthis:description'	: par.find('h4:eq(0)').text()
				}).text('+ Share').removeClass('url');
		});	
	}
	
	
			
			
			var sharthis = $('<a></a>').addClass('addthis_button global').attr({
				'addthis:url' 			: window.location,
				'addthis:title'			: $('title').text(),
				'addthis:description'	: $('description').text()
			}).text('+ Share page').attr('href',window.location);
				
				$('#pageTitle').append(sharthis);
				if($('#pageTitle').length ==0){
					$('#pageHeader').append(sharthis);
				}
			




	if(jumpTo !=''){
		if($('#'+jumpTo).length >0 ){
			setTimeout(function(){
				var el = $('#'+jumpTo);
						
				if(el.parents('.expandSection,.expandInline,.dropBox').length > 0){
					el.parents('.expandSection, .expandInline,.dropBox').find('.header').click();
				}
				
				
				if(el.hasClass('expandSection') || el.hasClass('expandInline') || el.hasClass('dropBox')){
					el.find('.header:eq(0)').click();
				}
				
				if(el.is('a')){
					el.click();
				}
				
				setTimeout(function(){
					$(window).scrollTop(el.offset().top);
				},250);
			}, 250);
			
		}
		
		
	}


});



<!-- Bold Software Visitor Monitor HTML v3.50 (Website=www.ozprinciple.com,ChatWindow=Partners In Leadership,ChatInvitation=My Invite Ruleset) -->
  var _bcvma = _bcvma || [];
  _bcvma.push(["setAccountID", "619842677795838812"]);
  _bcvma.push(["setParameter", "WebsiteDefID", "1810250414173212629"]);
  _bcvma.push(["setParameter", "ChatWindowDefID", "1824501185828278063"]);
  _bcvma.push(["setParameter", "ChatWidth", "718"]);
  _bcvma.push(["setParameter", "ChatHeight", "480"]);
  _bcvma.push(["setParameter", "InvitationDefID", "227314393670734295"]);
  _bcvma.push(["setParameter", "WindowScheme", "http"]);
  _bcvma.push(["pageViewed"]);
  (function(){
    var vms = document.createElement("script"); vms.type = "text/javascript"; vms.async = true;
    vms.src = ('https:'==document.location.protocol?'https://':'http://') + "vmss.boldchat.com/aid/619842677795838812/bc.vms3/vms.js";
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vms, s);
  })();
<!-- /Bold Software Visitor Monitor HTML v3.50 -->
