// <![CDATA[
$(document).ready(function(){
	
	/*
	|---------------------------------------------------------------
	| SET GLOBAL VARIABLES
	|---------------------------------------------------------------
	|
	| rp = relative path
	| ap = absolute path
	|
	*/
	http_root = $("body").attr("title");
	rp_cms = 'applications/CMS/';
	rp_layout = 'views/includes/layouts/';
	rp_template = 'views/includes/templates/';
	rp_image_global = 'views/styles/images/global/';
	rp_image_local = 'views/styles/images/local/';
	img_loader = 'loader-2b.gif';
	$('body, div').removeAttr('title');
	
	/*
	|---------------------------------------------------------------
	| LOAD THE SITE GENERAL FUNCTIONS
	|---------------------------------------------------------------
	|
	*/
	//loadBackground();
	//$(window).load(loadBackground);
	content_option = $("#supersize").attr("rel"); //alert(content_option);
	if(content_option != 'flash') loadBackground();
	
	scrollbarImg_content();
	attachToggler();
	getContent();
	getShop();
	toggleTerms();
	loadPopOut();
	
	$('.draggable').draggable();
	
	// Must trigger twice because the loadPopOut function always remove the previous active class.
	//$(".load-popup-public:first").trigger("click"); comment out this line to switch it on
	//$(".load-popup-public:first").trigger("click"); comment out this line to switch it on
	//$("#menu-main #spotlight a").trigger("click");
	//$("#menu-main #spotlight a").css("color","red");
	
	/*
	|---------------------------------------------------------------
	| LOAD THE SITE BLOG FUNCTIONS
	|---------------------------------------------------------------
	|
	*/
	//loadComments();
	//postForm_signUp();
	
	/*
	|---------------------------------------------------------------
	| LOAD THE SITE Q&A FUNCTIONS
	|---------------------------------------------------------------
	|
	*/
	//qna();
	
	/*
	|---------------------------------------------------------------
	| LOAD THE CMS FUNCTIONS
	|---------------------------------------------------------------
	|
	*/
	loadCMS();
	
	/*
	|---------------------------------------------------------------
	| LOAD MISC
	|---------------------------------------------------------------
	|
	*/
	
	
	/*
	var supersize = $('#supersize');
	supersize.load(http_root+rp_layout+'supersize.php?pg_url=asia-chic', function(){
		loadBackground();
	});
	
	var supersize = $('#supersize');
	supersize.stopSupersized();
	*/
});

// ]]>
