/** Team Spotlight brick **/
$(function() {
	//var spotlights = $.getJSON('blog/index.php', { p: 648, feed : 'json' }, function(d) { 
	var spotlights = $.getJSON('blog/index.php', { cat: 8, feed : 'json' }, function(d) { 
		
		var content = d[0].excerpt.replace(/[\n+]+/g,'<br />'); 
		var img = '<p style="text-align:center;"><img src="' + d[0].thumbnail + '" style="width:175px;" /></p>';

		$('#team-spotlight-preview').html(content+img);
		
		//put the readmore link on a new line
		$('#team-spotlight-preview').find('a:last').css('display', 'block');

	}, 'json');
	
	//var blogpage = $.getJSON('blog/index.php', { p: 73, feed : 'json' }, function(d) { 
	var blogpage = $.getJSON('blog/index.php', { cat: 8, feed : 'json' }, function(d) { 
		var content = '<h2>' + d[0].title + '</h2>';
		content += '<p style="float:left;margin: 6px 12px 12px 0;"><img src="' + d[0].thumbnail + '" /></p>';
		content += d[0].content.replace(/[\n+]+/g,'<br />'); 
		$('#team-spotlight-full').html(content);

	}, 'json');			
	
}); 


function redirect_iframe_login() { 
	window.top.location.href = 'dashboard.php';
	return true;	
}
function redirect_top(url) { 
	window.top.location.href = url;
	return true;
}

function get_flash_movie(movieName) {
//	window.alert(movieName);
//	return $(movieName);
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}

/*
$(document).ready(function() {
	$('a.lightbox').fancybox({ 
		hideOnContentClick: false,
		callbackOnClose: function() {
			$('.flash').fadeIn();
		}
		
	});
	
	$('a.hideflash').click(function() {
		$('.flash').fadeOut();
	});

});
*/

//console.log( $(window).width() );
//if ( $(window).width() > 1024 ) {
//	$().css('margin-left','20%');  
//	document.getElementById('body').style.marginLeft = '20%';
//}

//console.log( $(window).height() );
