integration/v2/js/main.js
changeset 119 9d2a4916ee7a
parent 118 a06fb50d574f
child 128 5ce3313fb21d
--- a/integration/v2/js/main.js	Tue Jun 18 11:48:49 2013 +0200
+++ b/integration/v2/js/main.js	Tue Jun 18 13:29:25 2013 +0200
@@ -1,13 +1,30 @@
 $(function(){
+//masonry
 	var container = $('.list-projets-3');
 	container.masonry({
 	  columnWidth: 465,
 	  itemSelector: '.item',
 	  gutter : 20
 	});
-
+//popin
 	$('.new-collection').bind('click', function(e){
 		e.preventDefault();
+		var target = $(this).attr('href');
+		$('.popin-wrap').fadeIn(function(){
+			$(target).show();
+		});
+	});
+
+	$('.close-popin, .popin-wrap').bind('click', function(e){
+		e.preventDefault();
+		e.stopPropagation();
+		$('.popin-wrap').fadeOut(function(){
+			$('.popin').hide();
+		});
+	});
+
+	$('.popin').bind('click', function(e){
+		e.stopPropagation();
 	});
 
 });//ready