
	
	$(function () {
	
		//hide non-flash mp3
		
		$('.iphone1').hide();
		
		//show hide reviews
		
		$('div.sH > div').hide();
	
		$('a.show').click(function() {
			$(this).hide().next('div').fadeIn(400);
			return false;
		});

		//colorbox triggers
		    
		$('a.mlist').colorbox({
			width:780,
			height:650,
			iframe:true
		});
		    
		$('a.recMod').colorbox({
			width:800,
			height:600,
			iframe:true
		});
		
		$("a[rel='gall']")
			.colorbox({ slideshow:true,	transition: 'fade' })
			.fadeTo(300, 0.75)
			.hover(function() {
					$(this).stop().fadeTo(200, 1)
				},function() {
					$(this).stop().fadeTo(500, 0.75)
			});
			
		$("a.dl")
			.colorbox({
				width:750,
				height:580,
				iframe:true,
				transition: 'fade'
			})
			.fadeTo(300, 0.75)
			.hover(
				function() {
					$(this).stop().fadeTo(200, 1)
				},	function() {
					$(this).stop().fadeTo(500, 0.75)
				}
			);
  
		// same page nice scrolling links
		
 		function filterPath(string) {
    	return string
      	.replace(/^\//,'').replace(/(index|default).[a-zA-Z]{3,4}$/,'').replace(/\/$/,'');
	  }
  	
  	$('a[href*=#]').each(function() {
    	if ( filterPath(location.pathname) == filterPath(this.pathname)
	    && location.hostname == this.hostname
  	  && this.hash.replace(/#/,'') ) {
    	  var $targetId = $(this.hash), $targetAnchor = $('[name=' + this.hash.slice(1) +']');
      	var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
	       if ($target) {
  	       var targetOffset = $target.offset().top;
    	     $(this).click(function() {
      	     $('html, body').animate({scrollTop: targetOffset}, 600);
        	   return false;
         	});
	      }
  	  }
	  });
		
	});