// <![CDATA[

$(document).ready(function(){
	
	/*
	|---------------------------------------------------------------
	| SET GLOBAL VARIABLES
	|---------------------------------------------------------------
	|
	| rp = relative path
	| ap = absolute path
	|
	*/
	http_root = $("body").attr("rel");
	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';
	
	/*
	|---------------------------------------------------------------
	| LOAD THE SITE GENERAL FUNCTIONS
	|---------------------------------------------------------------
	|
	*/
	autoComplete();
	afterCaption();
	scrollTop();
	slideShow();
	postForm_searchTag();
	postForm_unsubscribe();
	
	/*
	|---------------------------------------------------------------
	| LOAD THE SITE BLOG FUNCTIONS
	|---------------------------------------------------------------
	|
	*/
	loadComments();
	postForm_signUp();
	
	/*
	|---------------------------------------------------------------
	| LOAD THE SITE Q&A FUNCTIONS
	|---------------------------------------------------------------
	|
	*/
	//qna();
	
	/*
	|---------------------------------------------------------------
	| LOAD THE CMS FUNCTIONS
	|---------------------------------------------------------------
	|
	*/
	loadCMS();
	
	/*
	|---------------------------------------------------------------
	| LOAD MISC
	|---------------------------------------------------------------
	|
	*/
	
	if ($('#portfolio').length > 0) { //alert($('#portfolio')size());
		$('#menu-header-portfolio a').addClass('current-header');
	}
	
	if ($('#blog').length > 0) {
		$('#menu-header-blog a').addClass('current-header');
	}
	
	$('form *[title]').inputHint();
	$('.btn-form').val('');
	
	if ($('#profile').length > 0) {
		replaceTitle();
		
		$('#press-interviews-contribution img:first').parent().css({
			float:'left'
		});
		
		$('#press-interviews-contribution img:last').parent().css({
			float:'right'
		});
		
		$('#press-interviews-contribution h2').css({
			margin:'0px 0px 25px 0px'
		});
		
		$('#press-interviews-contribution div').eq(0).css({
			width:'403px'
		});
		
		$('#press-interviews-contribution div').eq(1).css({
			width:'175px'
		});
		
		
	}
	
	$("#tag p span").last().addClass('last-tag');
	$("#tag-portfolio p span").last().addClass('last-tag');
	$('.item-blog:last').css({margin:'0px'});

});

// ]]>
