﻿

function changeFontSize(size) {
	if (size == 'normal') {
		document.body.style.fontSize = '62.5%';
		//eraseCookie('fontSizeVS');
		$.cookie('fontSizeVS', null);
		//createCookie('fontSizeVS', 'normal', 1);
		$.cookie('fontSizeVS', 'normal', { expires: 1 });

	}
	else if (size == 'large') {
		document.body.style.fontSize = '80%';
		//eraseCookie('fontSizeVS');
		$.cookie('fontSizeVS', null);
		//createCookie('fontSizeVS', 'large', 1);
		$.cookie('fontSizeVS', 'large', { expires: 1 });		
	}
	else if (size == 'largest') {
		document.body.style.fontSize = '100%';
		//eraseCookie('fontSizeVS');
		$.cookie('fontSizeVS', null);
		//createCookie('fontSizeVS', 'largest', 1);
		$.cookie('fontSizeVS', 'largest', { expires: 1 });
	}
}

$(document).ready(function(){ $(".newsIntro .list li a").mouseover( ChangeFrontPageNews ) });

function ChangeFrontPageNews() {
	var name = $(this).text();
	var date = $(this).attr("date");
	var img = $(this).attr("img");
	var content = $(this).attr("content");
	var link = $(this).attr("href");

	$(".newsIntro .singleNews h6 a").attr("href", "/" + link).attr("title", name).text(name);
	var text = '';
	if (img != '')
		text = "<img src='" + img + "' align='right' style='width:120px' alt='' />";
	text += content;

	$(".newsIntro .singleNews span.date").html(date);
	$(".newsIntro .singleNews p").html(text);
	$(".newsIntro .singleNews a.more").attr("href", "/" + link);
	
	
}