// JavaScript Document
$(function() {
	var StageWidth = $(window).width();;
	var StageHeight =  $(window).height();
	// FULLSCREEN
	function FULLSCREEN(layer){
		$(layer).css("width","100%");
		$(layer).css("height","90%");
	}
	//FULLSCREEN("#pageContainer");
	// POSTION
	function PositionLayer(layer,position){
		var layerWidth = parseInt($(layer).css("width"));
		var layerHeight = parseInt($(layer).css("height"));
		switch(position){
			case 1:
				HorzMiddle = (StageWidth-layerWidth)/2;
				VertMiddle = (StageHeight-layerHeight)/2;
				$(layer).css({"left":HorzMiddle});
				$(layer).css({"overflow":"hidden","top":VertMiddle});
			break;
			case 2:
				HorzMiddle = (StageWidth-layerWidth)/2;
				$(layer).css("left",HorzMiddle);
				$(layer).css("top",0);
			break;
		}
		
	}	
	PositionLayer("#container",1);
	//PositionLayer("#loginContainer",2);
	// LOADER
	function Loader(){
		var layer = ".loader";
		var layerHeight = parseInt($(layer).css("height"));
		var layerWidth = parseInt($(layer).css("width"));
		VertMiddle = (StageHeight-layerHeight)/2;
		HorzMiddle = (StageWidth-layerWidth)/2;
		$(layer).css("top",VertMiddle);
		$(layer).css("left",HorzMiddle);
		$(".loader").fadeIn("slow");
	}
	// -> Icons
	function BOTONES(){
		$(".icon-info").hover(function(){
			$(this).parent().parent().children().children("#thumbContainer-0-infoContainer").animate({
				  height: 100,
				  opacity:0.6
				}, 400, function() {
				  // Animation complete.
				});							 
		}, function(){
				$(this).parent().parent().children().children("#thumbContainer-0-infoContainer").animate({
				  height: 0,
				  opacity:0
				}, 400, function() {
				  // Animation complete.
				});	
		});
		$("#thumbContainer-0").hover(function () {
			$(this).stop().animate({backgroundColor:'#4E1402'}, 300);
			}, function () {
			$(this).stop().animate({backgroundColor:'#943D20'}, 100);
			
		});
	}
	//BOTONES();
});
