/**
 * @author James
 */





jQuery.noConflict();


jQuery(document).ready(function() {

	jQuery('a.more').append(' <img src="/staging/assets/static/maxus/blue-arrow-right.gif" alt="Read More" />');
	jQuery('#press-cuttings li a').prepend('<img src="/staging/assets/static/maxus/blue-arrow-right.gif" alt="Read More" /> ');
	jQuery('#clients li').prepend('<img src="/staging/assets/static/maxus/generic-grey-arrow.gif" alt="Read More" /> ');
	jQuery('.pagenav a').append('<img src="/staging/assets/static/maxus/generic-pagenav-arrow-blue.gif" alt="Go" />');
	jQuery('#printaction').click(function() {
		window.print();
		return false;
	});
	
	
	jQuery('#subscribe-widget #email').focus(function() {
			emailInput = jQuery(this);
			if (emailInput.val() == 'Enter email here') {
				emailInput.val('');
			}
	});
	jQuery('#subscribe-widget #email').blur(function() {
			emailInput = jQuery(this);
			if (emailInput.val() == '') {
				emailInput.val('Enter email here');
			}
	});
	
	//jQuery('.thickbox').lightBox({fixedNavigation:true});
	
	if (jQuery('#whatwedo').length > 0) {
		flowplayer("player", "/staging/includes/js/maxus/flowplayer/flowplayer-3.1.5.swf", { 
			    clip: { 
					autoPlay: false, 
					autoBuffering: true 
				}
			}
		);
	}
	
	if (jQuery('#casestudy').length > 0) {
		Shadowbox.setup("a.thickbox", {});
		Shadowbox.setup("a.flashvideo", {
			width:640,
			height:480
		});
		Shadowbox.setup("a.mp3audio", {
			player: 'flv',
			height: 1
		});
		//Shadowbox.setup("a.thickbox-video", {width:640,height:480});
	}
	if (jQuery('#press-cuttings').length > 0) {
		Shadowbox.setup("#press-cuttings a", {});
	}
	if (jQuery('#aboutus').length > 0) {
		Shadowbox.setup("#overlaytrigger", {
			width:640,
			height:360
		});
	}
	if (jQuery('#meettheteam').length > 0) {
		Shadowbox.setup("#overlaytrigger", {
			width:640,
			height:360
		});
	}
	jQuery('.peopleaction').click(function() {
		jQuery('#people img').show();
		var groupname = jQuery(this).attr('id');
		jQuery('#people img[rel!='+groupname+']').hide();
		return false;
	});
	
	jQuery('#contact #map img').hide();
	jQuery('#contact #map').flash({
		swf: '/staging/assets/static/maxus/flash/Maxus_getintouch_V1.swf',
		width: 397,
		height:361
	});
	
	jQuery('#aboutus #flash-content img').hide();
	jQuery('#aboutus #flash-content').flash({
		swf: '/staging/assets/static/maxus/flash/Maxus_aboutus_V4.swf',
		width: 397,
		height:507
	});
	
	jQuery('#whatwedo #flash-content img').hide();
	jQuery('#whatwedo #flash-content').flash({
		swf: '/staging/assets/static/maxus/flash/Maxus_what_V2.swf',
		width: 397,
		height:507
	});
	
	jQuery('#ournetwork #flash-content img').hide();
	jQuery('#ournetwork #flash-content').flash({
		swf: '/staging/assets/static/maxus/flash/Maxus_network_V2.swf',
		width: 397,
		height:507
	});
	jQuery('#ourstructure #flash-content img').hide();
	jQuery('#ourstructure #flash-content').flash({
		swf: '/staging/assets/static/maxus/flash/Maxus_structure_V1.swf',
		width: 397,
		height:507
	});
	jQuery('#whoweworkfor #flash-content img').hide();
	jQuery('#whoweworkfor #flash-content').flash({
		swf: '/staging/assets/static/maxus/flash/Maxus_who_V1.swf',
		width: 397,
		height:507
	});
	jQuery('#home-flash-content img').hide();
	jQuery('#home-flash-content').flash({
		swf: '/staging/assets/static/maxus/flash/Maxus_home_V3.swf',
		width: 397,
		height:284
	});
    
});
