jQuery.noConflict();
var $j = jQuery;


//load href of clicked element with trim added to start of filename into #simplebox and fade in
$j(function() {
	$j(".simplebox").click(function() {
	     var pageToLoad = cookiesEnabled() ? 
	        $j(this).attr("href") : 
	        '/layouts/pages/isv/enableCookies.html';
	    $j("#simplebox").load(pageToLoad);
	    if ($j("#background").length){
	    }
	    else{
		    $j("#simplebox").before("<div id='background'></div>");
	    }
		$j("#background").fadeIn("slow");
		$j("#simplebox").fadeIn("slow");
		return false;				 
	});
});

//fade out #simplebox
$j(function() {
	$j(".closeme").click(function() {
		$j("#simplebox").fadeOut("slow");
		$j("#background").fadeOut("slow").remove();
	});
});
