Lines 1392-1410
Link Here
|
1392 |
// Loop over each container in the template which contains covers |
1392 |
// Loop over each container in the template which contains covers |
1393 |
$(".cover-slider").each(function( index ){ |
1393 |
$(".cover-slider").each(function( index ){ |
1394 |
var lightbox_descriptions = []; |
1394 |
var lightbox_descriptions = []; |
|
|
1395 |
var first_shown = 0; |
1395 |
$(this).find(".cover-image").each( function( index ){ |
1396 |
$(this).find(".cover-image").each( function( index ){ |
1396 |
var div = $(this); |
1397 |
var div = $(this); |
1397 |
// Find the image in the container |
1398 |
// Find the image in the container |
1398 |
var img = div.find("img")[0]; |
1399 |
var img = div.find("img")[0]; |
1399 |
if( img && $(img).length > 0 ){ |
1400 |
if( img && $(img).length > 0 ){ |
1400 |
var description = ""; |
1401 |
var description = ""; |
1401 |
if( (( img.complete != null && !img.complete) || img.naturalHeight == 0 ) && div.attr("id") != "googlejacket-coverimg" ){ |
1402 |
if( img.naturalHeight == 0 && div.attr("id") != "googlejacket-coverimg" ){ |
1402 |
// No image loaded in the container. Remove the slide |
1403 |
// No image loaded in the container. Remove the slide |
1403 |
div.remove(); |
1404 |
div.remove(); |
1404 |
} else { |
1405 |
} else { |
1405 |
// All slides start hidden. If this is the first one, show it. |
1406 |
// All slides start hidden. If this is the first one, show it. |
1406 |
if( index == 0 ){ |
1407 |
if( first_shown == 0 ){ |
1407 |
div.show(); |
1408 |
div.show(); |
|
|
1409 |
first_shown = 1; |
1408 |
} |
1410 |
} |
1409 |
// Check if Amazon image is present |
1411 |
// Check if Amazon image is present |
1410 |
if ( div.attr("id") == "amazon-bookcoverimg" ) { |
1412 |
if ( div.attr("id") == "amazon-bookcoverimg" ) { |
1411 |
- |
|
|