$(document).ready( function(){
  $(document).pngFix(); 
  //Modal Window
	$("a.modal").fancybox({
		'type'			:   'ajax',
		'titleShow'		:  	false,
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'width'			:	'640',
		'height'		:	'360',
		'speedIn'		:	300, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'overlayOpacity':   0.7,
		'overlayColor'	:	'#000',
		'padding'		:	0
	});
});
//Allows Internet Explorer to display PNG files	  
$("#nav").hover(
function () {
    $(document).pngFix(); 
}); 

// ---------PROJECT LISTING BOX------------------------
$(document).ready(function(){
	$(".cover", this).css("top","162px");
	
	//Caption Sliding (Partially Hidden to Visible)
	$('.boxgrid.caption').hover(function(){
		$(".cover", this).stop().animate({top:'20px'},{queue:false,duration:140});
		$(".thumb", this).stop().animate({top:'20px'},{queue:false,duration:100});
	}, function() {
		$(".cover", this).stop().animate({top:'162px'},{queue:false,duration:140});
		$(".thumb", this).stop().animate({top:'0px'},{queue:false,duration:100});
		
	});
});
// ---------PARTNER LISTING BOX------------------------
$(document).ready(function(){
	$(".cover", this).css("top","162px");
	
	//Caption Sliding (Partially Hidden to Visible)
	$('.pboxgrid.caption').hover(function(){
		$(".cover", this).stop().animate({top:'10px'},{queue:false,duration:140});
		$(".thumb", this).stop().animate({top:'40px'},{queue:false,duration:100});
	}, function() {
		$(".cover", this).stop().animate({top:'133px'},{queue:false,duration:140});
		$(".thumb", this).stop().animate({top:'0px'},{queue:false,duration:100});
		
	});
});

function createXHRObject() {
	var xmlhttpo;
	
	if (window.XMLHttpRequest)
	{
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttpo=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		// code for IE6, IE5
		xmlhttpo=new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		alert("Your browser does not support XMLHTTP!");
	}
	
	return xmlhttpo;

}
