	
// JavaScript Document
$(document).ready(function(){
	 
	$("ul.top-menu li a").hover(function() {
		$(this).parent().find("ul.sub-menu").slideDown("fast");

		$(this).parent().hover(function() {
			}, function(){
				$(this).parent().find("ul.sub-menu").slideUp("fast");
			});
	
	});
	 
});
	

	
$(document).ready(function(){
	$(".top-menu li a").hover(function() {
		$(this).stop().animate({
			backgroundColor: "#b90066"
		}, 300);
	},function() {
		$(this).stop().animate({
			backgroundColor: "#f60088"
		}, 300);
	});
}); 


$(document).ready(function() {
	var placeholder = $('#newsletter input[type=text]').attr('hiddenvalue');
	var input = $('#newsletter input[type=text]');
	
	input.focus(function() {
		if(input.val() == placeholder)
			input.val('');
	});
	input.blur(function() {
		if(input.val() == '')
			input.val(placeholder);
	});

});


var divsDataArray = [];


function ChangeFontSize(change)
{		
	
	
	$(".font-resizeable").each(function(i) {
			
			
		var currentFontSize = parseInt($(this).css("font-size").replace("px",""));
		var currentLineHeight = parseInt($(this).css("line-height").replace("px",""));
			

		var stepSize = 2;
		var newFontSize = 0;
		var changedFontSize = 0;
		var changedLineHeight = 0;
		var divDataString = "";
			

		if(change == "increase")
		{
			newFontSize = currentFontSize + stepSize;
			$(this).css("font-size", newFontSize + "px");
				
			if(currentLineHeight != 1)
			{
				newLineHeight = currentLineHeight + stepSize;
				$(this).css("line-height", newLineHeight + "px");
			}


			if(divsDataArray[i] == null)
			{
				changedFontSize = (newFontSize - currentFontSize);
					
				if(currentLineHeight != 1)
				{
					changedLineHeight = (newLineHeight - currentLineHeight);
				}
			}
			else
			{
				changedFontSize = parseInt(divsDataArray[i].split(",")[0]) + (newFontSize - currentFontSize);
					
				if(currentLineHeight != 1)
				{
					changedLineHeight = parseInt(divsDataArray[i].split(",")[1]) + (newLineHeight - currentLineHeight);
				}
			}


			divDataString = divDataString + changedFontSize.toString() + "," + changedLineHeight.toString() + ",increased";
			
		}
		else if(change == "decrease")
		{
			newFontSize = currentFontSize - stepSize;
			$(this).css("font-size", newFontSize + "px");
				
				
			if(currentLineHeight != 1)
			{
				newLineHeight = currentLineHeight - stepSize;
				$(this).css("line-height", newLineHeight + "px");
			}
				

			if(divsDataArray[i] == null)
			{
				changedFontSize = (newFontSize - currentFontSize);
					
				if(currentLineHeight != 1)
				{
					changedLineHeight = (newLineHeight - currentLineHeight);
				}
			}
			else
			{
				changedFontSize = parseInt(divsDataArray[i].split(",")[0]) + (newFontSize - currentFontSize);
					
				if(currentLineHeight != 1)
				{
					changedLineHeight = parseInt(divsDataArray[i].split(",")[1]) + (newLineHeight - currentLineHeight);
				}
			}


			divDataString = divDataString + changedFontSize.toString() + "," + changedLineHeight.toString() + ",decreased";
				
		}
		else if(change == "normal")
		{
			if(divsDataArray[i] != null)
			{
				if(divsDataArray[i].split(",")[2] != "normal")
				{
					changedFontSize = parseInt(divsDataArray[i].split(",")[0]);
					newFontSize = currentFontSize - changedFontSize;
					$(this).css("font-size", newFontSize + "px");
		
					if(currentLineHeight != 1)
					{
						changedLineHeight = parseInt(divsDataArray[i].split(",")[1]);
						newLineHeight = currentLineHeight - changedLineHeight;
						$(this).css("line-height", newLineHeight + "px");
					}
				}
			}
				
				
			divDataString = divDataString + "0,-1,normal";
				
		}
			
		//Saves New Data
		divsDataArray.splice(i, 1, divDataString);


	});

}

