1/* 2* Developed by Justin Mead 3* ©2009 MeadMiracle 4* www.meadmiracle.com / [email protected] 5* Version 1.0 6* Testing: IE7/Windows XP 7* Firefox/Windows XP 8* Licensed under the Creative Commons GPL http://creativecommons.org/licenses/GPL/2.0/ 9* 10* OPTIONS LISTING: 11* *Lheight, Lwidth - the height and width to use for the center image (landscape) 12* *Lshrink - the function to use when shrinking an image to a smaller size. must take in and return an integer value. (landscape) 13* *Lzoom - the function to use when enlarging an image for the zoom view. must take in and return an integer value. (landscape) 14* *Pheight, Pwidth - the height and width to use for the center image (portrait) 15* *Pshrink - the function to use when shrinking an image to a smaller size. must take in and return an integer value. (portrait) 16* *Pzoom - the function to use when enlarging an image for the zoom view. must take in and return an integer value. (portrait) 17* *defaultLayout - the layout attribute to apply when the image has no layout attribute 18* *startClass - the class label of the image to place in the center slot at the start of the gallery 19* *slideSpeed - the animation speed of sliding. use jQuery animation speed values 20* *zoomSpeed - the animation speed of zooming. use jQuery animation speed values 21* *gutterWidth - the horizontal distance between each of the images. use a pixel value 22* *captionUpPath - the path of the image to use for the "caption up" button 23* *captionUpWidth - the pixel width of the "caption up" image 24* *captionUpHeight - the pixel height of the "caption up" image 25* *captionUpID - the ID attribute to use for the "caption up" image 26* *captionDownPath - the path of the image to use for the "caption down" button 27* *captionDownWidth - the pixel width of the "caption down" image 28* *captionDownHeight - the pixel height of the "caption down" image 29* *captionDownID - the ID attribute to use for the "caption down" image 30* *captionHeight - the function to use to determine the height of the caption. takes in an integer value (usually the height of the image to caption) 31 and returns an integer value 32* *captionStyle - the CSS style value to apply to the captions 33* *captionClass - the CSS class to apply to the captions 34* *captionID - the ID attribute to apply to the currently active caption 35* *captionTextAttribute - the attribute containing the text to use in captions 36* *useCaptions - allow captions to be shown 37* 38* All options have default values, and as such, are optional. Check the 'options' JSON object below to see the defaults. 39*/ 40 41(function($) { 42 $.galleryUtility = {}; 43 $.galleryUtility.centerImage = {}; 44 $.galleryUtility.rightImage = {}; 45 $.galleryUtility.leftImage = {}; 46 $.galleryUtility.rightImageStorage = {}; 47 $.galleryUtility.leftImageStorage = {}; 48 $.galleryUtility.zoomImage = {}; 49 $.galleryUtility.gallery = {}; 50 51 $.galleryUtility.Options = { 52 container: null, 53 Lheight: 300, 54 Lwidth: 200, 55 Lshrink: 56 function(dimension) { 57 return dimension * 0.75; 58 }, 59 Lzoom: 60 function(dimension) { 61 return dimension * 2; 62 }, 63 Pheight: 96, 64 Pwidth: 68, 65 Pshrink: 66 function(dimension) { 67 return dimension * 0.50; 68 }, 69 Pzoom: 70 function(dimension) { 71 return dimension * 1.1; 72 }, 73 defaultLayout: 'portrait', 74 startClass: 'start', 75 slideSpeed: 'normal', 76 zoomSpeed: 'fast', 77 gutterWidth: 10, 78 captionUpPath: 'Images/SlidingGallery/captionUpArrow.png', 79 captionUpWidth: 24, 80 captionUpHeight: 17, 81 captionUpID: 'captionArrowUp', 82 captionDownPath: 'Images/SlidingGallery/captionDownArrow.png', 83 captionDownWidth: 24, 84 captionDownHeight: 17, 85 captionDownID: 'captionArrowDown', 86 captionHeight: 87 function(zoomHeight) { 88 return zoomHeight * 0.2; 89 }, 90 captionStyle: 'background-color:white; color:black; opacity: 0.6; filter: alpha(opacity = 60); font-size: 16px; text-align:center;', 91 captionClass: 'captionBox', 92 captionID: 'activeCaption', 93 captionTextAttribute: 'caption', 94 useCaptions: false 95 }; 96 97 $.fn.slidingGallery = function(options) { 98 //global settings 99 $.extend($.galleryUtility.Options, options); 100 //eliminate overflow 101 $('body').css('overflow-x', 'hidden'); 102 var container = null; 103 if (!$.galleryUtility.Options.container) { 104 $.galleryUtility.Options.container = $('body'); 105 } else { 106 $.galleryUtility.Options.container.css('position', 'relative'); 107 } 108 $.galleryUtility.gallery = $(this).css('cursor', 'pointer'); 109 $.galleryUtility.definePositions(); 110 if ($.galleryUtility.Options.useCaptions) { 111 $.galleryUtility.Options.container.append('<img src="' + $.galleryUtility.Options.captionUpPath + '" style="width: ' + $.galleryUtility.Options.captionUpWidth + '; display: none; border-width:0px;"' + 'id="' + $.galleryUtility.Options.captionUpID + '" />').append('<img src="' + $.galleryUtility.Options.captionDownPath + '" style="width: ' + $.galleryUtility.Options.captionDownWidth + '; display: none; border-width:0px;"' + 'id="' + $.galleryUtility.Options.captionDownID + '" />'); 112 $('#' + $.galleryUtility.Options.captionUpID + ',#' + $.galleryUtility.Options.captionDownID).css('cursor', 'help'); 113 } 114 115 //setup existing images 116 var lastIndex = 0; 117 var gallerySize = $.galleryUtility.gallery.each(function(i) { 118 $(this).attr({ 119 'index': i, 120 'prev': (i - 1), 121 'next': (i + 1) 122 }).css('position', 'absolute'); 123 if (($(this).attr('layout') !== 'portrait') && ($(this).attr('layout') !== 'landscape')) { 124 $(this).attr('layout', $.galleryUtility.Options.defaultLayout); 125 } 126 lastIndex = i; 127 }).hide().size(); 128 129 //fill in gallery with duplicates until there are at least 7 130 var currIndex = 0; 131 while (gallerySize < 4) { 132 var $clone = $.galleryUtility.gallery.filter('[index=' + currIndex + ']').clone().attr({ 133 'index': lastIndex + 1, 134 'prev': lastIndex, 135 'next': lastIndex + 2 136 }).removeClass($.galleryUtility.Options.startClass); 137 $.galleryUtility.gallery.filter('[index=' + (lastIndex) + ']').after($clone); 138 $.galleryUtility.gallery = $.galleryUtility.gallery.add('img[index=' + (lastIndex + 1) + ']'); 139 lastIndex++; 140 currIndex++; 141 gallerySize++; 142 } 143 $.galleryUtility.gallery.filter('[index=' + lastIndex + ']').attr('next', 0); 144 $.galleryUtility.gallery.filter('[index=0]').attr('prev', lastIndex); 145 $.galleryUtility.gallery.filter('[index=0]').attr('currIndex', currIndex); 146 147 //set images 148 $.galleryUtility.setCenter($.galleryUtility.gallery.filter('.' + $.galleryUtility.Options.startClass).show()); 149 $.galleryUtility.setLeft($.galleryUtility.gallery.filter('[index=' + $.galleryUtility.centerImage.image.attr('prev') + ']').show()); 150 $.galleryUtility.setRight($.galleryUtility.gallery.filter('[index=' + $.galleryUtility.centerImage.image.attr('next') + ']').show()); 151 $.galleryUtility.setLeftStorage($.galleryUtility.gallery.filter('[index=' + $.galleryUtility.leftImage.image.attr('prev') + ']')); 152 $.galleryUtility.setRightStorage($.galleryUtility.gallery.filter('[index=' + $.galleryUtility.rightImage.image.attr('next') + ']')); 153 154 //bind events ************************************************************ 155 $.galleryUtility.leftImage.image.one('click', $.galleryUtility.slideRight); 156 $.galleryUtility.centerImage.image.one('click', $.galleryUtility.zoomOut); 157 $.galleryUtility.rightImage.image.one('click', $.galleryUtility.slideLeft); 158 $.galleryUtility.centerImage.image.one('click', $.galleryUtility.zoomIn); 159 160 $(window).resize(function() { 161 $.galleryUtility.definePositions(); 162 $.galleryUtility.setCenter($.galleryUtility.centerImage.image); 163 $.galleryUtility.setLeft($.galleryUtility.leftImage.image); 164 $.galleryUtility.setRight($.galleryUtility.rightImage.image); 165 $.galleryUtility.setLeftStorage($.galleryUtility.leftImageStorage.image); 166 $.galleryUtility.setRightStorage($.galleryUtility.rightImageStorage.image); 167 }); 168 169 $('.boletim_arrow_left').click($.galleryUtility.arrowRight); 170 $('.boletim_arrow_right').click($.galleryUtility.arrowLeft); 171 172 //return the objects (for chaining purposes) 173 return $(this); 174 }; 175 176 $.galleryUtility.slideRight = function() { 177 178 var liLeft = $.galleryUtility.leftImage.left($.galleryUtility.leftImageStorage.image, $.galleryUtility.leftImage.image); 179 var riLeft = $.galleryUtility.rightImage.left($.galleryUtility.leftImage.image); 180 var risLeft = $.galleryUtility.rightImageStorage.left($.galleryUtility.centerImage.image); 181 if ($.galleryUtility.leftImageStorage.image.attr('layout') === 'landscape') { 182 $.galleryUtility.leftImageStorage.image.animate({ 183 'top': $.galleryUtility.leftImage.Ltop, 184 'left': liLeft, 185 'height': $.galleryUtility.leftImage.Lheight, 186 'width': $.galleryUtility.leftImage.Lwidth, 187 'opacity': 'show' 188 }, 189 $.galleryUtility.Options.slideSpeed, 'linear', function() { 190 191 $(this).one('click', $.galleryUtility.slideRight); 192 }); 193 } else { 194 195 $.galleryUtility.leftImageStorage.image.animate({
196 'top': $.galleryUtility.leftImage.Ptop, 197 'left': liLeft, 198 'height': $.galleryUtility.leftImage.Pheight, 199 'width': $.galleryUtility.leftImage.Pwidth, 200 'opacity': 'show' 201 }, 202 $.galleryUtility.Options.slideSpeed, 'linear', function() { 203 //$('.boletim_arrow_left').click($.galleryUtility.slideRight); 204 $(this).one('click', $.galleryUtility.slideRight); 205 }); 206 } 207 if ($.galleryUtility.leftImage.image.attr('layout') === 'landscape') { 208 $.galleryUtility.leftImage.image.unbind().animate({ 209 'top': $.galleryUtility.centerImage.Ltop, 210 'left': $.galleryUtility.centerImage.Lleft, 211 'height': $.galleryUtility.centerImage.Lheight, 212 'width': $.galleryUtility.centerImage.Lwidth 213 }, 214 $.galleryUtility.Options.slideSpeed, 'linear', function() { 215 $(this).one('click', $.galleryUtility.zoomIn); 216 }); 217 } else { 218 219 $.galleryUtility.leftImage.image.unbind().animate({ 220 'top': $.galleryUtility.centerImage.Ptop, 221 'left': $.galleryUtility.centerImage.Pleft, 222 'height': $.galleryUtility.centerImage.Pheight, 223 'width': $.galleryUtility.centerImage.Pwidth 224 }, 225 $.galleryUtility.Options.slideSpeed, 'linear', function() { 226 $(this).one('click', $.galleryUtility.zoomIn); 227 }); 228 } 229 if ($.galleryUtility.centerImage.image.attr('layout') === 'landscape') { 230 $.galleryUtility.centerImage.image.unbind().animate({ 231 'top': $.galleryUtility.rightImage.Ltop, 232 'left': riLeft, 233 'height': $.galleryUtility.rightImage.Lheight, 234 'width': $.galleryUtility.rightImage.Lwidth 235 }, 236 $.galleryUtility.Options.slideSpeed, 'linear', function() { 237 $(this).one('click', $.galleryUtility.slideLeft); 238 }); 239 } else { 240 241 $.galleryUtility.centerImage.image.unbind().animate({ 242 'top': $.galleryUtility.rightImage.Ptop, 243 'left': riLeft, 244 'height': $.galleryUtility.rightImage.Pheight, 245 'width': $.galleryUtility.rightImage.Pwidth 246 }, 247 $.galleryUtility.Options.slideSpeed, 'linear', function() { 248 $(this).one('click', $.galleryUtility.slideLeft); 249 }); 250 } 251 if ($.galleryUtility.rightImage.image.attr('layout') === 'landscape') { 252 $.galleryUtility.rightImage.image.unbind().animate({ 253 'top': $.galleryUtility.rightImageStorage.Ltop, 254 'left': risLeft, 255 'height': $.galleryUtility.rightImageStorage.Lheight, 256 'width': $.galleryUtility.rightImageStorage.Lwidth, 257 'opacity': 'hide' 258 }, 259 $.galleryUtility.Options.slideSpeed, 'linear'); 260 } else { 261 262 $.galleryUtility.rightImage.image.unbind().animate({ 263 'top': $.galleryUtility.rightImageStorage.Ptop, 264 'left': risLeft, 265 'height': $.galleryUtility.rightImageStorage.Pheight, 266 'width': $.galleryUtility.rightImageStorage.Pwidth, 267 'opacity': 'hide' 268 }, 269 $.galleryUtility.Options.slideSpeed, 'linear'); 270 } 271 $.galleryUtility.rightImageStorage.image = $.galleryUtility.rightImage.image; 272 $.galleryUtility.rightImage.image = $.galleryUtility.centerImage.image; 273 $.galleryUtility.centerImage.image = $.galleryUtility.leftImage.image; 274 $.galleryUtility.leftImage.image = $.galleryUtility.leftImageStorage.image; 275 $.galleryUtility.setLeftStorage($.galleryUtility.gallery.filter('[index=' + $.galleryUtility.leftImageStorage.image.attr('prev') + ']')); 276 277 }; 278 279 $.galleryUtility.slideLeft = function() { 280 var riLeft = $.galleryUtility.rightImage.left($.galleryUtility.rightImage.image); 281 var liLeft = $.galleryUtility.leftImage.left($.galleryUtility.centerImage.image, $.galleryUtility.rightImage.image); 282 var lisLeft = $.galleryUtility.leftImageStorage.left($.galleryUtility.leftImage.image, $.galleryUtility.centerImage.image, $.galleryUtility.rightImage.image); 283 if ($.galleryUtility.rightImageStorage.image.attr('layout') === 'landscape') { 284 $.galleryUtility.rightImageStorage.image.animate({ 285 'top': $.galleryUtility.rightImage.Ltop, 286 'left': riLeft, 287 'height': $.galleryUtility.rightImage.Lheight, 288 'width': $.galleryUtility.rightImage.Lwidth, 289 'opacity': 'show' 290 }, 291 $.galleryUtility.Options.slideSpeed, 'linear', function() { 292 $(this).one('click', $.galleryUtility.slideLeft); 293 }); 294 } else { 295 $.galleryUtility.rightImageStorage.image.animate({
296 'top': $.galleryUtility.rightImage.Ptop, 297 'left': riLeft, 298 'height': $.galleryUtility.rightImage.Pheight, 299 'width': $.galleryUtility.rightImage.Pwidth, 300 'opacity': 'show' 301 }, 302 $.galleryUtility.Options.slideSpeed, 'linear', function() { 303 $(this).one('click', $.galleryUtility.slideLeft); 304 }); 305 } 306 if ($.galleryUtility.rightImage.image.attr('layout') === 'landscape') { 307 $.galleryUtility.rightImage.image.unbind().animate({ 308 'top': $.galleryUtility.centerImage.Ltop, 309 'left': $.galleryUtility.centerImage.Lleft, 310 'height': $.galleryUtility.centerImage.Lheight, 311 'width': $.galleryUtility.centerImage.Lwidth 312 }, 313 $.galleryUtility.Options.slideSpeed, 'linear', function() { 314 $(this).one('click', $.galleryUtility.zoomIn); 315 }); 316 } else { 317 $.galleryUtility.rightImage.image.unbind().animate({ 318 'top': $.galleryUtility.centerImage.Ptop, 319 'left': $.galleryUtility.centerImage.Pleft, 320 'height': $.galleryUtility.centerImage.Pheight, 321 'width': $.galleryUtility.centerImage.Pwidth 322 }, 323 $.galleryUtility.Options.slideSpeed, 'linear', function() { 324 $(this).one('click', $.galleryUtility.zoomIn); 325 }); 326 } 327 if ($.galleryUtility.centerImage.image.attr('layout') === 'landscape') { 328 $.galleryUtility.centerImage.image.unbind().animate({ 329 'top': $.galleryUtility.leftImage.Ltop, 330 'left': liLeft, 331 'height': $.galleryUtility.leftImage.Lheight, 332 'width': $.galleryUtility.leftImage.Lwidth 333 }, 334 $.galleryUtility.Options.slideSpeed, 'linear', function() { 335 $(this).one('click', $.galleryUtility.slideRight); 336 }); 337 } else { 338 $.galleryUtility.centerImage.image.unbind().animate({ 339 'top': $.galleryUtility.leftImage.Ptop, 340 'left': liLeft, 341 'height': $.galleryUtility.leftImage.Pheight, 342 'width': $.galleryUtility.leftImage.Pwidth 343 }, 344 $.galleryUtility.Options.slideSpeed, 'linear', function() { 345 $(this).one('click', $.galleryUtility.slideRight); 346 }); 347 } 348 if ($.galleryUtility.leftImage.image.attr('layout') === 'landscape') { 349 $.galleryUtility.leftImage.image.unbind().animate({ 350 'top': $.galleryUtility.leftImageStorage.Ltop, 351 'left': lisLeft, 352 'height': $.galleryUtility.leftImageStorage.Lheight, 353 'width': $.galleryUtility.leftImageStorage.Lwidth, 'opacity': 'hide' 354 }, 355 $.galleryUtility.Options.slideSpeed, 'linear'); 356 } else { 357 $.galleryUtility.leftImage.image.unbind().animate({ 358 'top': $.galleryUtility.leftImageStorage.Ptop, 359 'left': lisLeft, 360 'height': $.galleryUtility.leftImageStorage.Pheight, 361 'width': $.galleryUtility.leftImageStorage.Pwidth, 362 'opacity': 'hide' 363 }, 364 $.galleryUtility.Options.slideSpeed, 'linear'); 365 } 366 $.galleryUtility.leftImageStorage.image = $.galleryUtility.leftImage.image; 367 $.galleryUtility.leftImage.image = $.galleryUtility.centerImage.image; 368 $.galleryUtility.centerImage.image = $.galleryUtility.rightImage.image; 369 $.galleryUtility.rightImage.image = $.galleryUtility.rightImageStorage.image; 370 $.galleryUtility.setRightStorage($.galleryUtility.gallery.filter('[index=' + $.galleryUtility.rightImageStorage.image.attr('next') + ']')); 371 }; 372 373 374 375 $.galleryUtility.arrowRight = function() { 376 var liLeft = $.galleryUtility.leftImage.left($.galleryUtility.leftImageStorage.image, $.galleryUtility.leftImage.image); 377 var riLeft = $.galleryUtility.rightImage.left($.galleryUtility.leftImage.image); 378 var risLeft = $.galleryUtility.rightImageStorage.left($.galleryUtility.centerImage.image); 379 if ($.galleryUtility.leftImageStorage.image.attr('layout') === 'landscape') { 380 $.galleryUtility.leftImageStorage.image.animate({ 381 'top': $.galleryUtility.leftImage.Ltop, 382 'left': liLeft, 383 'height': $.galleryUtility.leftImage.Lheight, 384 'width': $.galleryUtility.leftImage.Lwidth, 385 'opacity': 'show' 386 }, 387 $.galleryUtility.Options.slideSpeed, 'linear', function() { 388 $(this).one('click', $.galleryUtility.slideRight); 389 }); 390 } else { 391 392 $.galleryUtility.leftImageStorage.image.animate({
393 'top': $.galleryUtility.leftImage.Ptop, 394 'left': liLeft, 395 'height': $.galleryUtility.leftImage.Pheight, 396 'width': $.galleryUtility.leftImage.Pwidth, 397 'opacity': 'show' 398 }, 399 $.galleryUtility.Options.slideSpeed, 'linear', function() { 400 //$('.boletim_arrow_left').click($.galleryUtility.slideRight); 401 $(this).one('click', $.galleryUtility.slideRight); 402 }); 403 } 404 if ($.galleryUtility.leftImage.image.attr('layout') === 'landscape') { 405 $.galleryUtility.leftImage.image.unbind().animate({ 406 'top': $.galleryUtility.centerImage.Ltop, 407 'left': $.galleryUtility.centerImage.Lleft, 408 'height': $.galleryUtility.centerImage.Lheight, 409 'width': $.galleryUtility.centerImage.Lwidth 410 }, 411 $.galleryUtility.Options.slideSpeed, 'linear', function() { 412 $(this).one('click', $.galleryUtility.zoomIn); 413 }); 414 } else { 415 416 $.galleryUtility.leftImage.image.unbind().animate({ 417 'top': $.galleryUtility.centerImage.Ptop, 418 'left': $.galleryUtility.centerImage.Pleft, 419 'height': $.galleryUtility.centerImage.Pheight, 420 'width': $.galleryUtility.centerImage.Pwidth 421 }, 422 $.galleryUtility.Options.slideSpeed, 'linear', function() { 423 $(this).one('click', $.galleryUtility.zoomIn); 424 }); 425 } 426 if ($.galleryUtility.centerImage.image.attr('layout') === 'landscape') { 427 $.galleryUtility.centerImage.image.unbind().animate({ 428 'top': $.galleryUtility.rightImage.Ltop, 429 'left': riLeft, 430 'height': $.galleryUtility.rightImage.Lheight, 431 'width': $.galleryUtility.rightImage.Lwidth 432 }, 433 $.galleryUtility.Options.slideSpeed, 'linear', function() { 434 $(this).one('click', $.galleryUtility.slideLeft); 435 }); 436 } else { 437 438 $.galleryUtility.centerImage.image.unbind().animate({ 439 'top': $.galleryUtility.rightImage.Ptop, 440 'left': riLeft, 441 'height': $.galleryUtility.rightImage.Pheight, 442 'width': $.galleryUtility.rightImage.Pwidth 443 }, 444 $.galleryUtility.Options.slideSpeed, 'linear', function() { 445 $(this).one('click', $.galleryUtility.slideLeft); 446 }); 447 } 448 if ($.galleryUtility.rightImage.image.attr('layout') === 'landscape') { 449 $.galleryUtility.rightImage.image.unbind().animate({ 450 'top': $.galleryUtility.rightImageStorage.Ltop, 451 'left': risLeft, 452 'height': $.galleryUtility.rightImageStorage.Lheight, 453 'width': $.galleryUtility.rightImageStorage.Lwidth, 454 'opacity': 'hide' 455 }, 456 $.galleryUtility.Options.slideSpeed, 'linear'); 457 } else { 458 459 $.galleryUtility.rightImage.image.unbind().animate({ 460 'top': $.galleryUtility.rightImageStorage.Ptop, 461 'left': risLeft, 462 'height': $.galleryUtility.rightImageStorage.Pheight, 463 'width': $.galleryUtility.rightImageStorage.Pwidth, 464 'opacity': 'hide' 465 }, 466 $.galleryUtility.Options.slideSpeed, 'linear'); 467 } 468 $.galleryUtility.rightImageStorage.image = $.galleryUtility.rightImage.image; 469 $.galleryUtility.rightImage.image = $.galleryUtility.centerImage.image; 470 $.galleryUtility.centerImage.image = $.galleryUtility.leftImage.image; 471 $.galleryUtility.leftImage.image = $.galleryUtility.leftImageStorage.image; 472 $.galleryUtility.setLeftStorage($.galleryUtility.gallery.filter('[index=' + $.galleryUtility.leftImageStorage.image.attr('prev') + ']')); 473 474 return false; 475 }; 476 477 478 479 480 $.galleryUtility.arrowLeft = function() { 481 var riLeft = $.galleryUtility.rightImage.left($.galleryUtility.rightImage.image); 482 var liLeft = $.galleryUtility.leftImage.left($.galleryUtility.centerImage.image, $.galleryUtility.rightImage.image); 483 var lisLeft = $.galleryUtility.leftImageStorage.left($.galleryUtility.leftImage.image, $.galleryUtility.centerImage.image, $.galleryUtility.rightImage.image); 484 if ($.galleryUtility.rightImageStorage.image.attr('layout') === 'landscape') { 485 $.galleryUtility.rightImageStorage.image.animate({ 486 'top': $.galleryUtility.rightImage.Ltop, 487 'left': riLeft, 488 'height': $.galleryUtility.rightImage.Lheight, 489 'width': $.galleryUtility.rightImage.Lwidth, 490 'opacity': 'show' 491 }, 492 $.galleryUtility.Options.slideSpeed, 'linear', function() { 493 $(this).one('click', $.galleryUtility.slideLeft); 494 }); 495 } else { 496 $.galleryUtility.rightImageStorage.image.animate({
497 'top': $.galleryUtility.rightImage.Ptop, 498 'left': riLeft, 499 'height': $.galleryUtility.rightImage.Pheight, 500 'width': $.galleryUtility.rightImage.Pwidth, 501 'opacity': 'show' 502 }, 503 $.galleryUtility.Options.slideSpeed, 'linear', function() { 504 $(this).one('click', $.galleryUtility.slideLeft); 505 }); 506 } 507 if ($.galleryUtility.rightImage.image.attr('layout') === 'landscape') { 508 $.galleryUtility.rightImage.image.unbind().animate({ 509 'top': $.galleryUtility.centerImage.Ltop, 510 'left': $.galleryUtility.centerImage.Lleft, 511 'height': $.galleryUtility.centerImage.Lheight, 512 'width': $.galleryUtility.centerImage.Lwidth 513 }, 514 $.galleryUtility.Options.slideSpeed, 'linear', function() { 515 $(this).one('click', $.galleryUtility.zoomIn); 516 }); 517 } else { 518 $.galleryUtility.rightImage.image.unbind().animate({ 519 'top': $.galleryUtility.centerImage.Ptop, 520 'left': $.galleryUtility.centerImage.Pleft, 521 'height': $.galleryUtility.centerImage.Pheight, 522 'width': $.galleryUtility.centerImage.Pwidth 523 }, 524 $.galleryUtility.Options.slideSpeed, 'linear', function() { 525 $(this).one('click', $.galleryUtility.zoomIn); 526 }); 527 } 528 if ($.galleryUtility.centerImage.image.attr('layout') === 'landscape') { 529 $.galleryUtility.centerImage.image.unbind().animate({ 530 'top': $.galleryUtility.leftImage.Ltop, 531 'left': liLeft, 532 'height': $.galleryUtility.leftImage.Lheight, 533 'width': $.galleryUtility.leftImage.Lwidth 534 }, 535 $.galleryUtility.Options.slideSpeed, 'linear', function() { 536 $(this).one('click', $.galleryUtility.slideRight); 537 }); 538 } else { 539 $.galleryUtility.centerImage.image.unbind().animate({ 540 'top': $.galleryUtility.leftImage.Ptop, 541 'left': liLeft, 542 'height': $.galleryUtility.leftImage.Pheight, 543 'width': $.galleryUtility.leftImage.Pwidth 544 }, 545 $.galleryUtility.Options.slideSpeed, 'linear', function() { 546 $(this).one('click', $.galleryUtility.slideRight); 547 }); 548 } 549 if ($.galleryUtility.leftImage.image.attr('layout') === 'landscape') { 550 $.galleryUtility.leftImage.image.unbind().animate({ 551 'top': $.galleryUtility.leftImageStorage.Ltop, 552 'left': lisLeft, 553 'height': $.galleryUtility.leftImageStorage.Lheight, 554 'width': $.galleryUtility.leftImageStorage.Lwidth, 'opacity': 'hide' 555 }, 556 $.galleryUtility.Options.slideSpeed, 'linear'); 557 } else { 558 $.galleryUtility.leftImage.image.unbind().animate({ 559 'top': $.galleryUtility.leftImageStorage.Ptop, 560 'left': lisLeft, 561 'height': $.galleryUtility.leftImageStorage.Pheight, 562 'width': $.galleryUtility.leftImageStorage.Pwidth, 563 'opacity': 'hide' 564 }, 565 $.galleryUtility.Options.slideSpeed, 'linear'); 566 } 567 $.galleryUtility.leftImageStorage.image = $.galleryUtility.leftImage.image; 568 $.galleryUtility.leftImage.image = $.galleryUtility.centerImage.image; 569 $.galleryUtility.centerImage.image = $.galleryUtility.rightImage.image; 570 $.galleryUtility.rightImage.image = $.galleryUtility.rightImageStorage.image; 571 $.galleryUtility.setRightStorage($.galleryUtility.gallery.filter('[index=' + $.galleryUtility.rightImageStorage.image.attr('next') + ']')); 572 573 return false; 574 }; 575 576 $.galleryUtility.zoomIn = function() { 577 // se está em outro slide que não o start e é clicado 578 $thislink = $(this).next('a.link').attr('href'); 579 window.open($thislink); 580 return false; 581 }; 582 583 $.galleryUtility.LcaptionDown = function() { 584 $.galleryUtility.centerImage.image.unbind(); 585 $.galleryUtility.Options.container.append('<span id="' + $.galleryUtility.Options.captionID + '" style="' + $.galleryUtility.Options.captionStyle + '" class="' + $.galleryUtility.Options.captionClass + '">' + $.galleryUtility.centerImage.image.attr($.galleryUtility.Options.captionTextAttribute) + '</span>'); 586 $('#' + $.galleryUtility.Options.captionID).css({ 587 'top': $.galleryUtility.zoomImage.Ltop + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10), 588 'left': $.galleryUtility.zoomImage.Lleft + parseInt($.galleryUtility.centerImage.image.css('borderLeftWidth'), 10), 589 'width': $.galleryUtility.zoomImage.Lwidth, 590 'height': 0, 591 'position': 'absolute', 592 'z-index': '100' 593 }).animate({ 'height': Math.round($.galleryUtility.Options.captionHeight($.galleryUtility.zoomImage.Lheight)) }, 'normal', 'linear'); 594 $('#' + $.galleryUtility.Options.captionDownID).animate({ 595 'height': 0, 596 'top': $.galleryUtility.zoomImage.Ltop + (Math.round($.galleryUtility.Options.captionHeight($.galleryUtility.zoomImage.Lheight))) + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10) 597 }, 'normal', 'linear', function() { $('#' + $.galleryUtility.Options.captionDownID).hide(); }); 598 $('#' + $.galleryUtility.Options.captionUpID).css({ 599 'top': $.galleryUtility.zoomImage.Ltop + $.galleryUtility.Options.captionDownHeight + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10), 600 'left': $.galleryUtility.zoomImage.Lleft + ($.galleryUtility.zoomImage.Lwidth - $.galleryUtility.Options.captionUpWidth) + parseInt($.galleryUtility.centerImage.image.css('borderLeftWidth'), 10), 601 'height': 0, 602 'position': 'absolute', 603 'z-index': '100' 604 }).show().animate({ 605 'top': $.galleryUtility.zoomImage.Ltop + (Math.round($.galleryUtility.Options.captionHeight($.galleryUtility.zoomImage.Lheight))) + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10), 606 'height': $.galleryUtility.Options.captionUpHeight 607 }, 'normal', 'linear', function() { 608 $('#' + $.galleryUtility.Options.captionUpID).one('click', function() { 609 $.galleryUtility.LcaptionUp(false); 610 }); 611 $.galleryUtility.centerImage.image.one('click', function() { 612 $.galleryUtility.LcaptionUp(true); 613 }); 614 }); 615 }; 616 617 $.galleryUtility.PcaptionDown = function() { 618 $.galleryUtility.centerImage.image.unbind(); 619 $.galleryUtility.Options.container.append('<span id="' + $.galleryUtility.Options.captionID + '" style="' + $.galleryUtility.Options.captionStyle + '" class="' + $.galleryUtility.Options.captionClass + '">' + $.galleryUtility.centerImage.image.attr($.galleryUtility.Options.captionTextAttribute) + '</span>'); 620 $('#' + $.galleryUtility.Options.captionID).css({
621 'top': $.galleryUtility.zoomImage.Ptop + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10), 622 'left': $.galleryUtility.zoomImage.Pleft + parseInt($.galleryUtility.centerImage.image.css('borderLeftWidth'), 10), 623 'width': $.galleryUtility.zoomImage.Pwidth, 624 'height': 0, 625 'position': 'absolute', 626 'z-index': '100' 627 }).animate({ 'height': Math.round($.galleryUtility.Options.captionHeight($.galleryUtility.zoomImage.Pheight)) }, 'normal', 'linear'); 628 $('#' + $.galleryUtility.Options.captionDownID).animate({ 629 'height': 0, 630 'top': $.galleryUtility.zoomImage.Ptop + (Math.round($.galleryUtility.Options.captionHeight($.galleryUtility.zoomImage.Pheight))) + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10) 631 }, 'normal', 'linear', function() { $('#' + $.galleryUtility.Options.captionDownID).hide(); }); 632 $('#' + $.galleryUtility.Options.captionUpID).css({ 633 'top': $.galleryUtility.zoomImage.Pto
633p + $.galleryUtility.Options.captionDownHeight + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10), 634 'left': $.galleryUtility.zoomImage.Pleft + ($.galleryUtility.zoomImage.Pwidth - $.galleryUtility.Options.captionUpWidth) + parseInt($.galleryUtility.centerImage.image.css('borderLeftWidth'), 10), 635 'height': 0, 636 'position': 'absolute', 637 'z-index': '100' 638 }).show().animate({ 639 'top': $.galleryUtility.zoomImage.Ptop + (Math.round($.galleryUtility.Options.captionHeight($.galleryUtility.zoomImage.Pheight))) + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10), 640 'height': $.galleryUtility.Options.captionUpHeight 641 }, 'normal', 'linear', function() { 642 $('#' + $.galleryUtility.Options.captionUpID).one('click', function() { 643 $.galleryUtility.PcaptionUp(false); 644 }); 645 $.galleryUtility.centerImage.image.one('click', function() { 646 $.galleryUtility.PcaptionUp(true); 647 }); 648 }); 649 }; 650 651 $.galleryUtility.LcaptionUp = function(unzoom) { 652 $('#' + $.galleryUtility.Options.captionID).animate({ 'height': 0 }, 'normal', 'linear', function() { $('#' + $.galleryUtility.Options.captionID).remove(); }); 653 $('#' + $.galleryUtility.Options.captionUpID).animate({ 654 'top': $.galleryUtility.zoomImage.Ltop + $.galleryUtility.Options.captionDownHeight + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10), 655 'height': 0 656 }, 'normal', 'linear', function() { 657 $('#' + $.galleryUtility.Options.captionUpID).hide(); 658 }); 659 $('#' + $.galleryUtility.Options.captionDownID).show().animate({ 660 'height': $.galleryUtility.Options.captionDownHeight, 661 'top': $.galleryUtility.zoomImage.Ltop + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10) 662 }, 'normal', 'linear', function() { 663 if (unzoom) { 664 $('#' + $.galleryUtility.Options.captionUpID).unbind(); 665 $.galleryUtility.zoomOut(); 666 } else { 667 $('#' + $.galleryUtility.Options.captionDownID).one('click', $.galleryUtility.LcaptionDown); 668 $.galleryUtility.centerImage.image.one('click', $.galleryUtility.zoomOut); 669 } 670 }); 671 }; 672 673 $.galleryUtility.PcaptionUp = function(unzoom) { 674 $('#' + $.galleryUtility.Options.captionID).animate({ 'height': 0 }, 'normal', 'linear', function() { $('#' + $.galleryUtility.Options.captionID).remove(); }); 675 $('#' + $.galleryUtility.Options.captionUpID).animate({
676 'top': $.galleryUtility.zoomImage.Ptop + $.galleryUtility.Options.captionDownHeight + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10), 677 'height': 0 678 }, 'normal', 'linear', function() { 679 $('#' + $.galleryUtility.Options.captionUpID).hide(); 680 }); 681 $('#' + $.galleryUtility.Options.captionDownID).show().animate({ 682 'height': $.galleryUtility.Options.captionDownHeight, 683 'top': $.galleryUtility.zoomImage.Ptop + parseInt($.galleryUtility.centerImage.image.css('borderTopWidth'), 10) 684 }, 'normal', 'linear', function() { 685 if (unzoom) { 686 $('#' + $.galleryUtility.Options.captionUpID).unbind(); 687 $.galleryUtility.zoomOut(); 688 } else { 689 $('#' + $.galleryUtility.Options.captionDownID).one('click', $.galleryUtility.PcaptionDown); 690 $.galleryUtility.centerImage.image.one('click', $.galleryUtility.zoomOut); 691 } 692 }); 693 }; 694 695 $.galleryUtility.zoomOut = function() { 696 // se está no slide start e é clicado 697 /* $thislink = $(this).next('a.link').attr('href'); 698 alert('asdasd') 699 window.open($thislink); */ 700 return false; 701 }; 702 703 $.galleryUtility.zoomOutBody = function() { 704 if ($.galleryUtility.centerImage.image.attr('layout') === 'landscape') { 705 $.galleryUtility.centerImage.image.animate({ 706 'top': $.galleryUtility.centerImage.Ltop, 707 'left': $.galleryUtility.centerImage.Lleft, 708 'height': $.galleryUtility.centerImage.Lheight, 709 'width': $.galleryUtility.centerImage.Lwidth 710 }, 711 $.galleryUtility.Options.zoomSpeed, 'linear', function() { 712 $(this).css('z-index', '0').one('click', $.galleryUtility.zoomIn); 713 $.galleryUtility.leftImage.image.one('click', $.galleryUtility.slideRight); 714 $.galleryUtility.rightImage.image.one('click', $.galleryUtility.slideLeft); 715 }); 716 } else { 717 $.galleryUtility.centerImage.image.animate({ 718 'top': $.galleryUtility.centerImage.Ptop, 719 'left': $.galleryUtility.centerImage.Pleft, 720 'height': $.galleryUtility.centerImage.Pheight, 721 'width': $.galleryUtility.centerImage.Pwidth 722 }, 723 $.galleryUtility.Options.zoomSpeed, 'linear', function() { 724 $(this).css('z-index', '0').one('click', $.galleryUtility.zoomIn); 725 $.galleryUtility.leftImage.image.one('click', $.galleryUtility.slideRight); 726 $.galleryUtility.rightImage.image.one('click', $.galleryUtility.slideLeft); 727 }); 728 729 } 730 }; 731 732 $.galleryUtility.setRightStorage = function(image) { 733 $.galleryUtility.rightImageStorage.image = image; 734 if ($.galleryUtility.rightImageStorage.image.attr('layout') === 'landscape') { 735 $.galleryUtility.rightImageStorage.image.hide().css({ 736 'top': $.galleryUtility.rightImageStorage.Ltop, 737 'height': $.galleryUtility.rightImageStorage.Lheight, 738 'width': $.galleryUtility.rightImageStorage.Lwidth 739 }); 740 } else { 741 $.galleryUtility.rightImageStorage.image.hide().css({ 742 'top': $.galleryUtility.rightImageStorage.Ptop, 743 'height': $.galleryUtility.rightImageStorage.Pheight, 744 'width': $.galleryUtility.rightImageStorage.Pwidth 745 }); 746 } 747 $.galleryUtility.rightImageStorage.image.css('left', $.galleryUtility.rightImageStorage.left($.galleryUtility.rightImage.image)); 748 }; 749 750 $.galleryUtility.setLeftStorage = function(image) { 751 $.galleryUtility.leftImageStorage.image = image; 752 if ($.galleryUtility.leftImageStorage.image.attr('layout') === 'landscape') { 753 $.galleryUtility.leftImageStorage.image.hide().css({ 754 'top': $.galleryUtility.leftImageStorage.Ltop, 755 'height': $.galleryUtility.leftImageStorage.Lheight, 756 'width': $.galleryUtility.leftImageStorage.Lwidth 757 }); 758 } else { 759 $.galleryUtility.leftImageStorage.image.hide().css({ 760 'top': $.galleryUtility.leftImageStorage.Ptop, 761 'height': $.galleryUtility.leftImageStorage.Pheight, 762 'width': $.galleryUtility.leftImageStorage.Pwidth 763 }); 764 } 765 $.galleryUtility.leftImageStorage.image 766 .css('left', $.galleryUtility.leftImageStorage.left($.galleryUtility.leftImageStorage.image, $.galleryUtility.leftImage.image, $.galleryUtility.centerImage.image)); 767 }; 768 769 $.galleryUtility.setCenter = function(image) { 770 $.galleryUtility.centerImage.image = image; 771 if ($.galleryUtility.centerImage.image.attr('layout') === 'landscape') { 772 $.galleryUtility.centerImage.image.css({ 773 'top': $.galleryUtility.centerImage.Ltop, 774 'left': $.galleryUtility.centerImage.Lleft, 775 'height': $.galleryUtility.centerImage.Lheight, 776 'width': $.galleryUtility.centerImage.Lwidth 777 }); 778 } else { 779 $.galleryUtility.centerImage.image.css({
780 'top': $.galleryUtility.centerImage.Ptop, 781 'left': $.galleryUtility.centerImage.Pleft, 782 'height': $.galleryUtility.centerImage.Pheight, 783 'width': $.galleryUtility.centerImage.Pwidth 784 }); 785 } 786 }; 787 788 $.galleryUtility.setRight = function(image) { 789 $.galleryUtility.rightImage.image = image; 790 if ($.galleryUtility.rightImage.image.attr('layout') === 'landscape') { 791 $.galleryUtility.rightImage.image.css({ 792 'top': $.galleryUtility.rightImage.Ltop, 793 'height': $.galleryUtility.rightImage.Lheight, 794 'width': $.galleryUtility.rightImage.Lwidth 795 }); 796 } else { 797 $.galleryUtility.rightImage.image.css({ 798 'top': $.galleryUtility.rightImage.Ptop, 799 'height': $.galleryUtility.rightImage.Pheight, 800 'width': $.galleryUtility.rightImage.Pwidth 801 }); 802 } 803 $.galleryUtility.rightImage.image.css('left', $.galleryUtility.rightImage.left($.galleryUtility.centerImage.image)); 804 }; 805 806 $.galleryUtility.setLeft = function(image) { 807 $.galleryUtility.leftImage.image = image; 808 if ($.galleryUtility.leftImage.image.attr('layout') === 'landscape') { 809 $.galleryUtility.leftImage.image.css({ 810 'top': $.galleryUtility.leftImage.Ltop, 811 'height': $.galleryUtility.leftImage.Lheight, 812 'width': $.galleryUtility.leftImage.Lwidth 813 }); 814 } else { 815 $.galleryUtility.leftImage.image.css({ 816 'top': $.galleryUtility.leftImage.Ptop, 817 'height': $.galleryUtility.leftImage.Pheight, 818 'width': $.galleryUtility.leftImage.Pwidth 819 }); 820 } 821 $.galleryUtility.leftImage.image.css('left', $.galleryUtility.leftImage.left($.galleryUtility.leftImage.image, $.galleryUtility.centerImage.image)); 822 }; 823 824 $.galleryUtility.definePositions = function() { 825 //var Gheight = ($.galleryUtility.Options.Gheight || $(window).height()); 826 //var Gwidth = ($.galleryUtility.Options.Gwidth || $(window).width()); 827 var container = $.galleryUtility.Options.container; 828 if (container[0].tagName == 'BODY') { 829 container = $(window); 830 } 831 var Gheight = container.height(); 832 var Gwidth = container.width(); 833 834 $.galleryUtility.centerImage.Lheight = Math.round($.galleryUtility.Options.Lheight); 835 $.galleryUtility.centerImage.Lwidth = Math.round($.galleryUtility.Options.Lwidth); 836 $.galleryUtility.centerImage.Ltop = Math.round(Gheight / 2) - ($.galleryUtility.centerImage.Lheight / 2); 837 $.galleryUtility.centerImage.Lleft = Math.round(Gwidth / 2) - ($.galleryUtility.centerImage.Lwidth / 2); 838 $.galleryUtility.centerImage.Pheight = Math.round($.galleryUtility.Options.Pheight); 839 $.galleryUtility.centerImage.Pwidth = Math.round($.galleryUtility.Options.Pwidth); 840 $.galleryUtility.centerImage.Ptop = Math.round((Gheight / 2) - ($.galleryUtility.centerImage.Pheight / 2)); 841 $.galleryUtility.centerImage.Pleft = Math.round((Gwidth / 2) - ($.galleryUtility.centerImage.Pwidth / 2)); 842 $.galleryUtility.zoomImage.Lheight = Math.round($.galleryUtility.Options.Lzoom($.galleryUtility.centerImage.Lheight)); 843 $.galleryUtility.zoomImage.Lwidth = Math.round($.galleryUtility.Options.Lzoom($.galleryUtility.centerImage.Lwidth)); 844 $.galleryUtility.zoomImage.Ltop = Math.round((Gheight / 2) - ($.galleryUtility.zoomImage.Lheight / 2)); 845 $.galleryUtility.zoomImage.Lleft = Math.round((Gwidth / 2) - ($.galleryUtility.zoomImage.Lwidth / 2)); 846 $.galleryUtility.zoomImage.Pheight = Math.round($.galleryUtility.Options.Pzoom($.galleryUtility.centerImage.Pheight)); 847 $.galleryUtility.zoomImage.Pwidth = Math.round($.galleryUtility.Options.Pzoom($.galleryUtility.centerImage.Pwidth));
848 $.galleryUtility.zoomImage.Ptop = Math.round((Gheight / 2) - ($.galleryUtility.zoomImage.Pheight / 2)); 849 $.galleryUtility.zoomImage.Pleft = Math.round((Gwidth / 2) - ($.galleryUtility.zoomImage.Pwidth / 2)); 850 $.galleryUtility.leftImage.Lheight = Math.round($.galleryUtility.Options.Lshrink($.galleryUtility.centerImage.Lheight)); 851 $.galleryUtility.leftImage.Lwidth = Math.round($.galleryUtility.Options.Lshrink($.galleryUtility.centerImage.Lwidth)); 852 $.galleryUtility.leftImage.Ltop = Math.round($.galleryUtility.centerImage.Ltop + (($.galleryUtility.centerImage.Lheight - $.galleryUtility.leftImage.Lheight) / 2)); 853 $.galleryUtility.leftImage.left = function(left, center) { 854 if (center.attr('layout') === 'landscape') { 855 if (left.attr('layout') === 'landscape') { 856 return Math.round($.galleryUtility.centerImage.Lleft - ($.galleryUtility.leftImage.Lwidth + $.galleryUtility.Options.gutterWidth)); 857 } else { 858 return Math.round($.galleryUtility.centerImage.Lleft - ($.galleryUtility.leftImage.Pwidth + $.galleryUtility.Options.gutterWidth)); 859 } 860 } else { 861 if (left.attr('layout') === 'landscape') { 862 return Math.round($.galleryUtility.centerImage.Pleft - ($.galleryUtility.leftImage.Lwidth + $.galleryUtility.Options.gutterWidth)); 863 } else { 864 return Math.round($.galleryUtility.centerImage.Pleft - ($.galleryUtility.leftImage.Pwidth + $.galleryUtility.Options.gutterWidth)); 865 } 866 } 867 }; 868 $.galleryUtility.leftImage.Pheight = Math.round($.galleryUtility.Options.Pshrink($.galleryUtility.centerImage.Pheight)); 869 $.galleryUtility.leftImage.Pwidth = Math.round($.galleryUtility.Options.Pshrink($.galleryUtility.centerImage.Pwidth)); 870 $.galleryUtility.leftImage.Ptop = Math.round($.galleryUtility.centerImage.Ptop + (($.galleryUtility.centerImage.Pheight - $.galleryUtility.leftImage.Pheight) / 2)); 871 $.galleryUtility.rightImage.Lheight = Math.round($.galleryUtility.Options.Lshrink($.galleryUtility.centerImage.Lheight)); 872 $.galleryUtility.rightImage.Lwidth = Math.round($.galleryUtility.Options.Lshrink($.galleryUtility.centerImage.Lwidth)); 873 $.galleryUtility.rightImage.Ltop = Math.round($.galleryUtility.centerImage.Ltop + (($.galleryUtility.centerImage.Lheight - $.galleryUtility.rightImage.Lheight) / 2)); 874 $.galleryUtility.rightImage.left = function(center) { 875 if (center.attr('layout') === 'landscape') { 876 return Math.round($.galleryUtility.centerImage.Lleft + ($.galleryUtility.centerImage.Lwidth + $.galleryUtility.Options.gutterWidth)); 877 } else { 878 return Math.round($.galleryUtility.centerImage.Pleft + ($.galleryUtility.centerImage.Pwidth + $.galleryUtility.Options.gutterWidth)); 879 } 880 }; 881 $.galleryUtility.rightImage.Pheight = Math.round($.galleryUtility.Options.Pshrink($.galleryUtility.centerImage.Pheight)); 882 $.galleryUtility.rightImage.Pwidth = Math.round($.galleryUtility.Options.Pshrink($.galleryUtility.centerImage.Pwidth)); 883 $.galleryUtility.rightImage.Ptop = Math.round($.galleryUtility.centerImage.Ptop + (($.galleryUtility.centerImage.Pheight - $.galleryUtility.leftImage.Pheight) / 2)); 884 $.galleryUtility.leftImageStorage.Lheight = Math.round($.galleryUtility.Options.Lshrink($.galleryUtility.leftImage.Lheight)); 885 $.galleryUtility.leftImageStorage.Lwidth = Math.round($.galleryUtility.Options.Lshrink($.galleryUtility.leftImage.Lwidth)); 886 $.galleryUtility.leftImageStorage.Ltop = Math.round($.galleryUtility.leftImage.Ltop + (($.galleryUtility.leftImage.Lheight - $.galleryUtility.leftImageStorage.Lheight) / 2)); 887 $.galleryUtility.leftImageStorage.left = function(leftStorage, left, center) { 888 if (leftStorage.attr('layout') === 'landscape') { 889 return Math.round($.galleryUtility.leftImage.left(left, center) - ($.galleryUtility.leftImageStorage.Lwidth + $.galleryUtility.Options.gutterWidth)); 890 } else { 891 return Math.round($.galleryUtility.leftImage.left(left, center) - ($.galleryUtility.leftImageStorage.Pwidth + $.galleryUtility.Options.gutterWidth)); 892 } 893 }; 894 $.galleryUtility.leftImageStorage.Pheight = Math.round($.galleryUtility.Options.Pshrink($.galleryUtility.leftImage.Pheight)); 895 $.galleryUtility.leftImageStorage.Pwidth = Math.round($.galleryUtility.Options.Pshrink($.galleryUtility.leftImage.Pwidth)); 896 $.galleryUtility.leftImageStorage.Ptop = Math.round($.galleryUtility.leftImage.Pto
896p + (($.galleryUtility.leftImage.Pheight - $.galleryUtility.leftImageStorage.Pheight) / 2)); 897 $.galleryUtility.rightImageStorage.Lheight = Math.round($.galleryUtility.Options.Lshrink($.galleryUtility.rightImage.Lheight)); 898 $.galleryUtility.rightImageStorage.Lwidth = Math.round($.galleryUtility.Options.Lshrink($.galleryUtility.rightImage.Lwidth)); 899 $.galleryUtility.rightImageStorage.Ltop = Math.round($.galleryUtility.rightImage.Ltop + (($.galleryUtility.rightImage.Lheight - $.galleryUtility.rightImageStorage.Lheight) / 2)); 900 $.galleryUtility.rightImageStorage.left = function(right) { 901 if (right.attr('layout') === 'landscape') { 902 return Math.round($.galleryUtility.rightImage.left(right) + ($.galleryUtility.rightImage.Lwidth + $.galleryUtility.Options.gutterWidth)); 903 } else { 904 return Math.round($.galleryUtility.rightImage.left(right) + ($.galleryUtility.rightImage.Pwidth + $.galleryUtility.Options.gutterWidth)); 905 } 906 }; 907 $.galleryUtility.rightImageStorage.Pheight = Math.round($.galleryUtility.Options.Pshrink($.galleryUtility.rightImage.Pheight)); 908 $.galleryUtility.rightImageStorage.Pwidth = Math.round($.galleryUtility.Options.Pshrink($.galleryUtility.rightImage.Pwidth)); 909 $.galleryUtility.rightImageStorage.Ptop = Math.round($.galleryUtility.rightImage.Ptop + (($.galleryUtility.rightImage.Pheight - $.galleryUtility.rightImageStorage.Pheight) / 2)); 910 }; 911})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.