var width;
var height;
var data = {};

$.fn.wait = function(time, type){
    time = time || 1000;
    type = type || "fx";
    return this.queue(type, function(){
        var self = this;
        setTimeout(function(){
            $(self).dequeue();
        }, time);
    });
};



$(function(){
    $("input, textarea").keydown(function(){
        $(".validation", $(this).parent()).hide();
    });
    
    $(".fancy").fancybox({
        cyclic: 1,
        overlayOpacity: '0.9',
        overlayColor: '#140103'
    });
});


$(function(){
  
    $(".fancy > img").hover(function(){
        height = $(this).height();
        width = $(this).width();
        $(this).stop().animate({
            'height': Number(height * 1.1) + "px",
            'width': Number(width * 1.1) + "px"
        }, 200)
    }, function(){
        $(this).stop().animate({
            'height': height + "px",
            'width': width + "px"
        }, 300)
    });
    

	
	 $("#menu_galleries_trigger").hover(function(event){
        $("#menu_galleries").stop(true, true).slideDown();
    }, function(){
        $("#menu_galleries").stop(true, true).slideUp();
    })
});

