/* Title:     Dynamic Border Images Web Page
Author:    Daniel MarinoModified:  April 2008*/$(document).ready(function() {

	// Dynamic Image Borders
	
	border_size = 10;
	
	$(".img-border").one("load", function(){
		newW = $(this).width() + (border_size * 2);
		$(this).wrap('<div class="img-contain" style="width: ' + newW + 'px;"></div>');
		$(this).before('<div class="img-head"><div class="t-l"></div><div class="t-r"></div></div>');
		$(this).after('<div class="img-foot"><div class="b-l"></div><div class="b-r"></div></div>');
	});

	// Transparent Grid
	
	jQuery.fn.fadeToggle = function(speed, easing, callback) {
		return this.animate({opacity: 'toggle'}, speed, easing, callback);
	};

	$("a.showgrid").click(function() {
    	$(".grid-grid").fadeToggle("slow");
	});

});
