// when the DOM is ready...
$(document).ready(function () {

	$("#contact_button").click(function(){
		$("#contacto").animate({top: '80px'}, 1000 );
		$("#contact_form").animate({top: '100px'}, 1000 );
	});
	$("#close_contact_button").click(function(){
		$("#contacto").animate({top: '550px'}, 1000 );
		$("#contact_form").animate({top: '570px'}, 1000 );
	});
	
	$("#empresa_button").click(function(){
		$("#kiss img").animate({src: 'kiss.jpg'}, 1000 )});

	$('ul#pics1').innerfade({
		speed: 1000,
		timeout: 4000,
		type: 'sequence',
		containerheight: '196px'
	});
	$('ul#pics2').innerfade({
		speed: 1000,
		timeout: 3000,
		type: 'sequence',
		containerheight: '148px'
	});

//			
//			//Hover events
//			$(function() { 	
//				$("div.panel p", "div#page").hover(function() {
//					$(this).animate({color: '#DEDEDE'}, 200 );
//				}, function() {
//					$(this).animate({color: '#999'}, 200 );
//				});
//			});
//			
//			$(function() { 	
//				$("div.panel a", "div#page").hover(function() {
//					$(this).animate({color: '#DEDEDE'}, 100 );
//				}, function() {
//					$(this).animate({color: '#249b00'}, 100 );
//				});
//			});
//
//});
//
//$(window).load(function(){
//			//Timer events
//			$(function() { 	
//
//				//clear the loading animation				
//				$("div#loading", "div#page").css('opacity', '0');
//				//changing z-index of all faders
//				$("div.fader", "div#page").oneTime("3500ms", function() {
//					$(this).css("z-index","-1");
//				});
//				
//				//fading the white frame				
//				$("div#header_fade", "div#page").oneTime("1500ms", function() {
//					$(this).animate({opacity: '0'}, 1000);
//				});	
//				$("div#white_line_fade", "div#page").oneTime("1500ms", function() {
//					$(this).animate({opacity: '0'}, 1000);
//				});
//				//fading the central content				
//				$("div#center_fade", "div#page").oneTime("2500ms", function() {
//					$(this).animate({opacity: '0'}, 1000);
//				});
//	
//				//fading the spark on 'contact'				
//				$("div#contact img", "div#page").everyTime(5000,function(i) {
//					$(this).animate({opacity: '0'}, 1000 ).animate({opacity: '1'}, 1000 );
//				});
//				
//			});
});
