function dramaticEntrance (obj, fTime) {
	$('#' + obj).fadeIn(fTime);
}

$(document).ready(function() {
	setTimeout("dramaticEntrance('topLogo',2500)",50);

	var scrWid = '1280';
	if (screen.width>=2000) {
		scrWid = '3840';
	} else if (screen.width>=1920) {
		scrWid = '1920';
	} else if (screen.width>=1680) {
		scrWid = '1680';
	} else if (screen.width>=1600) {
		scrWid = '1600';
	} else if (screen.width>=1440) {
		scrWid = '1440';
	} else if (screen.width>=1360) {
		scrWid = '1366';
	} else if (screen.width>=1280) {
		scrWid = '1280';
	} else if (screen.width>=1152) {
		scrWid = '1152';
	} else if (screen.width>=1024) {
		scrWid = '1024';
	} else if (screen.width>=800) {
		scrWid = '800';
	} else if (screen.width>=320) {
		scrWid = '320';
	}
	var isiPad = navigator.userAgent.match(/iPad/i) != null;
	var isiPhone = navigator.userAgent.match(/iPhone/i) != null;
	if (isiPad|isiPhone) {
		scrWid = '1024';
		document.getElementById('topMenuDiv').style.margin = '30px 18px 0 0';
		document.getElementById('topLogo').style.display='block';
		if (document.getElementById('stockImg')) {
			document.getElementById('stockImg').style.display='block';
		}
		if (document.getElementById('homeSlidesOuter')) {
			document.getElementById('homeSlidesOuter').style.width = '914px';
			document.getElementById('homeSlides').style.width = '900px';
			document.getElementById('homeTagline').style.width = '684px';
			document.getElementById('homeNewsBox').style.width = '460px;';
			document.getElementById('homeNews').style.width = '440px;';
			document.getElementById('homeInfoBox').style.width = '350px';
			document.getElementById('homeInfo').style.width = '330px';
		}
	}
	
	document.getElementById("container").style.backgroundImage='url(/images/style/bg/bg' + scrWid + '.jpg)';
	if (document.getElementById('stockImg')) {
		setTimeout("dramaticEntrance('stockImg',3500)",50);
	}


if (document.getElementById('homeSlides')) {
	var 	$test3 = $('#homeSlides'),
		$caption = $('div.caption'),
		STOP = 1, RUN = 2, PAUSE = 3;

	$test3.crossSlide({
		fade: 1
	}, [
		{	
			src:  useCDN + '/images/home/website1.jpg',
			alt:  'Websites that Influence',
			from: '100% 0% 1.7x',
			to:   '100% 80% 1x',
			time: 6
		}, {
			src:  useCDN + '/images/home/brand_logos.jpg',
			alt:  'Brands that Speak Volumes',
			from: '100% 65% 1.5x',
			to:   '0% 0% 0.8x',
			time: 6
		}, {
			src:  useCDN + '/images/home/fighter_jet.jpg',
			alt:  'Photographs that Tell Stories',
			from: 'bottom left 2x',
			to:   '0% 0% 1.0x',
			time: 6
		}, {
			src:  useCDN + '/images/home/magnolia_ridge1.jpg',
			alt:  'Campaigns that Spur Action',
			from: '0% 0% 0.5x',
			to:   '10% 100% 1.0x',
			time: 7
		}, {
			src:  useCDN + '/images/home/media.jpg',
			alt:  'PR that Gets Attention',
			from: 'top left',
			to:   '100% 80% 1.5x',
			time: 5
		}, {
			src:  useCDN + '/images/home/visual.png',
			alt:  'Data that\'s Visual',
			from: '100% 80% 2.5x',
			to:   '80% 0% 1.0x',
			time: 4
		}, {
			src:  useCDN + '/images/home/social.png',
			alt:  'Networking that\'s Social',
			from: '100% 25%',
			to:   '30% 50% 1.5x',
			time: 4
		}, {	
			src:  useCDN + '/images/home/nola.jpg',
			alt:  'Loving the Flavor that\'s New Orleans',
			from: 'top left 1.0x',
			to:   '100% 0% 1.0x',
			time: 5
		}
	], function(idx, img, idxOut, imgOut) {
		if (idxOut == undefined) {
			$caption.text(img.alt).animate({ opacity: .7 })
		} else {
			$caption.animate({ opacity: 0 })
		}
	});
	$caption.show().css({ opacity: 0 })
}

	if (document.getElementById('flashContent')) {
 		var flashvars = {
 		};
 		var params = {
 			menu: "false",
 			scale: "noScale",
 			allowFullscreen: "false",
 			allowScriptAccess: "always",
 			bgcolor: "#ffffff"
 		};
 		var attributes = {
 			id:"Flashwaves"
 		};
 		//swfobject.embedSWF("/main.swf", "flashContent", "900", "240", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

		var so = new SWFObject("/main.swf", "Flashwaves", "900", "240", "9.0.0", "#ffffff");
		so.addVariable("menu", "false");
		so.addVariable("scale", "noScale");
		so.addVariable("allowFullscreen", "always");
		so.addVariable("allowScriptAccess", "always");
		so.addVariable("bgcolor", "#ffffff");
		so.write("flashContent");
 	}
	if (document.getElementById('flashContent2')) {
 		var flashvars = {
 		};
 		var params = {
 			menu: "false",
 			scale: "noScale",
 			allowFullscreen: "false",
 			allowScriptAccess: "always",
 			bgcolor: "#ffffff"
 		};
 		var attributes = {
 			id:"FlashBubbles"
 		};
 		//swfobject.embedSWF("/swf/peer_bubbles.swf", "flashContent2", "800", "590", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

		var s1 = new SWFObject("/swf/peer_bubbles.swf", "flashContent2", "800", "590", "9.0.0", "#ffffff");
		s1.addVariable("menu", "false");
		s1.addVariable("scale", "exactfit");
		s1.addVariable("allowFullscreen", "always");
		s1.addVariable("allowScriptAccess", "always");
		s1.addVariable("bgcolor", "#ffffff");
		s1.write("flashContent2");
 	}

});

