function video()
{
	$(document).ready(function()
	{
		flowplayer("player", "librerias/flowplayer/flowplayer-3.2.5.swf",{
        clip:  {
        autoPlay: false,
        autoBuffering: true
       }
       });
	});

}

function slide()
{
	$(function(){
		$('.box_skitter_large').skitter({label:true,numbers:false,hideTools:true});
	});
}

function enviar_mensaje()
{
	$(function()
	{
		$('#enviar_msg').click(function()
		{
			nombre=$('#tname').val();
			email=$('#temail').val();
			asunto=$('#tasunto').val();
			mensaje=$('#tmensaje').val();
			telefono=$('#ttelefono').val();
			
			if((nombre!='')&&(email!='')&&(mensaje!=''))
			{
				$.ajax(
			     {
				    url:'scripts/enviar_mail.php',
				    type:'POST',
                    data: ({
					          vnombre:nombre,
						      vemail:email,
						      vasunto:asunto,
						      vmensaje:mensaje,
							  vtelefono:telefono
					      }),
			         success: function(data) 
					      {
						  
                                 $('#dform').html(data);
                         					  
                         }

				
			     });
			}
			else
			{
				$('.derror').fadeIn(1000);
			}
			
			
			
		});
	});
}
	

	
function columnas()
{
  $(document).ready(function()
  {      
    //Reset column size to a 100% once view port has been adjusted
	$("ul.column").css({ 'width' : "100%"});

	var colWrap = $("ul.column").width(); //Get the width of row
	var colNum = Math.floor(colWrap / 200); //Find how many columns of 200px can fit per row / then round it down to a whole number
	var colFixed = Math.floor(colWrap / colNum); //Get the width of the row and divide it by the number of columns it can fit / then round it down to a whole number. This value will be the exact width of the re-adjusted column

	$("ul.column").css({ 'width' : colWrap}); //Set exact width of row in pixels instead of using % - Prevents cross-browser bugs that appear in certain view port resolutions.
	$("ul.column li").css({ 'width' : colFixed}); //Set exact width of the re-adjusted column	
  });


}	

function portafolio()
{
	$(document).ready(function() {

	//Custom settings
	var style_in = 'easeOutBounce';
	var style_out = 'jswing';
	var speed_in = 1000;
	var speed_out = 300;	

	//Calculation for corners
	var neg = Math.round($('.qitem').width() / 2) * (-1);	
	var pos = neg * (-1);	
	var out = pos * 2;
	
	$('.qitem').each(function () {
	
		url = $(this).find('a').attr('href');
		img = $(this).find('img').attr('src');
		alt = $(this).find('img').attr('img');
		
		$('img', this).remove();
		$(this).append('<div class="topLeft"></div><div class="topRight"></div><div class="bottomLeft"></div><div class="bottomRight"></div>');
		$(this).children('div').css('background-image','url('+ img + ')');

		$(this).find('div.topLeft').css({top:0, left:0, width:pos , height:pos});	
		$(this).find('div.topRight').css({top:0, left:pos, width:pos , height:pos});	
		$(this).find('div.bottomLeft').css({bottom:0, left:0, width:pos , height:pos});	
		$(this).find('div.bottomRight').css({bottom:0, left:pos, width:pos , height:pos});	

	}).hover(function () {
	
		$(this).find('div.topLeft').stop(false, true).animate({top:neg, left:neg}, {duration:speed_out, easing:style_out});	
		$(this).find('div.topRight').stop(false, true).animate({top:neg, left:out}, {duration:speed_out, easing:style_out});	
		$(this).find('div.bottomLeft').stop(false, true).animate({bottom:neg, left:neg}, {duration:speed_out, easing:style_out});	
		$(this).find('div.bottomRight').stop(false, true).animate({bottom:neg, left:out}, {duration:speed_out, easing:style_out});	
				
	},
	
	function () {

		$(this).find('div.topLeft').stop(false, true).animate({top:0, left:0}, {duration:speed_in, easing:style_in});	
		$(this).find('div.topRight').stop(false, true).animate({top:0, left:pos}, {duration:speed_in, easing:style_in});	
		$(this).find('div.bottomLeft').stop(false, true).animate({bottom:0, left:0}, {duration:speed_in, easing:style_in});	
		$(this).find('div.bottomRight').stop(false, true).animate({bottom:0, left:pos}, {duration:speed_in, easing:style_in});	
	
	}).click (function () {
		window.location = $(this).find('a').attr('href');	
	});
	
	

});
}

function ver(experto)
{
	
	$(document).ready(function()
	{
		$('#'+experto).click();
	});
}

function flotante()
{
	/*
	var name = "#floatMenu";
    var menuYloc = null;

    $(document).ready(function(){
        menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
        $(window).scroll(function () {
            var offset = menuYloc+$(document).scrollTop()+"px";
            $(name).animate({top:offset},{duration:500,queue:false});
        });
    }); */
	
	var name2 = "#floatMenu2";
    var menuYloc2 = null;

    $(document).ready(function(){
        menuYloc2 = parseInt($(name2).css("top").substring(0,$(name2).css("top").indexOf("px")))
        $(window).scroll(function () {
            var offset2 = menuYloc2+$(document).scrollTop()+"px";
            $(name2).animate({top:offset2},{duration:500,queue:false});
        });
    });
	
/*
    var name3 = "#floatMenu3";
    var menuYloc3 = null;

    $(document).ready(function(){
        menuYloc3 = parseInt($(name3).css("top").substring(0,$(name3).css("top").indexOf("px")))
        $(window).scroll(function () {
            var offset3 = menuYloc3+$(document).scrollTop()+"px";
            $(name3).animate({top:offset3},{duration:500,queue:false});
        });
    });
	*/
	
	
}



function nieve()
	{
		$(document).ready(function(){

               $(document).snowfall({shadow : true, round : true,  minSize: 2, maxSize:6,flakeCount:70}); // add shadows
			   $('body').css({'backgroundColor' : '#9E0E0A'});
		});
		
	}
	
	

