$(document).ready(function() {
	// Newsletter Pop Up From Bottom
	$(function() {
		$("#newsBox").animate({marginTop:-220}, {duration:1000});
		$(this).blur();
		return false;   
	});
	$('#newsClose a').click(function(){
			$('.news_arrow').css({backgroundImage:('url(img/news_closeArrow.png)')});
			$("#newsBox").animate({marginTop:40}, {duration:500});
			$(this).blur();
			return false;
	});
	$(function() {
		$('#newsClick a').toggle(
			function(){
				$('.news_arrow').css({backgroundImage:('url(img/news_closeArrow.png)')});
				$("#newsBox").animate({marginTop:-0}, {duration:500});
				$(this).blur();
				return false;
			},
			function(){
				$('.news_arrow').css({backgroundImage:('url(img/news_openArrow.png)')});
				$("#newsBox").animate({marginTop:-220}, {duration:500});
				$(this).blur();
				return false;
			}
		)
	});					   
						   
	//Page Border
	var ph = $('#page_CONTENT').height();
	$('#border_L').css('height',ph+'px');
	$('#border_R').css('height',ph+'px');
	//Input Hints
	$('input[title]').inputHints();
	//Aerial View
	$('a.preview').lightBox();
 	// Increase Font Size
 	$("#fontUp").click(function(){
 		 var currentFontSize = $('#rightMain').css('font-size');
		 var currentFontSizeNum = parseFloat(currentFontSize, 10);
   		 var newFontSize = currentFontSizeNum*1.2;
		 if(newFontSize<=32){
 		 	$('#rightMain').css('font-size', newFontSize);
		 }
		 var ph = $('#page_CONTENT').height();
		$('#border_L').css('height',ph+'px');
		$('#border_R').css('height',ph+'px');
 		 return false;
 	});
 	// Decrease Font Size
 	$("#fontDown").click(function(){
  		var currentFontSize = $('#rightMain').css('font-size');
 		var currentFontSizeNum = parseFloat(currentFontSize, 10);
 		var newFontSize = currentFontSizeNum*0.8;
		if(newFontSize>=8){
 			$('#rightMain').css('font-size', newFontSize);
		}
		var ph = $('#page_CONTENT').height();
		$('#border_L').css('height',ph+'px');
		$('#border_R').css('height',ph+'px');
 		return false;
 	});
	
	
});

