$(document).ready(function() {
	$("#thumbs ul li a").fancybox({
		'zoomSpeedIn': 300, 
		'zoomSpeedOut': 300,
		'hideOnContentClick': true,
		'overlayShow': false
	});
});
$(document).ready(function() {
	$("a.preview").fancybox({
		'zoomSpeedIn': 300, 
		'zoomSpeedOut': 300,
		'hideOnContentClick': true,
		'overlayShow': false
	});
});
$(document).ready(function() {
	$("a.rhbcv").fancybox({
		'zoomSpeedIn': 300, 
		'zoomSpeedOut': 300,
		'hideOnContentClick': true,
		'overlayShow': false
	});
});	
$(document).ready(function() {
	$(".inline").fancybox({
		'zoomSpeedIn': 300, 
		'zoomSpeedOut': 300,
		'hideOnContentClick': true,
		'overlayShow': false
	});
});
$(document).ready(function() {
	$(".3db").fancybox({
		'zoomSpeedIn': 300, 
		'zoomSpeedOut': 300,
		'hideOnContentClick': true,
		'overlayShow': false
	});
});
$(document).ready(function() {
	
	// Preload all rollovers
	$("#designs img").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.png$/ig,"_over.png");
		$("<img>").attr("src", rollON);
	});
	
	// Navigation rollovers
	$("#designs a").mouseover(function(){
		imgsrc = $(this).children("img").attr("src");
		matches = imgsrc.match(/_over/);
		
		// don't do the rollover if state is already ON
		if (!matches) {
		imgsrcON = imgsrc.replace(/.png$/ig,"_over.png"); // strip off extension
		$(this).children("img").attr("src", imgsrcON);
		}
		
	});
	$("#designs a").mouseout(function(){
		$(this).children("img").attr("src", imgsrc);
	});
	$('#additional *').tooltip({
		showURL: false,
		track: true, 
	    delay: 0		
	});
	$('#ohplahviews *').tooltip({
		showURL: false,
		track: true, 
	    delay: 0		
	});

});
$(document).ready(function(){
	//Caption Sliding (Partially Hidden to Visible)
	$('.boxgrid.caption').hover(function(){
		$(".cover", this).stop().animate({top:'65px'},{queue:false,duration:160});
	}, function() {
		$(".cover", this).stop().animate({top:'114px'},{queue:false,duration:160});
	});
});
$(document).ready(function(){
$('a.newwindow').click(function(){
   window.open(this.href);
   return false;
});
});