$(document).ready(function(){
		
		// Replace HRs with Divs in IE
	  if (jQuery.browser.msie) {
			$("hr").wrap("<div class='hr'></div>");
		}
		
		$(".closed").block({  
		                message: null,  
		                css: { cursor: 'default' },
								    overlayCSS:  {   
												cursor: 'default',
								        opacity:        '.2'  
								    }
		            });
		
		var hoverconfig = {    
		     sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
		     interval: 100, // number = milliseconds for onMouseOver polling interval    
		     over: showmovie, // function = onMouseOver callback (REQUIRED)    
		     timeout: 50, // number = milliseconds delay before onMouseOut    
		     out: showmovieundo // function = onMouseOut callback (REQUIRED)    
		};
		
		
		$("ul.movies li").hoverIntent( hoverconfig );
	
		
		function showmovie(){
				 var movieId = $(this).attr("class");
				 $(this).addClass("hover");
	       $("div.movie:visible").hide();
	       $("div."+ movieId +"").show();
	   };
	
		function showmovieundo(){
				 $(this).removeClass("hover");
	  };
	

		$('.intro h2 .piece-a').cycle({
				cleartype: '1',
				random: '1',
		    fx:   'scrollDown',
		    shuffle: {
		        top:  -30,
		        left:  12
		    },
		    delay: -100,
				timeout: 5000
		});
		
		// $('.intro h2 .piece-b').cycle({
		// 		cleartype: '1',
		// 		random: '1',
		//     fx:   'shuffle',
		//     shuffle: {
		//         top:  -50,
		//         left:  -30
		//     },
		//     delay: -900,
		// 
		// });
		
		$('.intro h2 .piece-c').cycle({
				cleartype: '1',
				random: '1',
		    fx:   'scrollDown',
		    shuffle: {
		        top:  40,
		        left:  5
		    },
		    delay: -900,
				timeout: 8000
		});
		
		$('.intro h2 .piece-d').cycle({
				cleartype: '1',
				random: '1',
		    fx:   'scrollDown',
		    shuffle: {
		        top:  -3,
		        left:  100
		    },
		    delay: -2200,
				timeout: 6000
		});
	
		$("p.tags a").click(function () {
			 var tag = $(this).html();
		    $("#match_comment").attr("value", tag);
				return false; 
		 });
		
});






