// // // // // 
//
//	Klimatrade Javascript BY-HA 2011
// 
// // // // //

$(document).ready(function() {
	
	JQLightboxGrouper();
	$("table tr:even").addClass("eventr");;
	$("table tr:odd").addClass("oddtr");;
}); 


// // // // // //
// 
//	Ez kell, hogy a lightbox külön galériák úgy működjeneka mint anno a Clearbox (SP & BY-HA)
//
function JQLightboxGrouper() {
	$(function() {
        var boxen = [];
        //find all links w/ rel="lightbox[gallery_name]" or just rel="lightbox" it works both ways
        $('a[rel*=lightbox]').each(function() {
        //push only unique lightbox[gallery_name] into boxen array
        if ($.inArray($(this).attr('rel'),boxen)) boxen.push($(this).attr('rel'));
    });
    //for each unique lightbox group, apply the lightBox
    $(boxen).each(function(i,val) { $('a[rel='+val+']').lightBox(); });
    });
}
