All pastes #2059424 Raw Edit

Miscellany

public text v1 · immutable
#2059424 ·published 2011-05-14 17:21 UTC
rendered paste body
var nth_photo_class	= "nth-photo";

(function($){
nth	= {};

nth.framePhotos	= function() {
    $('.'+nth_photo_class).each(function(i,el){
	var selector	= 'nth-border-'+($('.nth-borders').length-1);
	$('.nth-borders.original').clone().insertAfter('.nth-borders.original').removeClass('original').css('display', 'block').addClass(selector);
	$('.'+selector+' .nth-b1-tl').stw().edge('img:eq('+i+')','tl');
	$('.'+selector+' .nth-b1-tr').stw().edge('img:eq('+i+')','tr');
	$('.'+selector+' .nth-b1-bl').stw().edge('img:eq('+i+')','bl');
	$('.'+selector+' .nth-b1-br').stw().edge('img:eq('+i+')','br');
	$('.'+selector+' .nth-b1-t').width($('img:eq('+i+')').width()).stw().edge('img:eq('+i+')','t');
	$('.'+selector+' .nth-b1-b').width($('img:eq('+i+')').width()).stw().edge('img:eq('+i+')','b');
	$('.'+selector+' .nth-b1-l').height($('img:eq('+i+')').height()).stw().edge('img:eq('+i+')','l');
	$('.'+selector+' .nth-b1-r').height($('img:eq('+i+')').height()).stw().edge('img:eq('+i+')','r');
    });
}

nth.flashPhotos	= function() {
    $('.'+nth_photo_class).each(function(i,el){
	$(el).overlay('flash').css('background-color', '#fff');
	$(el).overlay('flash').css('background-color', '#fff');
    });
}

$(window).load(function() {
    nth.framePhotos();
    nth.flashPhotos();
});
})(jQuery);