$(document).ready(function() {						   
	$('#content-info,.slider-style,.intro-anim-brend,.footer-anim').css({'opacity':'0'});
	/*---------PORTFOLIO HOVER---------*/
	$('#loadingsite').delay(3000).fadeOut(700);
	$('.intro-anim-head').animate({top:'50'}, 3700);
	$('#content-info,.slider-style').delay(3700).animate({opacity:'1'}, 1400);
	$('.intro-anim-brend').delay(4400).animate({opacity:'1',bottom:'57'}, 700);
	$('.footer-anim').delay(5200).animate({opacity:'1'}, 700);

	
		
	/*---------SLIDER---------*/
    $('#slider').jcarousel({
    	wrap: 'circular'
    });
	
	$('.jcarousel-prev-horizontal,.jcarousel-next-horizontal,#right-link,#left-link').css({opacity:'0.35'});
	$('.jcarousel-prev-horizontal,.jcarousel-next-horizontal,#right-link,#left-link').hover(function(){
		$(this).animate({opacity:"1"}, 100);},
		function(){
			$(this).animate({opacity:"0.35"}, 200);
	});
	
	$('#slider li').hover(function(e){
 		$('#slider li:not(:eq('+$(this).index()+'))').animate({opacity:"0.35"}, 50)},
	function(){
		$('#slider li').animate({opacity:"1"}, 50);
	});
	
	/*---------SOCIAL---------*/
	$(".social").css("opacity", "0.7");
	$(".social").hover(function() {
		$(this).animate({rotate: '+=360deg'}, 600);
		$(this).animate({opacity:1},10);
	},function() {
		$(this).animate({rotate: '-=360deg'}, 600);
		$(this).animate({opacity:0.7},10);
	});
	
		/*---------PORTFOLIO HOVER---------*/ 
	$('.hovic').hover(function(e){
 		$('.hovic').not($(this)).animate({opacity:"0.4"}, 400)},
	function(){
		$('.hovic').animate({opacity:"1"}, 50);
	});
	
	/*---------OLDWORKS-----------*/
	$(function(){  
    $("#mostrar").click(function(event) {  
    event.preventDefault();  
    $("#caja").slideToggle();  
	});  

	});  
	

	
	
	/*---------BREND LIST---------*/
    $('#brend-list').jcarousel({
        auto: 0,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
	});
	function mycarousel_initCallback(carousel)
	{
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
	
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
	
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
	});
	

};

$(document).ready(function() {
	/*---------POP-UP--------*/
	$(".popup").colorbox();
	$(".popup-logo").colorbox();
	
	//Example of preserving a JavaScript event for inline calls.
	$("#click").click(function(){ 
		$("#click").css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
		return false;
	});
});
