$(document).ready(function(){

	/*** contact: Headquarters accordion ***/
	if ($('ul.yoc-headquarters li em').length) {
		$('ul.yoc-headquarters li em').click(
			function() {
				if ($(this).next().css('display') != 'block') {
					$(this).parents('ul').find('p').slideUp(100);
					$(this).next().slideDown(100);
				}
			}
		);
	}

	/*** sliders ***/
	if ($('#yoc-casesSlider').length) {
		$('#yoc-casesSlider').loopedSlider({
			autoStart: 3000,
			slidespeed: 500,
			fadespeed: 100,
			autoHeight: 400,
			addPagination: true
		});
	}

	/*** png fix for IE <= 6 ***/
  $('#header-home, #header, .third, .imagecontainer').pngFix( {sSize: 'scale', sExclude: 'magnifier'} );

  /*** dropdowns ***/
  if ($('#selInterests').length || $('#selTitle').length) {
		$('#selInterests, #selTitle').nicedropdowns({fieldWidthCorrection:1});
	}

	/*** input example text ***/
	$('input[type=text][title!=""], textarea[title!=""]').inputexample();

	/*** headquarters google maps ***/
	if ($('a.yoc-hq-box-link').length) {
		$("a.yoc-hq-box-link").colorbox({
			innerWidth:500,
			innerHeight:500,
			iframe:true,
			transition:'fade',
			scrolling:false,
			opacity:.3,
			close:''
		});
	}

	/*** header fader ***/
	if ($('#content-fader').length) {
		$('#content-fader').innerfade({
			speed: 'slow',
			timeout: 6000,
			type: 'sequence',
			containerheight: '300px'
		});
	}

});

