
$(document).ready(function() {

	$.ajaxSetup({ cache: true });

	if($(".fancy").length > 0)
	{
		// load up fancybox if we need it on this page
	
		var styleFancy = $("<link>");
		styleFancy.attr({
			type: 'text/css',
			rel: 'stylesheet',
			href: sitePath + "core/css/fancybox/jquery.fancybox-1.3.4.css"
		});
		

		// silly browser - blue e's gotta be different
		if (document.createStyleSheet){
			document.createStyleSheet(sitePath + "core/css/fancybox/jquery.fancybox-1.3.4.css");
		} else {
			$("head").append( styleFancy ); 
		}

		
		$.getScript(sitePath + "core/js/jquery.easing-1.3.pack.js", function() {
			$.getScript(sitePath + "core/js/jquery.fancybox-1.3.4.pack.js", function() {
				$(".fancy").fancybox({
					'transitionIn'			: 'elastic',
					'transitionOut'		: 'elastic',
					'speedIn'				: 350,
					'speedOut'				: 200,
					'easingIn'				: 'easeOutBack',
					'easingOut'				: 'easeInBack',
					'overlayColor'			: '#000000'
				});
			});
		
		});

	}



	var styleUI = $("<link>");
	styleUI.attr({
		type: 'text/css',
		rel: 'stylesheet',
		href: sitePath + "core/css/smoothness/jquery-ui-1.8.16.custom.css"
	});


	// silly browser - blue e's gotta be different
	if (document.createStyleSheet){
		document.createStyleSheet(sitePath + "core/css/smoothness/jquery-ui-1.8.16.custom.css");
	} else {
		$("head").append( styleUI ); 
	}


	$.getScript(sitePath + "core/js/jquery-ui-1.8.16.custom.min.js");
	$.getScript(sitePath + "core/js/jquery.jcryption.js");
	$.getScript(sitePath + "core/js/jquery.cookie.js", function(){
		$.getScript(sitePath + "core/js/login.js");
	});


	
	$('a[rel=external]').live("click",function(){
		window.open( $(this).attr('href') );
		return false;
	}); 


	//$.ajaxSetup({ cache: false });
	
});

