/*JS Document created by SM Digital - www.smdigital.com.co - */
$(document).ready(function(){
	$("#campanaContenido, #coleccionContenido").hide();
});
Cufon.replace('#social-media a, #menu-principal li a, #menu-footer li a, #footer p, #footer p a', {hover: 'true'});
Cufon.replace('#menu-principal li a, #menu-marca li a', {hover: 'true', fontFamily: 'Chalet-LondonNineteenEighty'});
Cufon.replace('.wallpaper h2, .wallpaper p a', {fontFamily: 'ChaletBook'});
Cufon.replace('h2');
function show(id){
	$(id).fadeIn();
	$(id).addClass("active");
}
function hide(id){
	$(id).hide();
}
// On window load. This waits until images have loaded which is essential
$(window).load(function(){
	// Fade in images so there isn't a color "pop" document load and then on window load
	$("img.greyScale").fadeIn(500);
	
	// clone image
	$('img.greyScale').each(function(){
		var el = $(this);
		el.css({"position":"absolute"}).wrap("<div class='img_wrapper' style='display: inline-block; padding:6px; margin:8px;'>").clone().addClass('img_grayscale').css({"position":"absolute","z-index":"998","opacity":"0"}).insertBefore(el).queue(function(){
			var el = $(this);
			el.parent().css({"width":this.width,"height":this.height});
			el.dequeue();
		});
		this.src = grayscale(this.src);
	});
	
	// Fade image
	$('img.greyScale').mouseover(function(){
		$(this).parent().find('img:first').stop().animate({opacity:1}, 200);
	})
	$('.img_grayscale').mouseout(function(){
		$(this).stop().animate({opacity:0}, 500);
	});		
});
