var hnul = {
	src : '/swf/helveticaneueultralight.swf'
};

var hnl = {
	src : '/swf/helveticaneuelight.swf'
};

var rats = [6, 1.41, 9, 1.35, 15, 1.29, 21, 1.25, 22, 1.22, 27, 1.24, 28, 1.23, 34, 1.22, 38, 1.21, 39, 1.22, 46, 1.21, 50, 1.2, 51, 1.21, 74, 1.2, 77, 1.19, 79, 1.2, 83, 1.19, 84, 1.2, 1.19];

sIFR.activate(hnul, hnl);

sIFR.replace(hnul, {
	selector: 'h2.nobanner',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'background-color': '#ffffff', 'color': '#292017', 'letter-spacing':'2' },
      '.sub': { 'font-size':'50%' }      
  },
  ratios: rats
});

sIFR.replace(hnul, {
	selector: 'h2',
	wmode: 'transparent',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'background-color': '#DCDCDC', 'color': '#ffffff', 'letter-spacing':'2', 'leading':'1' }
  },
  ratios: rats 
});

sIFR.replace(hnul, {
	selector: '.about-link h3',
	wmode: 'transparent',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'background-color': '#DCDCDC', 'color': '#ffffff', 'letter-spacing':'2' }
  },
  ratios: rats
});

sIFR.replace(hnl, {
	selector: '.sidebar-newsletter h3',
	wmode: 'transparent',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'color': '#333333', 'letter-spacing':'1' }
  },
  ratios: rats
});

/*
sIFR.replace(hnl, {
	selector: 'p.qualifications',
	wmode: 'transparent',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'color': '#292017', 'letter-spacing':'2' }
  },
  ratios: rats
});
*/

sIFR.replace(hnl, {
	selector: '.sidebar-info h3',
	wmode: 'transparent',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'color': '#ffffff', 'letter-spacing':'2', 'leading':'-2' },
      'a': { 'color': '#333333', 'text-decoration': 'none' },
      'a:hover': { 'color': '#333333', 'text-decoration': 'none' }
  },
  ratios: rats
});

sIFR.replace(hnul, {
	selector: '.sidebar-banner h3',
	wmode: 'transparent',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'color': '#ffffff', 'letter-spacing':'2', 'leading':'-2' },
      'a': { 'color': '#333333', 'text-decoration': 'none' },
      'a:hover': { 'color': '#333333', 'text-decoration': 'none' }
  },
  ratios: rats
});

sIFR.replace(hnul, {
	selector: '.profile-pic h4, .team-pic h4',
	wmode: 'transparent',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'background-color': '#DCDCDC', 'color': '#ffffff', 'letter-spacing':'2' }
  },
  ratios: rats
});

sIFR.replace(hnl, {
	selector: 'h4',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'background-color': '#ffffff', 'color': '#715a41', 'letter-spacing':'1' }
  },
  ratios: rats
});

sIFR.replace(hnl, {
	selector: '.content-footer p',
	sharpness: -250,
	thickness: 0,
	css: {
      '.sIFR-root': { 'background-color': '#ffffff', 'color': '#715a41', 'letter-spacing':'1' },
      'a': { 'color': '#68A7D4', 'text-decoration': 'none' },
      'a:hover': { 'color': '#68A7D4', 'text-decoration': 'none' }
  },
  ratios: rats
});




//sIFR.debug.ratios(helveticaneue, { selector: '.about-link h3' });

function toggleQuestion(source) {
	
	$(source).parent().toggleClass('selected');
	$(source).parent().find('div').slideToggle(250);
	
}

function toggleTeamMember(source, name, image, hdg) {
	
	//$(source).parent().parent().find('li.selected').removeClass('selected').find('div').slideUp(250);
	
	$(source).parent().toggleClass('selected');
	$(source).parent().find('div').slideToggle(250);
	
	//Effect.toggle(txt, 'blind', { duration: 0.25 });
	var parts = name.toLowerCase().split(' ');
	var initials = parts[0][0] + parts[1][0];
	var img = 'images/team_' + initials + '.jpg';
	if ($('#' + image).attr('src') != img) {
		$('#' + image).attr('src', 'images/team_' + initials + '.jpg');
	}
	// heading
	sIFR.getReplacementByFlashElement($('#' + hdg).children().get(0)).replaceText(name); 
	
	if ($(source).parent().parent().find('li.selected').size() == 0) {
		if (image == 'aimg') {
			$('#' + image).attr('src', 'images/team_institute_nurses.jpg');
			sIFR.getReplacementByFlashElement($('#' + hdg).children().get(0)).replaceText('Institute Nursing Team');
		}
		if (image == 'bimg') {
			$('#' + image).attr('src', 'images/team_243_group.jpg');
			sIFR.getReplacementByFlashElement($('#' + hdg).children().get(0)).replaceText('243 Surgical Centre Team');
		}	
	}
	
	
	
}

function toggleProcedurePic(source) {
	var pic = $(source).parent().prev().slideToggle(250);
	//Effect.toggle(pic, 'blind', { duration: 0.25 });	
}

$(document).ready(function() {
  $(".sidebar-newsletter input").focus(function(event) {
  	var def = $(event.target).attr("name").toUpperCase();
  	var val = $(event.target).val();
  	if (val == def) {
  		$(event.target).val("").removeClass("empty");
  	}
  }).blur(function(event) {
  	var def = $(event.target).attr("name").toUpperCase();
  	var val = $(event.target).val();
  	if (val == "") {
  		$(event.target).val(def).addClass("empty");
  	}  	
  });
});

// media player
$.fn.media.defaults.flvPlayer = '/swf/player.swf';
$.fn.media.defaults.mp3Player = '/swf/player.swf';


