var y;
var x;
$(document).ready(function() {
	height();
	width();
	$('p a.green').each(function(){
		var preview=$(this).attr('rel');
		var title=$(this).attr('ref');
		$('#preview').append("<img class='"+title+"'src='"+preview+"' alt='Preview Not Available, Click Through To View Site.'/>");
	    $('#preview img').hide();
	});
	$('#backer').css({
		'height': y+'px',
		'width': x+'px'			
	});
	var cur;
	$('p').hover(function(){
		$(this).find('span.small a').css({color: '#fff'});
	}, function(){
		$('span.small a').css({color: '#1B1D1F'});
	});
	$('p a.green').hover(function(){
		cur=$(this).attr('ref');
		$('#preview img.'+cur).fadeIn('fast');
	}, function(){
		 $('#preview img.'+cur).fadeOut('fast');
	});
});
function height(){
	y=0;
	if(self.innerHeight){
		y=self.innerHeight;
	}else if(document.documentElement && document.documentElement.clientHeight){
		y=document.documentElement.clientHeight;
	}else if(document.body){
		y=document.body.clientHeight;
	}
	return y;
}

function width(){
	x=0;
	if(self.innerWidth){
		x=self.innerWidth;
	}else if(document.documentElement && document.documentElement.clientWidth){
		x=document.documentElement.clientWidth;
	}else if(document.body){
		x=document.body.clientWidth;
	}
	return x;
}


