var $s = jQuery.noConflict();
$s(document).ready(function(){
						   
	// -- NAVIGATION MENU --

	$s('.nav1 ul').css({display: "none"});
	$s('.nav1 li').hover(function(){
		$s(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(250);
		},function(){
		$s(this).find('ul:first').css({visibility: "hidden"});
	});
	

	// -- PRETTYPHOTO INIT --

	$s("a[rel^='prettyPhoto[group1]'], a[rel^='prettyPhoto[group2]']").prettyPhoto({theme:'light_rounded', showTitle:false, opacity:0.6})
	
	
	// -- PORTFOLIO THUMBNAIL HOVER MINI PLUGIN --

	jQuery.fn.thumbHover = function(options) {
		$s(this).each(function() 
		{	
			$saction = 'play';		
			if($s(this).attr('href').match(/(jpg|jpeg|jpe|png|gif|tif|tiff)/)) 
				$saction = 'zoom';			
			var $sitem = $s(this).contents("img");
			if ($sitem.length > 0)
			{	
				var $smediaIcon = $s("<div class='"+$saction+"'></div>").appendTo($s(this));
				$smediaIcon.css({display: "none"});
				$s(this).hover(function()
					{
						$sx = $sitem.width();											
						$sy = $sitem.height();
						$sxy =  $sitem.position();
						$smediaIcon.css({top:$sxy.top+$sy-16, left:$sxy.left+$sx-16});
						$smediaIcon.show();
					}, function() {
						$smediaIcon.hide();
					}
				);
			}	
		}); 
		return this;
	 };
	$s("a[rel^='prettyPhoto[group1]']").thumbHover();	 
		
	$s(".flickr_badge_image img, ul.related_posts li img").hover(function(){
	$s(this).stop().animate({"opacity":"0.7"}, 100);  
	}, function(){
	$s(this).stop().animate({"opacity":"1"}, 100);  
	});
}) // end document.ready call
