WordPress.org

Plugin Directory

Changeset 574379


Ignore:
Timestamp:
07/19/12 03:12:24 (21 months ago)
Author:
betzster
Message:

Squashed commit of the following:

commit 0936e9ba70e605608e060f9b117bd903e9c8e3d0
Author: Josh Betz <j@…>
Date: Wed Jul 18 22:06:12 2012 -0500

1.0 Rewrite

  • Rewrite helper to use wp_http_request and cache results
  • Update prettyPhoto
  • Mass Rewrite
Location:
fancyflickr/trunk
Files:
25 added
6 deleted
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • fancyflickr/trunk/images/prettyPhoto/dark_rounded/btnNext.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_rounded/btnPrevious.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_rounded/contentPattern.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_rounded/loader.gif

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_rounded/sprite.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_square/btnNext.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_square/btnPrevious.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_square/contentPattern.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_square/loader.gif

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/dark_square/sprite.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/facebook/loader.gif

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/light_rounded/btnNext.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/light_rounded/btnPrevious.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/light_rounded/loader.gif

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/light_rounded/sprite.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/light_square/btnNext.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/light_square/btnPrevious.png

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/light_square/loader.gif

    • Property svn:executable set to *
  • fancyflickr/trunk/images/prettyPhoto/light_square/sprite.png

    • Property svn:executable set to *
  • fancyflickr/trunk/jquery.prettyPhoto.js

    r176038 r574379  
    33    Use: Lightbox clone for jQuery 
    44    Author: Stephane Caron (http://www.no-margin-for-errors.com) 
    5     Version: 2.5.4 
     5    Version: 3.1.4 
    66------------------------------------------------------------------------- */ 
    77 
    8 (function($) { 
    9     $.prettyPhoto = {version: '2.5.4'}; 
    10      
    11     $.fn.prettyPhoto = function(settings) { 
    12         settings = jQuery.extend({ 
    13             animationSpeed: 'normal', /* fast/slow/normal */ 
    14             padding: 40, /* padding for each side of the picture */ 
    15             opacity: 0.80, /* Value between 0 and 1 */ 
    16             showTitle: true, /* true/false */ 
    17             allowresize: true, /* true/false */ 
    18             counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ 
    19             theme: 'dark_rounded', /* light_rounded / dark_rounded / light_square / dark_square */ 
    20             hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ 
    21             modal: false, /* If set to true, only the close button will close the window */ 
    22             changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ 
    23             callback: function(){} /* Called when prettyPhoto is closed */ 
    24         }, settings); 
    25          
    26         // Fallback to a supported theme for IE6 
    27         if($.browser.msie && $.browser.version == 6){ 
    28             settings.theme = "light_square"; 
    29         } 
    30          
    31         if($('.pp_overlay').size() == 0) { 
    32             _buildOverlay(); // If the overlay is not there, inject it! 
    33         }else{ 
    34             // Set my global selectors 
    35             $pp_pic_holder = $('.pp_pic_holder'); 
    36             $ppt = $('.ppt'); 
    37         } 
    38          
    39         // Global variables accessible only by prettyPhoto 
    40         var doresize = true, percentBased = false, correctSizes, 
    41          
    42         // Cached selectors 
    43         $pp_pic_holder, $ppt, 
    44          
    45         // prettyPhoto container specific 
    46         pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth, pp_type = 'image', 
    47      
    48         //Gallery specific 
    49         setPosition = 0, 
    50  
    51         // Global elements 
    52         $scrollPos = _getScroll(); 
    53      
    54         // Window/Keyboard events 
    55         $(window).scroll(function(){ $scrollPos = _getScroll(); _centerOverlay(); _resizeOverlay(); }); 
    56         $(window).resize(function(){ _centerOverlay(); _resizeOverlay(); }); 
    57         $(document).keydown(function(e){ 
    58             if($pp_pic_holder.is(':visible')) 
    59             switch(e.keyCode){ 
    60                 case 37: 
    61                     $.prettyPhoto.changePage('previous'); 
    62                     break; 
    63                 case 39: 
    64                     $.prettyPhoto.changePage('next'); 
    65                     break; 
    66                 case 27: 
    67                     if(!settings.modal) 
    68                     $.prettyPhoto.close(); 
    69                     break; 
    70             }; 
    71         }); 
    72      
    73         // Bind the code to each links 
    74         $(this).each(function(){ 
    75             $(this).bind('click',function(){ 
    76                  
    77                 link = this; // Fix scoping 
    78                  
    79                 // Find out if the picture is part of a set 
    80                 theRel = $(this).attr('rel'); 
    81                 galleryRegExp = /\[(?:.*)\]/; 
    82                 theGallery = galleryRegExp.exec(theRel); 
    83                  
    84                 // Build the gallery array 
    85                 var images = new Array(), titles = new Array(), descriptions = new Array(); 
    86                 if(theGallery){ 
    87                     $('a[rel*='+theGallery+']').each(function(i){ 
    88                         if($(this)[0] === $(link)[0]) setPosition = i; // Get the position in the set 
    89                         images.push($(this).attr('href')); 
    90                         titles.push($(this).find('img').attr('alt')); 
    91                         descriptions.push($(this).attr('title')); 
    92                     }); 
    93                 }else{ 
    94                     images = $(this).attr('href'); 
    95                     titles = ($(this).find('img').attr('alt')) ?  $(this).find('img').attr('alt') : ''; 
    96                     descriptions = ($(this).attr('title')) ?  $(this).attr('title') : ''; 
    97                 } 
    98  
    99                 $.prettyPhoto.open(images,titles,descriptions); 
    100                 return false; 
    101             }); 
    102         }); 
    103      
    104          
    105         /** 
    106         * Opens the prettyPhoto modal box. 
    107         * @param image {String,Array} Full path to the image to be open, can also be an array containing full images paths. 
    108         * @param title {String,Array} The title to be displayed with the picture, can also be an array containing all the titles. 
    109         * @param description {String,Array} The description to be displayed with the picture, can also be an array containing all the descriptions. 
    110         */ 
    111         $.prettyPhoto.open = function(gallery_images,gallery_titles,gallery_descriptions) { 
    112             // To fix the bug with IE select boxes 
    113             if($.browser.msie && $.browser.version == 6){ 
    114                 $('select').css('visibility','hidden'); 
    115             }; 
    116              
    117             // Hide the flash 
    118             if(settings.hideflash) $('object,embed').css('visibility','hidden'); 
    119              
    120             // Convert everything to an array in the case it's a single item 
    121             images = $.makeArray(gallery_images); 
    122             titles = $.makeArray(gallery_titles); 
    123             descriptions = $.makeArray(gallery_descriptions); 
    124              
    125             if($('.pp_overlay').size() == 0) { 
    126                 _buildOverlay(); // If the overlay is not there, inject it! 
    127             }else{ 
    128                 // Set my global selectors 
    129                 $pp_pic_holder = $('.pp_pic_holder'); 
    130                 $ppt = $('.ppt'); 
    131             } 
    132              
    133             $pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); // Set the proper theme 
    134  
    135             isSet = ($(images).size() > 0) ?  true : false; // Find out if it's a set 
    136  
    137             _getFileType(images[setPosition]); // Set the proper file type 
    138  
    139             _centerOverlay(); // Center it 
    140  
    141             // Hide the next/previous links if on first or last images. 
    142             _checkPosition($(images).size()); 
    143          
    144             $('.pp_loaderIcon').show(); // Do I need to explain? 
    145          
    146             // Fade the content in 
    147             $('div.pp_overlay').show().fadeTo(settings.animationSpeed,settings.opacity, function(){ 
    148                 $pp_pic_holder.fadeIn(settings.animationSpeed,function(){ 
    149                     // Display the current position 
    150                     $pp_pic_holder.find('p.currentTextHolder').text((setPosition+1) + settings.counter_separator_label + $(images).size()); 
    151  
    152                     // Set the description 
    153                     if(descriptions[setPosition]){ 
    154                         $pp_pic_holder.find('.pp_description').show().html(unescape(descriptions[setPosition])); 
    155                     }else{ 
    156                         $pp_pic_holder.find('.pp_description').hide().text(''); 
    157                     }; 
    158  
    159                     // Set the title 
    160                     if(titles[setPosition] && settings.showTitle){ 
    161                         hasTitle = true; 
    162                         $ppt.html(unescape(titles[setPosition])); 
    163                     }else{ 
    164                         hasTitle = false; 
    165                     }; 
    166                      
    167                     // Inject the proper content 
    168                     if(pp_type == 'image'){ 
    169                         // Set the new image 
    170                         imgPreloader = new Image(); 
    171  
    172                         // Preload the neighbour images 
    173                         nextImage = new Image(); 
    174                         if(isSet && setPosition > $(images).size()) nextImage.src = images[setPosition + 1]; 
    175                         prevImage = new Image(); 
    176                         if(isSet && images[setPosition - 1]) prevImage.src = images[setPosition - 1]; 
    177  
    178                         pp_typeMarkup = '<img id="fullResImage" src="" />';              
    179                         $pp_pic_holder.find('#pp_full_res')[0].innerHTML = pp_typeMarkup; 
    180  
    181                         $pp_pic_holder.find('.pp_content').css('overflow','hidden'); 
    182                         $pp_pic_holder.find('#fullResImage').attr('src',images[setPosition]); 
    183  
    184                         imgPreloader.onload = function(){ 
    185                             // Fit item to viewport 
    186                             correctSizes = _fitToViewport(imgPreloader.width,imgPreloader.height); 
    187                              
    188                             _showContent(); 
    189                         }; 
    190  
    191                         imgPreloader.src = images[setPosition]; 
    192                     }else{ 
    193                         // Get the dimensions 
    194                         movie_width = ( parseFloat(grab_param('width',images[setPosition])) ) ? grab_param('width',images[setPosition]) : "425"; 
    195                         movie_height = ( parseFloat(grab_param('height',images[setPosition])) ) ? grab_param('height',images[setPosition]) : "344"; 
    196  
    197                         // If the size is % based, calculate according to window dimensions 
    198                         if(movie_width.indexOf('%') != -1 || movie_height.indexOf('%') != -1){ 
    199                             movie_height = ($(window).height() * parseFloat(movie_height) / 100) - 100; 
    200                             movie_width = ($(window).width() * parseFloat(movie_width) / 100) - 100; 
    201                             percentBased = true; 
    202                         } 
    203  
    204                         movie_height = parseFloat(movie_height); 
    205                         movie_width = parseFloat(movie_width); 
    206  
    207                         if(pp_type == 'quicktime') movie_height+=15; // Add space for the control bar 
    208  
    209                         // Fit item to viewport 
    210                         correctSizes = _fitToViewport(movie_width,movie_height); 
    211  
    212                         if(pp_type == 'youtube'){ 
    213                             pp_typeMarkup = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+correctSizes['width']+'" height="'+correctSizes['height']+'"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.youtube.com/v/'+grab_param('v',images[setPosition])+'" /><embed src="http://www.youtube.com/v/'+grab_param('v',images[setPosition])+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+correctSizes['width']+'" height="'+correctSizes['height']+'"></embed></object>'; 
    214                         }else if(pp_type == 'quicktime'){ 
    215                             pp_typeMarkup = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="'+correctSizes['height']+'" width="'+correctSizes['width']+'"><param name="src" value="'+images[setPosition]+'"><param name="autoplay" value="true"><param name="type" value="video/quicktime"><embed src="'+images[setPosition]+'" height="'+correctSizes['height']+'" width="'+correctSizes['width']+'" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>'; 
    216                         }else if(pp_type == 'flash'){ 
    217                             flash_vars = images[setPosition]; 
    218                             flash_vars = flash_vars.substring(images[setPosition].indexOf('flashvars') + 10,images[setPosition].length); 
    219  
    220                             filename = images[setPosition]; 
    221                             filename = filename.substring(0,filename.indexOf('?')); 
    222  
    223                             pp_typeMarkup = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+correctSizes['width']+'" height="'+correctSizes['height']+'"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="'+filename+'?'+flash_vars+'" /><embed src="'+filename+'?'+flash_vars+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+correctSizes['width']+'" height="'+correctSizes['height']+'"></embed></object>'; 
    224                         }else if(pp_type == 'iframe'){ 
    225                             movie_url = images[setPosition]; 
    226                             movie_url = movie_url.substr(0,movie_url.indexOf('iframe')-1); 
    227  
    228                             pp_typeMarkup = '<iframe src ="'+movie_url+'" width="'+(correctSizes['width']-10)+'" height="'+(correctSizes['height']-10)+'" frameborder="no"></iframe>'; 
    229                         } 
    230  
    231                         // Show content 
    232                         _showContent(); 
    233                     } 
    234                 }); 
    235             }); 
    236         }; 
    237          
    238         /** 
    239         * Change page in the prettyPhoto modal box 
    240         * @param direction {String} Direction of the paging, previous or next. 
    241         */ 
    242         $.prettyPhoto.changePage = function(direction){ 
    243             if(direction == 'previous') { 
    244                 setPosition--; 
    245                 if (setPosition < 0){ 
    246                     setPosition = 0; 
    247                     return; 
    248                 } 
    249             }else{ 
    250                 if($('.pp_arrow_next').is('.disabled')) return; 
    251                 setPosition++; 
    252             }; 
    253  
    254             // Allow the resizing of the images 
    255             if(!doresize) doresize = true; 
    256  
    257             _hideContent(); 
    258             $('a.pp_expand,a.pp_contract').fadeOut(settings.animationSpeed,function(){ 
    259                 $(this).removeClass('pp_contract').addClass('pp_expand'); 
    260                 $.prettyPhoto.open(images,titles,descriptions); 
    261             }); 
    262         }; 
    263          
    264         /** 
    265         * Closes the prettyPhoto modal box. 
    266         */ 
    267         $.prettyPhoto.close = function(){ 
    268             $pp_pic_holder.find('object,embed').css('visibility','hidden'); 
    269              
    270             $('div.pp_pic_holder,div.ppt').fadeOut(settings.animationSpeed); 
    271              
    272             $('div.pp_overlay').fadeOut(settings.animationSpeed, function(){ 
    273                 $('div.pp_overlay,div.pp_pic_holder,div.ppt').remove(); 
    274              
    275                 // To fix the bug with IE select boxes 
    276                 if($.browser.msie && $.browser.version == 6){ 
    277                     $('select').css('visibility','visible'); 
    278                 }; 
    279                  
    280                 // Show the flash 
    281                 if(settings.hideflash) $('object,embed').css('visibility','visible'); 
    282                  
    283                 setPosition = 0; 
    284                  
    285                 settings.callback(); 
    286             }); 
    287              
    288             doresize = true; 
    289         }; 
    290      
    291         /** 
    292         * Set the proper sizes on the containers and animate the content in. 
    293         */ 
    294         _showContent = function(){ 
    295             $('.pp_loaderIcon').hide(); 
    296  
    297             if($.browser.opera) { 
    298                 windowHeight = window.innerHeight; 
    299                 windowWidth = window.innerWidth; 
    300             }else{ 
    301                 windowHeight = $(window).height(); 
    302                 windowWidth = $(window).width(); 
    303             }; 
    304  
    305             // Calculate the opened top position of the pic holder 
    306             projectedTop = $scrollPos['scrollTop'] + ((windowHeight/2) - (correctSizes['containerHeight']/2)); 
    307             if(projectedTop < 0) projectedTop = 0 + $pp_pic_holder.find('.ppt').height(); 
    308  
    309             // Resize the content holder 
    310             $pp_pic_holder.find('.pp_content').animate({'height':correctSizes['contentHeight']},settings.animationSpeed); 
    311              
    312             // Resize picture the holder 
    313             $pp_pic_holder.animate({ 
    314                 'top': projectedTop, 
    315                 'left': ((windowWidth/2) - (correctSizes['containerWidth']/2)), 
    316                 'width': correctSizes['containerWidth'] 
    317             },settings.animationSpeed,function(){ 
    318                 $pp_pic_holder.width(correctSizes['containerWidth']); 
    319                 $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(correctSizes['height']).width(correctSizes['width']); 
    320  
    321                 // Fade the new image 
    322                 $pp_pic_holder.find('#pp_full_res').fadeIn(settings.animationSpeed); 
    323  
    324                 // Show the nav 
    325                 if(isSet && pp_type=="image") { $pp_pic_holder.find('.pp_hoverContainer').fadeIn(settings.animationSpeed); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); } 
    326                 $pp_pic_holder.find('.pp_details').fadeIn(settings.animationSpeed); 
    327  
    328                 // Show the title 
    329                 if(settings.showTitle && hasTitle){ 
    330                     $ppt.css({ 
    331                         'top' : $pp_pic_holder.offset().top - 20, 
    332                         'left' : $pp_pic_holder.offset().left + (settings.padding/2), 
    333                         'display' : 'none' 
    334                     }); 
    335  
    336                     $ppt.fadeIn(settings.animationSpeed); 
    337                 }; 
    338              
    339                 // Fade the resizing link if the image is resized 
    340                 if(correctSizes['resized']) $('a.pp_expand,a.pp_contract').fadeIn(settings.animationSpeed); 
    341                  
    342                 // Once everything is done, inject the content if it's now a photo 
    343                 if(pp_type != 'image') $pp_pic_holder.find('#pp_full_res')[0].innerHTML = pp_typeMarkup; 
    344                  
    345                 // Callback! 
    346                 settings.changepicturecallback(); 
    347             }); 
    348         }; 
    349          
    350         /** 
    351         * Hide the content...DUH! 
    352         */ 
    353         function _hideContent(){ 
    354             // Fade out the current picture 
    355             $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden'); 
    356             $pp_pic_holder.find('.pp_hoverContainer,.pp_details').fadeOut(settings.animationSpeed); 
    357             $pp_pic_holder.find('#pp_full_res').fadeOut(settings.animationSpeed,function(){ 
    358                 $('.pp_loaderIcon').show(); 
    359             }); 
    360              
    361             // Hide the title 
    362             $ppt.fadeOut(settings.animationSpeed); 
    363         } 
    364      
    365         /** 
    366         * Check the item position in the gallery array, hide or show the navigation links 
    367         * @param setCount {integer} The total number of items in the set 
    368         */ 
    369         function _checkPosition(setCount){ 
    370             // If at the end, hide the next link 
    371             if(setPosition == setCount-1) { 
    372                 $pp_pic_holder.find('a.pp_next').css('visibility','hidden'); 
    373                 $pp_pic_holder.find('a.pp_arrow_next').addClass('disabled').unbind('click'); 
    374             }else{  
    375                 $pp_pic_holder.find('a.pp_next').css('visibility','visible'); 
    376                 $pp_pic_holder.find('a.pp_arrow_next.disabled').removeClass('disabled').bind('click',function(){ 
    377                     $.prettyPhoto.changePage('next'); 
    378                     return false; 
    379                 }); 
    380             }; 
    381          
    382             // If at the beginning, hide the previous link 
    383             if(setPosition == 0) { 
    384                 $pp_pic_holder.find('a.pp_previous').css('visibility','hidden'); 
    385                 $pp_pic_holder.find('a.pp_arrow_previous').addClass('disabled').unbind('click'); 
    386             }else{ 
    387                 $pp_pic_holder.find('a.pp_previous').css('visibility','visible'); 
    388                 $pp_pic_holder.find('a.pp_arrow_previous.disabled').removeClass('disabled').bind('click',function(){ 
    389                     $.prettyPhoto.changePage('previous'); 
    390                     return false; 
    391                 }); 
    392             }; 
    393              
    394             // Hide the bottom nav if it's not a set. 
    395             if(setCount > 1) { 
    396                 $('.pp_nav').show(); 
    397             }else{ 
    398                 $('.pp_nav').hide(); 
    399             } 
    400         }; 
    401      
    402         /** 
    403         * Resize the item dimensions if it's bigger than the viewport 
    404         * @param width {integer} Width of the item to be opened 
    405         * @param height {integer} Height of the item to be opened 
    406         * @return An array containin the "fitted" dimensions 
    407         */ 
    408         function _fitToViewport(width,height){ 
    409             hasBeenResized = false; 
    410          
    411             _getDimensions(width,height); 
    412              
    413             // Define them in case there's no resize needed 
    414             imageWidth = width; 
    415             imageHeight = height; 
    416  
    417             windowHeight = $(window).height(); 
    418             windowWidth = $(window).width(); 
    419          
    420             if( ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allowresize && !percentBased) { 
    421                 hasBeenResized = true; 
    422                 notFitting = true; 
    423              
    424                 while (notFitting){ 
    425                     if((pp_containerWidth > windowWidth)){ 
    426                         imageWidth = (windowWidth - 200); 
    427                         imageHeight = (height/width) * imageWidth; 
    428                     }else if((pp_containerHeight > windowHeight)){ 
    429                         imageHeight = (windowHeight - 200); 
    430                         imageWidth = (width/height) * imageHeight; 
    431                     }else{ 
    432                         notFitting = false; 
    433                     }; 
    434  
    435                     pp_containerHeight = imageHeight; 
    436                     pp_containerWidth = imageWidth; 
    437                 }; 
    438              
    439                 _getDimensions(imageWidth,imageHeight); 
    440             }; 
    441  
    442             return { 
    443                 width:imageWidth, 
    444                 height:imageHeight, 
    445                 containerHeight:pp_containerHeight, 
    446                 containerWidth:pp_containerWidth, 
    447                 contentHeight:pp_contentHeight, 
    448                 contentWidth:pp_contentWidth, 
    449                 resized:hasBeenResized 
    450             }; 
    451         }; 
    452          
    453         /** 
    454         * Get the containers dimensions according to the item size 
    455         * @param width {integer} Width of the item to be opened 
    456         * @param height {integer} Height of the item to be opened 
    457         */ 
    458         function _getDimensions(width,height){ 
    459             $pp_pic_holder.find('.pp_details').width(width).find('.pp_description').width(width - parseFloat($pp_pic_holder.find('a.pp_close').css('width'))); /* To have the correct height */ 
    460              
    461             // Get the container size, to resize the holder to the right dimensions 
    462             pp_contentHeight = height + $pp_pic_holder.find('.pp_details').height() + parseFloat($pp_pic_holder.find('.pp_details').css('marginTop')) + parseFloat($pp_pic_holder.find('.pp_details').css('marginBottom')); 
    463             pp_contentWidth = width; 
    464             pp_containerHeight = pp_contentHeight + $pp_pic_holder.find('.ppt').height() + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height(); 
    465             pp_containerWidth = width + settings.padding; 
    466         } 
    467      
    468         function _getFileType(itemSrc){ 
    469             if (itemSrc.match(/youtube\.com\/watch/i)) { 
    470                 pp_type = 'youtube'; 
    471             }else if(itemSrc.indexOf('.mov') != -1){  
    472                 pp_type = 'quicktime'; 
    473             }else if(itemSrc.indexOf('.swf') != -1){ 
    474                 pp_type = 'flash'; 
    475             }else if(itemSrc.indexOf('iframe') != -1){ 
    476                 pp_type = 'iframe' 
    477             }else{ 
    478                 pp_type = 'image'; 
    479             }; 
    480         }; 
    481      
    482         function _centerOverlay(){ 
    483             if($.browser.opera) { 
    484                 windowHeight = window.innerHeight; 
    485                 windowWidth = window.innerWidth; 
    486             }else{ 
    487                 windowHeight = $(window).height(); 
    488                 windowWidth = $(window).width(); 
    489             }; 
    490  
    491             if(doresize) { 
    492                 $pHeight = $pp_pic_holder.height(); 
    493                 $pWidth = $pp_pic_holder.width(); 
    494                 $tHeight = $ppt.height(); 
    495                  
    496                 projectedTop = (windowHeight/2) + $scrollPos['scrollTop'] - ($pHeight/2); 
    497                 if(projectedTop < 0) projectedTop = 0 + $tHeight; 
    498                  
    499                 $pp_pic_holder.css({ 
    500                     'top': projectedTop, 
    501                     'left': (windowWidth/2) + $scrollPos['scrollLeft'] - ($pWidth/2) 
    502                 }); 
    503          
    504                 $ppt.css({ 
    505                     'top' : projectedTop - $tHeight, 
    506                     'left' : (windowWidth/2) + $scrollPos['scrollLeft'] - ($pWidth/2) + (settings.padding/2) 
    507                 }); 
    508             }; 
    509         }; 
    510      
    511         function _getScroll(){ 
    512             if (self.pageYOffset) { 
    513                 scrollTop = self.pageYOffset; 
    514                 scrollLeft = self.pageXOffset; 
    515             } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict 
    516                 scrollTop = document.documentElement.scrollTop; 
    517                 scrollLeft = document.documentElement.scrollLeft; 
    518             } else if (document.body) {// all other Explorers 
    519                 scrollTop = document.body.scrollTop; 
    520                 scrollLeft = document.body.scrollLeft;   
    521             } 
    522              
    523             return {scrollTop:scrollTop,scrollLeft:scrollLeft}; 
    524         }; 
    525      
    526         function _resizeOverlay() { 
    527             $('div.pp_overlay').css({ 
    528                 'height':$(document).height(), 
    529                 'width':$(window).width() 
    530             }); 
    531         }; 
    532      
    533         function _buildOverlay(){ 
    534             toInject = ""; 
    535              
    536             // Build the background overlay div 
    537             toInject += "<div class='pp_overlay'></div>"; 
    538              
    539             // Basic HTML for the picture holder 
    540             toInject += '<div class="pp_pic_holder"><div class="pp_top"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div><div class="pp_content"><a href="#" class="pp_expand" title="Expand the image">Expand</a><div class="pp_loaderIcon"></div><div class="pp_hoverContainer"><a class="pp_next" href="#">next</a><a class="pp_previous" href="#">previous</a></div><div id="pp_full_res"></div><div class="pp_details clearfix"><a class="pp_close" href="#">Close</a><p class="pp_description"></p><div class="pp_nav"><a href="#" class="pp_arrow_previous">Previous</a><p class="currentTextHolder">0'+settings.counter_separator_label+'0</p><a href="#" class="pp_arrow_next">Next</a></div></div></div><div class="pp_bottom"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div></div>'; 
    541              
    542             // Basic html for the title holder 
    543             toInject += '<div class="ppt"></div>'; 
    544              
    545             $('body').append(toInject); 
    546              
    547             // So it fades nicely 
    548             $('div.pp_overlay').css('opacity',0); 
    549              
    550             // Set my global selectors 
    551             $pp_pic_holder = $('.pp_pic_holder'); 
    552             $ppt = $('.ppt'); 
    553              
    554             $('div.pp_overlay').css('height',$(document).height()).hide().bind('click',function(){ 
    555                 if(!settings.modal) 
    556                 $.prettyPhoto.close(); 
    557             }); 
    558  
    559             $('a.pp_close').bind('click',function(){ $.prettyPhoto.close(); return false; }); 
    560  
    561             $('a.pp_expand').bind('click',function(){ 
    562                 $this = $(this); // Fix scoping 
    563                  
    564                 // Expand the image 
    565                 if($this.hasClass('pp_expand')){ 
    566                     $this.removeClass('pp_expand').addClass('pp_contract'); 
    567                     doresize = false; 
    568                 }else{ 
    569                     $this.removeClass('pp_contract').addClass('pp_expand'); 
    570                     doresize = true; 
    571                 }; 
    572              
    573                 _hideContent(); 
    574                  
    575                 $pp_pic_holder.find('.pp_hoverContainer, .pp_details').fadeOut(settings.animationSpeed); 
    576                 $pp_pic_holder.find('#pp_full_res').fadeOut(settings.animationSpeed,function(){ 
    577                     $.prettyPhoto.open(images,titles,descriptions); 
    578                 }); 
    579          
    580                 return false; 
    581             }); 
    582          
    583             $pp_pic_holder.find('.pp_previous, .pp_arrow_previous').bind('click',function(){ 
    584                 $.prettyPhoto.changePage('previous'); 
    585                 return false; 
    586             }); 
    587          
    588             $pp_pic_holder.find('.pp_next, .pp_arrow_next').bind('click',function(){ 
    589                 $.prettyPhoto.changePage('next'); 
    590                 return false; 
    591             }); 
    592  
    593             $pp_pic_holder.find('.pp_hoverContainer').css({ 
    594                 'margin-left': settings.padding/2 
    595             }); 
    596         }; 
    597     }; 
    598      
    599     function grab_param(name,url){ 
    600       name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
    601       var regexS = "[\\?&]"+name+"=([^&#]*)"; 
    602       var regex = new RegExp( regexS ); 
    603       var results = regex.exec( url ); 
    604       if( results == null ) 
    605         return ""; 
    606       else 
    607         return results[1]; 
    608     } 
    609 })(jQuery); 
     8(function($){$.prettyPhoto={version:'3.1.4'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({hook:'rel',animation_speed:'fast',ajaxcallback:function(){},slideshow:5000,autoplay_slideshow:false,opacity:0.80,show_title:true,allow_resize:true,allow_expand:true,default_width:500,default_height:344,counter_separator_label:'/',theme:'pp_default',horizontal_padding:20,hideflash:false,wmode:'opaque',autoplay:true,modal:false,deeplinking:true,overlay_gallery:true,overlay_gallery_max:30,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'<div class="pp_pic_holder"> \ 
     9      <div class="ppt">&nbsp;</div> \ 
     10      <div class="pp_top"> \ 
     11       <div class="pp_left"></div> \ 
     12       <div class="pp_middle"></div> \ 
     13       <div class="pp_right"></div> \ 
     14      </div> \ 
     15      <div class="pp_content_container"> \ 
     16       <div class="pp_left"> \ 
     17       <div class="pp_right"> \ 
     18        <div class="pp_content"> \ 
     19         <div class="pp_loaderIcon"></div> \ 
     20         <div class="pp_fade"> \ 
     21          <a href="#" class="pp_expand" title="Expand the image">Expand</a> \ 
     22          <div class="pp_hoverContainer"> \ 
     23           <a class="pp_next" href="#">next</a> \ 
     24           <a class="pp_previous" href="#">previous</a> \ 
     25          </div> \ 
     26          <div id="pp_full_res"></div> \ 
     27          <div class="pp_details"> \ 
     28           <div class="pp_nav"> \ 
     29            <a href="#" class="pp_arrow_previous">Previous</a> \ 
     30            <p class="currentTextHolder">0/0</p> \ 
     31            <a href="#" class="pp_arrow_next">Next</a> \ 
     32           </div> \ 
     33           <p class="pp_description"></p> \ 
     34           <div class="pp_social">{pp_social}</div> \ 
     35           <a class="pp_close" href="#">Close</a> \ 
     36          </div> \ 
     37         </div> \ 
     38        </div> \ 
     39       </div> \ 
     40       </div> \ 
     41      </div> \ 
     42      <div class="pp_bottom"> \ 
     43       <div class="pp_left"></div> \ 
     44       <div class="pp_middle"></div> \ 
     45       <div class="pp_right"></div> \ 
     46      </div> \ 
     47     </div> \ 
     48     <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \ 
     49        <a href="#" class="pp_arrow_previous">Previous</a> \ 
     50        <div> \ 
     51         <ul> \ 
     52          {gallery} \ 
     53         </ul> \ 
     54        </div> \ 
     55        <a href="#" class="pp_arrow_next">Next</a> \ 
     56       </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:'',social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},pp_settings);var matchedObjects=this,percentBased=false,pp_dimensions,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){_center_overlay();_resize_overlay();});if(pp_settings.keyboard_shortcuts){$(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){if(typeof $pp_pic_holder!='undefined'){if($pp_pic_holder.is(':visible')){switch(e.keyCode){case 37:$.prettyPhoto.changePage('previous');e.preventDefault();break;case 39:$.prettyPhoto.changePage('next');e.preventDefault();break;case 27:if(!settings.modal) 
     57$.prettyPhoto.close();e.preventDefault();break;};};};});};$.prettyPhoto.initialize=function(){settings=pp_settings;if(settings.theme=='pp_default')settings.horizontal_padding=16;if(settings.ie6_fallback&&$.browser.msie&&parseInt($.browser.version)==6)settings.theme="light_square";theRel=$(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return $(n).attr('href');}):$.makeArray($(this).attr('href'));pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return($(n).find('img').attr('alt'))?$(n).find('img').attr('alt'):"";}):$.makeArray($(this).find('img').attr('alt'));pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(this).attr('title'));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray($(this).attr('href'),pp_images);rel_index=(isSet)?set_position:$("a["+settings.hook+"^='"+theRel+"']").index($(this));_build_overlay(this);if(settings.allow_resize) 
     58$(window).bind('scroll.prettyphoto',function(){_center_overlay();});$.prettyPhoto.open();return false;} 
     59$.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;if($.browser.msie&&$.browser.version==6)settings.theme="light_square";pp_images=$.makeArray(arguments[0]);pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pp_images.length>1)?true:false;set_position=(arguments[3])?arguments[3]:0;_build_overlay(event.target);} 
     60if($.browser.msie&&$.browser.version==6)$('select').css('visibility','hidden');if(settings.hideflash)$('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden');_checkPosition($(pp_images).size());$('.pp_loaderIcon').show();if(settings.deeplinking) 
     61setHashtag();if(settings.social_tools){facebook_like_link=settings.social_tools.replace('{location_href}',encodeURIComponent(location.href));$pp_pic_holder.find('.pp_social').html(facebook_like_link);} 
     62if($ppt.is(':hidden'))$ppt.css('opacity',0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pp_images).size());if(typeof pp_descriptions[set_position]!='undefined'&&pp_descriptions[set_position]!=""){$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));}else{$pp_pic_holder.find('.pp_description').hide();} 
     63movie_width=(parseFloat(getParam('width',pp_images[set_position])))?getParam('width',pp_images[set_position]):settings.default_width.toString();movie_height=(parseFloat(getParam('height',pp_images[set_position])))?getParam('height',pp_images[set_position]):settings.default_height.toString();percentBased=false;if(movie_height.indexOf('%')!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);percentBased=true;} 
     64if(movie_width.indexOf('%')!=-1){movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;} 
     65$pp_pic_holder.fadeIn(function(){(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html('&nbsp;');imgPreloader="";skipInjection=false;switch(_getFileType(pp_images[set_position])){case'image':imgPreloader=new Image();nextImage=new Image();if(isSet&&set_position<$(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image();if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.onerror=function(){alert('Image cannot be loaded. Make sure the path is correct and image exist.');$.prettyPhoto.close();};imgPreloader.src=pp_images[set_position];break;case'youtube':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=getParam('v',pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split('youtu.be/');movie_id=movie_id[1];if(movie_id.indexOf('?')>0) 
     66movie_id=movie_id.substr(0,movie_id.indexOf('?'));if(movie_id.indexOf('&')>0) 
     67movie_id=movie_id.substr(0,movie_id.indexOf('&'));} 
     68movie='http://www.youtube.com/embed/'+movie_id;(getParam('rel',pp_images[set_position]))?movie+="?rel="+getParam('rel',pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case'vimeo':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http:\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie='http://player.vimeo.com/video/'+match[2]+'?title=0&amp;byline=0&amp;portrait=0';if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=pp_dimensions['width']+'/embed/?moog_width='+pp_dimensions['width'];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);break;case'quicktime':pp_dimensions=_fitToViewport(movie_width,movie_height);pp_dimensions['height']+=15;pp_dimensions['contentHeight']+=15;pp_dimensions['containerHeight']+=15;toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case'flash':pp_dimensions=_fitToViewport(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars')+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf('?'));toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);break;case'iframe':pp_dimensions=_fitToViewport(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);break;case'ajax':doresize=false;pp_dimensions=_fitToViewport(movie_width,movie_height);doresize=true;skipInjection=true;$.get(pp_images[set_position],function(responseHTML){toInject=settings.inline_markup.replace(/{content}/g,responseHTML);$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();});break;case'custom':pp_dimensions=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case'inline':myClone=$(pp_images[set_position]).clone().append('<br clear="all" />').css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show();doresize=false;pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());doresize=true;$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break;};if(!imgPreloader&&!skipInjection){$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();};});return false;};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=='previous'){set_position--;if(set_position<0)set_position=$(pp_images).size()-1;}else if(direction=='next'){set_position++;if(set_position>$(pp_images).size()-1)set_position=0;}else{set_position=direction;};rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');} 
     69_hideContent(function(){$.prettyPhoto.open();});};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=='next'){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0;}else if(direction=='previous'){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage;}else{currentGalleryPage=direction;};slide_speed=(direction=='next'||direction=='previous')?settings.animation_speed:0;slide_to=currentGalleryPage*(itemsPerPage*itemWidth);$pp_gallery.find('ul').animate({left:-slide_to},slide_speed);};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=='undefined'){$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){$.prettyPhoto.stopSlideshow();return false;});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);}else{$.prettyPhoto.changePage('next');};} 
     70$.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});clearInterval(pp_slideshow);pp_slideshow=undefined;} 
     71$.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;$.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');$('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){$(this).remove();});$pp_overlay.fadeOut(settings.animation_speed,function(){if($.browser.msie&&$.browser.version==6)$('select').css('visibility','visible');if(settings.hideflash)$('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible');$(this).remove();$(window).unbind('scroll.prettyphoto');clearHashtag();settings.callback();doresize=true;pp_open=false;delete settings;});};function _showContent(){$('.pp_loaderIcon').hide();projectedTop=scroll_pos['scrollTop']+((windowHeight/2)-(pp_dimensions['containerHeight']/2));if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find('.pp_content').animate({height:pp_dimensions['contentHeight'],width:pp_dimensions['contentWidth']},settings.animation_speed);$pp_pic_holder.animate({'top':projectedTop,'left':((windowWidth/2)-(pp_dimensions['containerWidth']/2)<0)?0:(windowWidth/2)-(pp_dimensions['containerWidth']/2),width:pp_dimensions['containerWidth']},settings.animation_speed,function(){$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);$pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed);if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find('.pp_hoverContainer').show();}else{$pp_pic_holder.find('.pp_hoverContainer').hide();} 
     72if(settings.allow_expand){if(pp_dimensions['resized']){$('a.pp_expand,a.pp_contract').show();}else{$('a.pp_expand').hide();}} 
     73if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();settings.changepicturecallback();pp_open=true;});_insert_gallery();pp_settings.ajaxcallback();};function _hideContent(callback){$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){$('.pp_loaderIcon').show();callback();});};function _checkPosition(setCount){(setCount>1)?$('.pp_nav').show():$('.pp_nav').hide();};function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pp_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else if((pp_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;};pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;};_getDimensions(imageWidth,imageHeight);if((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight)){_fitToViewport(pp_containerWidth,pp_containerHeight)};};return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth)+(settings.horizontal_padding*2),contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized};};function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find('.pp_details');$pp_details.width(width);detailsHeight=parseFloat($pp_details.css('marginTop'))+parseFloat($pp_details.css('marginBottom'));$pp_details=$pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({'position':'absolute','top':-10000});detailsHeight+=$pp_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;if($.browser.msie&&$.browser.version==7)detailsHeight+=8;$pp_details.remove();$pp_title=$pp_pic_holder.find('.ppt');$pp_title.width(width);titleHeight=parseFloat($pp_title.css('marginTop'))+parseFloat($pp_title.css('marginBottom'));$pp_title=$pp_title.clone().appendTo($('body')).css({'position':'absolute','top':-10000});titleHeight+=$pp_title.height();$pp_title.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+titleHeight+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height();pp_containerWidth=width;} 
     74function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)||itemSrc.match(/youtu\.be/i)){return'youtube';}else if(itemSrc.match(/vimeo\.com/i)){return'vimeo';}else if(itemSrc.match(/\b.mov\b/i)){return'quicktime';}else if(itemSrc.match(/\b.swf\b/i)){return'flash';}else if(itemSrc.match(/\biframe=true\b/i)){return'iframe';}else if(itemSrc.match(/\bajax=true\b/i)){return'ajax';}else if(itemSrc.match(/\bcustom=true\b/i)){return'custom';}else if(itemSrc.substr(0,1)=='#'){return'inline';}else{return'image';};};function _center_overlay(){if(doresize&&typeof $pp_pic_holder!='undefined'){scroll_pos=_get_scroll();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos['scrollTop']-(contentHeight/2);if(projectedTop<0)projectedTop=0;if(contentHeight>windowHeight) 
     75return;$pp_pic_holder.css({'top':projectedTop,'left':(windowWidth/2)+scroll_pos['scrollLeft']-(contentwidth/2)});};};function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};};function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height()).width(windowWidth);};function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"&&(settings.ie6_fallback&&!($.browser.msie&&parseInt($.browser.version)==6))){itemWidth=52+5;navWidth=(settings.theme=="facebook"||settings.theme=="pp_default")?50:30;itemsPerPage=Math.floor((pp_dimensions['containerWidth']-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage<pp_images.length)?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();}else{$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();};galleryWidth=itemsPerPage*itemWidth;fullGalleryWidth=pp_images.length*itemWidth;$pp_gallery.css('margin-left',-((galleryWidth/2)+(navWidth/2))).find('div:first').width(galleryWidth+5).find('ul').width(fullGalleryWidth).find('li.selected').removeClass('selected');goToPage=(Math.floor(set_position/itemsPerPage)<totalPage)?Math.floor(set_position/itemsPerPage):totalPage;$.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');}else{$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');}} 
     76function _build_overlay(caller){if(settings.social_tools) 
     77facebook_like_link=settings.social_tools.replace('{location_href}',encodeURIComponent(location.href));settings.markup=settings.markup.replace('{pp_social}','');$('body').append(settings.markup);$pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname='default';img_src='';}else{classname='';img_src=pp_images[i];} 
     78toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_gallery=$('.pp_pic_holder .pp_gallery'),$pp_gallery_li=$pp_gallery.find('li');$pp_gallery.find('.pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_gallery.find('.pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_gallery_li.each(function(i){$(this).find('a').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>') 
     79$pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});} 
     80$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});if(settings.allow_expand){$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});} 
     81$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};if(!pp_alreadyInitialized&&getHashtag()){pp_alreadyInitialized=true;hashIndex=getHashtag();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf('/'));setTimeout(function(){$("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click');},50);} 
     82return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function getHashtag(){url=location.href;hashtag=(url.indexOf('#prettyPhoto')!==-1)?decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)):false;return hashtag;};function setHashtag(){if(typeof theRel=='undefined')return;location.hash=theRel+'/'+rel_index+'/';};function clearHashtag(){if(location.href.indexOf('#prettyPhoto')!==-1)location.hash="prettyPhoto";} 
     83function getParam(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);var pp_alreadyInitialized=false; 
  • fancyflickr/trunk/polaroid.js

    r176038 r574379  
    11jQuery(function($) { 
     2    $("a[rel^='prettyPhoto']").prettyPhoto({social_tools:false}); 
    23 
    34    $("a.polaroid").each(function() { 
  • fancyflickr/trunk/prettyPhoto.css

    r176038 r574379  
    1  div.light_rounded .pp_top .pp_left{background: url(images/prettyPhoto/light_rounded/sprite.png) -88px -53px no-repeat;}div.light_rounded .pp_top .pp_middle{background:#fff;}div.light_rounded .pp_top .pp_right{background: url(images/prettyPhoto/light_rounded/sprite.png) -110px -53px no-repeat;}div.light_rounded .pp_content{background-color:#fff;}div.light_rounded .pp_next:hover{background: url(images/prettyPhoto/light_rounded/btnNext.png) center right no-repeat;cursor: pointer;}div.light_rounded .pp_previous:hover{background: url(images/prettyPhoto/light_rounded/btnPrevious.png) center left no-repeat;cursor: pointer;}div.light_rounded .pp_expand{background: url(images/prettyPhoto/light_rounded/sprite.png) -31px -26px no-repeat;cursor: pointer;}div.light_rounded .pp_expand:hover{background: url(images/prettyPhoto/light_rounded/sprite.png) -31px -47px no-repeat;cursor: pointer;}div.light_rounded .pp_contract{background: url(images/prettyPhoto/light_rounded/sprite.png) 0 -26px no-repeat;cursor: pointer;}div.light_rounded .pp_contract:hover{background: url(images/prettyPhoto/light_rounded/sprite.png) 0 -47px no-repeat;cursor: pointer;}div.light_rounded .pp_close{width:75px;height:22px;background: url(images/prettyPhoto/light_rounded/sprite.png) -1px -1px no-repeat;cursor: pointer;}div.light_rounded .pp_arrow_previous{background: url(images/prettyPhoto/light_rounded/sprite.png) 0 -71px no-repeat;}div.light_rounded .pp_arrow_previous.disabled{background-position:0 -87px;cursor:default;}div.light_rounded .pp_arrow_next{background: url(images/prettyPhoto/light_rounded/sprite.png) -22px -71px no-repeat;}div.light_rounded .pp_arrow_next.disabled{background-position: -22px -87px;cursor:default;}div.light_rounded .pp_bottom .pp_left{background: url(images/prettyPhoto/light_rounded/sprite.png) -88px -80px no-repeat;}div.light_rounded .pp_bottom .pp_middle{background:#fff;}div.light_rounded .pp_bottom .pp_right{background: url(images/prettyPhoto/light_rounded/sprite.png) -110px -80px no-repeat;}div.light_rounded .pp_loaderIcon{background: url(images/prettyPhoto/light_rounded/loader.gif) center center no-repeat;}div.dark_rounded .pp_top .pp_left{background: url(images/prettyPhoto/dark_rounded/sprite.png) -88px -53px no-repeat;}div.dark_rounded .pp_top .pp_middle{background: url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat;}div.dark_rounded .pp_top .pp_right{background: url(images/prettyPhoto/dark_rounded/sprite.png) -110px -53px no-repeat;}div.dark_rounded .pp_content{background: url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat;}div.dark_rounded .pp_next:hover{background: url(images/prettyPhoto/dark_rounded/btnNext.png) center right no-repeat;cursor: pointer;}div.dark_rounded .pp_previous:hover{background: url(images/prettyPhoto/dark_rounded/btnPrevious.png) center left no-repeat;cursor: pointer;}div.dark_rounded .pp_expand{background: url(images/prettyPhoto/dark_rounded/sprite.png) -31px -26px no-repeat;cursor: pointer;}div.dark_rounded .pp_expand:hover{background: url(images/prettyPhoto/dark_rounded/sprite.png) -31px -47px no-repeat;cursor: pointer;}div.dark_rounded .pp_contract{background: url(images/prettyPhoto/dark_rounded/sprite.png) 0 -26px no-repeat;cursor: pointer;}div.dark_rounded .pp_contract:hover{background: url(images/prettyPhoto/dark_rounded/sprite.png) 0 -47px no-repeat;cursor: pointer;}div.dark_rounded .pp_close{width:75px;height:22px;background: url(images/prettyPhoto/dark_rounded/sprite.png) -1px -1px no-repeat;cursor: pointer;}div.dark_rounded .currentTextHolder{color:#c4c4c4;}div.dark_rounded .pp_description{color:#fff;}div.dark_rounded .pp_arrow_previous{background: url(images/prettyPhoto/dark_rounded/sprite.png) 0 -71px no-repeat;}div.dark_rounded .pp_arrow_previous.disabled{background-position:0 -87px;cursor:default;}div.dark_rounded .pp_arrow_next{background: url(images/prettyPhoto/dark_rounded/sprite.png) -22px -71px no-repeat;}div.dark_rounded .pp_arrow_next.disabled{background-position: -22px -87px;cursor:default;}div.dark_rounded .pp_bottom .pp_left{background: url(images/prettyPhoto/dark_rounded/sprite.png) -88px -80px no-repeat;}div.dark_rounded .pp_bottom .pp_middle{background: url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat;}div.dark_rounded .pp_bottom .pp_right{background: url(images/prettyPhoto/dark_rounded/sprite.png) -110px -80px no-repeat;}div.dark_rounded .pp_loaderIcon{background: url(images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat;}div.dark_square .pp_left ,div.dark_square .pp_middle,div.dark_square .pp_right,div.dark_square .pp_content{background: url(images/prettyPhoto/dark_square/contentPattern.png) top left repeat;}div.dark_square .currentTextHolder{color:#c4c4c4;}div.dark_square .pp_description{color:#fff;}div.dark_square .pp_loaderIcon{background: url(images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat;}div.dark_square .pp_expand{background: url(images/prettyPhoto/dark_square/sprite.png) -31px -26px no-repeat;cursor: pointer;}div.dark_square .pp_expand:hover{background: url(images/prettyPhoto/dark_square/sprite.png) -31px -47px no-repeat;cursor: pointer;}div.dark_square .pp_contract{background: url(images/prettyPhoto/dark_square/sprite.png) 0 -26px no-repeat;cursor: pointer;}div.dark_square .pp_contract:hover{background: url(images/prettyPhoto/dark_square/sprite.png) 0 -47px no-repeat;cursor: pointer;}div.dark_square .pp_close{width:75px;height:22px;background: url(images/prettyPhoto/dark_square/sprite.png) -1px -1px no-repeat;cursor: pointer;}div.dark_square .pp_arrow_previous{background: url(images/prettyPhoto/dark_square/sprite.png) 0 -71px no-repeat;}div.dark_square .pp_arrow_previous.disabled{background-position:0 -87px;cursor:default;}div.dark_square .pp_arrow_next{background: url(images/prettyPhoto/dark_square/sprite.png) -22px -71px no-repeat;}div.dark_square .pp_arrow_next.disabled{background-position: -22px -87px;cursor:default;}div.dark_square .pp_next:hover{background: url(images/prettyPhoto/dark_square/btnNext.png) center right no-repeat;cursor: pointer;}div.dark_square .pp_previous:hover{background: url(images/prettyPhoto/dark_square/btnPrevious.png) center left no-repeat;cursor: pointer;}div.light_square .pp_left ,div.light_square .pp_middle,div.light_square .pp_right,div.light_square .pp_content{background:#fff;}div.light_square .pp_expand{background: url(images/prettyPhoto/light_square/sprite.png) -31px -26px no-repeat;cursor: pointer;}div.light_square .pp_expand:hover{background: url(images/prettyPhoto/light_square/sprite.png) -31px -47px no-repeat;cursor: pointer;}div.light_square .pp_contract{background: url(images/prettyPhoto/light_square/sprite.png) 0 -26px no-repeat;cursor: pointer;}div.light_square .pp_contract:hover{background: url(images/prettyPhoto/light_square/sprite.png) 0 -47px no-repeat;cursor: pointer;}div.light_square .pp_close{width:75px;height:22px;background: url(images/prettyPhoto/light_square/sprite.png) -1px -1px no-repeat;cursor: pointer;}div.light_square .pp_arrow_previous{background: url(images/prettyPhoto/light_square/sprite.png) 0 -71px no-repeat;}div.light_square .pp_arrow_previous.disabled{background-position:0 -87px;cursor:default;}div.light_square .pp_arrow_next{background: url(images/prettyPhoto/light_square/sprite.png) -22px -71px no-repeat;}div.light_square .pp_arrow_next.disabled{background-position: -22px -87px;cursor:default;}div.light_square .pp_next:hover{background: url(images/prettyPhoto/light_square/btnNext.png) center right no-repeat;cursor: pointer;}div.light_square .pp_previous:hover{background: url(images/prettyPhoto/light_square/btnPrevious.png) center left no-repeat;cursor: pointer;}div.pp_pic_holder a:focus{outline:none;}div.pp_overlay{background:#000;left:0;position:absolute;top:0;width:100%;z-index:9500;}div.pp_pic_holder{display: none;position:absolute;width:100px;z-index:10000;}.pp_top{height:20px;position: relative;}* html .pp_top{padding:0 20px;}.pp_top .pp_left{height:20px;left:0;position:absolute;width:20px;}.pp_top .pp_middle{height:20px;left:20px;position:absolute;right:20px;}* html .pp_top .pp_middle{left:0;position: static;}.pp_top .pp_right{height:20px;left:auto;position:absolute;right:0;top:0;width:20px;}.pp_content{height:40px;position: relative;text-align: left;width:100%;}.pp_content .pp_details{display: none;margin:10px 15px 2px 20px;}.pp_description{display: none;float: left;margin:0;}.pp_nav{clear: left;float: left;margin:3px 0 0 0;}.pp_nav p{float: left;margin:2px 4px;}.pp_nav a.pp_arrow_previous,.pp_nav a.pp_arrow_next{display:block;float: left;height:15px;margin-top:3px;overflow: hidden;text-indent: -10000px;width:14px;}.pp_hoverContainer{left:0;position:absolute;top:0;width:100%;z-index:2000;}a.pp_next{background: url(images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat;display:block;float: right;height:100%;text-indent: -10000px;width:49%;}a.pp_previous{background: url(images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat;display:block;float: left;height:100%;text-indent: -10000px;width:49%;}a.pp_expand,a.pp_contract{cursor: pointer;display: none;height:20px;position:absolute;right:30px;text-indent: -10000px;top:10px;width:20px;z-index:20000;}a.pp_close{display:block;float: right;text-indent: -10000px;}.pp_bottom{height:20px;position: relative;}* html .pp_bottom{padding:0 20px;}.pp_bottom .pp_left{height:20px;left:0;position:absolute;width:20px;}.pp_bottom .pp_middle{height:20px;left:20px;position:absolute;right:20px;}* html .pp_bottom .pp_middle{left:0;position: static;}.pp_bottom .pp_right{height:20px;left:auto;position:absolute;right:0;top:0;width:20px;}.pp_loaderIcon{display: none;height:24px;left:50%;margin: -12px 0 0 -12px;position:absolute;top:50%;width:24px;}#pp_full_res{display: none;line-height:1 !important;margin:0 auto;text-align:center;width:100%;}div.ppt{color:#fff;display: none;font-size:17px;left:0;position:absolute;top:0;z-index:9999;}.clearfix:after{content: ".";display:block;height:0;clear:both;visibility: hidden;}.clearfix {display: inline-block;}* html .clearfix {height:1%;}.clearfix {display:block;} 
     1div.pp_default .pp_top,div.pp_default .pp_top .pp_middle,div.pp_default .pp_top .pp_left,div.pp_default .pp_top .pp_right,div.pp_default .pp_bottom,div.pp_default .pp_bottom .pp_left,div.pp_default .pp_bottom .pp_middle,div.pp_default .pp_bottom .pp_right{height:13px} 
     2div.pp_default .pp_top .pp_left{background:url(images/prettyPhoto/default/sprite.png) -78px -93px no-repeat} 
     3div.pp_default .pp_top .pp_middle{background:url(images/prettyPhoto/default/sprite_x.png) top left repeat-x} 
     4div.pp_default .pp_top .pp_right{background:url(images/prettyPhoto/default/sprite.png) -112px -93px no-repeat} 
     5div.pp_default .pp_content .ppt{color:#f8f8f8} 
     6div.pp_default .pp_content_container .pp_left{background:url(images/prettyPhoto/default/sprite_y.png) -7px 0 repeat-y;padding-left:13px} 
     7div.pp_default .pp_content_container .pp_right{background:url(images/prettyPhoto/default/sprite_y.png) top right repeat-y;padding-right:13px} 
     8div.pp_default .pp_next:hover{background:url(images/prettyPhoto/default/sprite_next.png) center right no-repeat;cursor:pointer} 
     9div.pp_default .pp_previous:hover{background:url(images/prettyPhoto/default/sprite_prev.png) center left no-repeat;cursor:pointer} 
     10div.pp_default .pp_expand{background:url(images/prettyPhoto/default/sprite.png) 0 -29px no-repeat;cursor:pointer;width:28px;height:28px} 
     11div.pp_default .pp_expand:hover{background:url(images/prettyPhoto/default/sprite.png) 0 -56px no-repeat;cursor:pointer} 
     12div.pp_default .pp_contract{background:url(images/prettyPhoto/default/sprite.png) 0 -84px no-repeat;cursor:pointer;width:28px;height:28px} 
     13div.pp_default .pp_contract:hover{background:url(images/prettyPhoto/default/sprite.png) 0 -113px no-repeat;cursor:pointer} 
     14div.pp_default .pp_close{width:30px;height:30px;background:url(images/prettyPhoto/default/sprite.png) 2px 1px no-repeat;cursor:pointer} 
     15div.pp_default .pp_gallery ul li a{background:url(images/prettyPhoto/default/default_thumb.png) center center #f8f8f8;border:1px solid #aaa} 
     16div.pp_default .pp_social{margin-top:7px} 
     17div.pp_default .pp_gallery a.pp_arrow_previous,div.pp_default .pp_gallery a.pp_arrow_next{position:static;left:auto} 
     18div.pp_default .pp_nav .pp_play,div.pp_default .pp_nav .pp_pause{background:url(images/prettyPhoto/default/sprite.png) -51px 1px no-repeat;height:30px;width:30px} 
     19div.pp_default .pp_nav .pp_pause{background-position:-51px -29px} 
     20div.pp_default a.pp_arrow_previous,div.pp_default a.pp_arrow_next{background:url(images/prettyPhoto/default/sprite.png) -31px -3px no-repeat;height:20px;width:20px;margin:4px 0 0} 
     21div.pp_default a.pp_arrow_next{left:52px;background-position:-82px -3px} 
     22div.pp_default .pp_content_container .pp_details{margin-top:5px} 
     23div.pp_default .pp_nav{clear:none;height:30px;width:110px;position:relative} 
     24div.pp_default .pp_nav .currentTextHolder{font-family:Georgia;font-style:italic;color:#999;font-size:11px;left:75px;line-height:25px;position:absolute;top:2px;margin:0;padding:0 0 0 10px} 
     25div.pp_default .pp_close:hover,div.pp_default .pp_nav .pp_play:hover,div.pp_default .pp_nav .pp_pause:hover,div.pp_default .pp_arrow_next:hover,div.pp_default .pp_arrow_previous:hover{opacity:0.7} 
     26div.pp_default .pp_description{font-size:11px;font-weight:700;line-height:14px;margin:5px 50px 5px 0} 
     27div.pp_default .pp_bottom .pp_left{background:url(images/prettyPhoto/default/sprite.png) -78px -127px no-repeat} 
     28div.pp_default .pp_bottom .pp_middle{background:url(images/prettyPhoto/default/sprite_x.png) bottom left repeat-x} 
     29div.pp_default .pp_bottom .pp_right{background:url(images/prettyPhoto/default/sprite.png) -112px -127px no-repeat} 
     30div.pp_default .pp_loaderIcon{background:url(images/prettyPhoto/default/loader.gif) center center no-repeat} 
     31div.light_rounded .pp_top .pp_left{background:url(images/prettyPhoto/light_rounded/sprite.png) -88px -53px no-repeat} 
     32div.light_rounded .pp_top .pp_right{background:url(images/prettyPhoto/light_rounded/sprite.png) -110px -53px no-repeat} 
     33div.light_rounded .pp_next:hover{background:url(images/prettyPhoto/light_rounded/btnNext.png) center right no-repeat;cursor:pointer} 
     34div.light_rounded .pp_previous:hover{background:url(images/prettyPhoto/light_rounded/btnPrevious.png) center left no-repeat;cursor:pointer} 
     35div.light_rounded .pp_expand{background:url(images/prettyPhoto/light_rounded/sprite.png) -31px -26px no-repeat;cursor:pointer} 
     36div.light_rounded .pp_expand:hover{background:url(images/prettyPhoto/light_rounded/sprite.png) -31px -47px no-repeat;cursor:pointer} 
     37div.light_rounded .pp_contract{background:url(images/prettyPhoto/light_rounded/sprite.png) 0 -26px no-repeat;cursor:pointer} 
     38div.light_rounded .pp_contract:hover{background:url(images/prettyPhoto/light_rounded/sprite.png) 0 -47px no-repeat;cursor:pointer} 
     39div.light_rounded .pp_close{width:75px;height:22px;background:url(images/prettyPhoto/light_rounded/sprite.png) -1px -1px no-repeat;cursor:pointer} 
     40div.light_rounded .pp_nav .pp_play{background:url(images/prettyPhoto/light_rounded/sprite.png) -1px -100px no-repeat;height:15px;width:14px} 
     41div.light_rounded .pp_nav .pp_pause{background:url(images/prettyPhoto/light_rounded/sprite.png) -24px -100px no-repeat;height:15px;width:14px} 
     42div.light_rounded .pp_arrow_previous{background:url(images/prettyPhoto/light_rounded/sprite.png) 0 -71px no-repeat} 
     43div.light_rounded .pp_arrow_next{background:url(images/prettyPhoto/light_rounded/sprite.png) -22px -71px no-repeat} 
     44div.light_rounded .pp_bottom .pp_left{background:url(images/prettyPhoto/light_rounded/sprite.png) -88px -80px no-repeat} 
     45div.light_rounded .pp_bottom .pp_right{background:url(images/prettyPhoto/light_rounded/sprite.png) -110px -80px no-repeat} 
     46div.dark_rounded .pp_top .pp_left{background:url(images/prettyPhoto/dark_rounded/sprite.png) -88px -53px no-repeat} 
     47div.dark_rounded .pp_top .pp_right{background:url(images/prettyPhoto/dark_rounded/sprite.png) -110px -53px no-repeat} 
     48div.dark_rounded .pp_content_container .pp_left{background:url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat-y} 
     49div.dark_rounded .pp_content_container .pp_right{background:url(images/prettyPhoto/dark_rounded/contentPattern.png) top right repeat-y} 
     50div.dark_rounded .pp_next:hover{background:url(images/prettyPhoto/dark_rounded/btnNext.png) center right no-repeat;cursor:pointer} 
     51div.dark_rounded .pp_previous:hover{background:url(images/prettyPhoto/dark_rounded/btnPrevious.png) center left no-repeat;cursor:pointer} 
     52div.dark_rounded .pp_expand{background:url(images/prettyPhoto/dark_rounded/sprite.png) -31px -26px no-repeat;cursor:pointer} 
     53div.dark_rounded .pp_expand:hover{background:url(images/prettyPhoto/dark_rounded/sprite.png) -31px -47px no-repeat;cursor:pointer} 
     54div.dark_rounded .pp_contract{background:url(images/prettyPhoto/dark_rounded/sprite.png) 0 -26px no-repeat;cursor:pointer} 
     55div.dark_rounded .pp_contract:hover{background:url(images/prettyPhoto/dark_rounded/sprite.png) 0 -47px no-repeat;cursor:pointer} 
     56div.dark_rounded .pp_close{width:75px;height:22px;background:url(images/prettyPhoto/dark_rounded/sprite.png) -1px -1px no-repeat;cursor:pointer} 
     57div.dark_rounded .pp_description{margin-right:85px;color:#fff} 
     58div.dark_rounded .pp_nav .pp_play{background:url(images/prettyPhoto/dark_rounded/sprite.png) -1px -100px no-repeat;height:15px;width:14px} 
     59div.dark_rounded .pp_nav .pp_pause{background:url(images/prettyPhoto/dark_rounded/sprite.png) -24px -100px no-repeat;height:15px;width:14px} 
     60div.dark_rounded .pp_arrow_previous{background:url(images/prettyPhoto/dark_rounded/sprite.png) 0 -71px no-repeat} 
     61div.dark_rounded .pp_arrow_next{background:url(images/prettyPhoto/dark_rounded/sprite.png) -22px -71px no-repeat} 
     62div.dark_rounded .pp_bottom .pp_left{background:url(images/prettyPhoto/dark_rounded/sprite.png) -88px -80px no-repeat} 
     63div.dark_rounded .pp_bottom .pp_right{background:url(images/prettyPhoto/dark_rounded/sprite.png) -110px -80px no-repeat} 
     64div.dark_rounded .pp_loaderIcon{background:url(images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat} 
     65div.dark_square .pp_left,div.dark_square .pp_middle,div.dark_square .pp_right,div.dark_square .pp_content{background:#000} 
     66div.dark_square .pp_description{color:#fff;margin:0 85px 0 0} 
     67div.dark_square .pp_loaderIcon{background:url(images/prettyPhoto/dark_square/loader.gif) center center no-repeat} 
     68div.dark_square .pp_expand{background:url(images/prettyPhoto/dark_square/sprite.png) -31px -26px no-repeat;cursor:pointer} 
     69div.dark_square .pp_expand:hover{background:url(images/prettyPhoto/dark_square/sprite.png) -31px -47px no-repeat;cursor:pointer} 
     70div.dark_square .pp_contract{background:url(images/prettyPhoto/dark_square/sprite.png) 0 -26px no-repeat;cursor:pointer} 
     71div.dark_square .pp_contract:hover{background:url(images/prettyPhoto/dark_square/sprite.png) 0 -47px no-repeat;cursor:pointer} 
     72div.dark_square .pp_close{width:75px;height:22px;background:url(images/prettyPhoto/dark_square/sprite.png) -1px -1px no-repeat;cursor:pointer} 
     73div.dark_square .pp_nav{clear:none} 
     74div.dark_square .pp_nav .pp_play{background:url(images/prettyPhoto/dark_square/sprite.png) -1px -100px no-repeat;height:15px;width:14px} 
     75div.dark_square .pp_nav .pp_pause{background:url(images/prettyPhoto/dark_square/sprite.png) -24px -100px no-repeat;height:15px;width:14px} 
     76div.dark_square .pp_arrow_previous{background:url(images/prettyPhoto/dark_square/sprite.png) 0 -71px no-repeat} 
     77div.dark_square .pp_arrow_next{background:url(images/prettyPhoto/dark_square/sprite.png) -22px -71px no-repeat} 
     78div.dark_square .pp_next:hover{background:url(images/prettyPhoto/dark_square/btnNext.png) center right no-repeat;cursor:pointer} 
     79div.dark_square .pp_previous:hover{background:url(images/prettyPhoto/dark_square/btnPrevious.png) center left no-repeat;cursor:pointer} 
     80div.light_square .pp_expand{background:url(images/prettyPhoto/light_square/sprite.png) -31px -26px no-repeat;cursor:pointer} 
     81div.light_square .pp_expand:hover{background:url(images/prettyPhoto/light_square/sprite.png) -31px -47px no-repeat;cursor:pointer} 
     82div.light_square .pp_contract{background:url(images/prettyPhoto/light_square/sprite.png) 0 -26px no-repeat;cursor:pointer} 
     83div.light_square .pp_contract:hover{background:url(images/prettyPhoto/light_square/sprite.png) 0 -47px no-repeat;cursor:pointer} 
     84div.light_square .pp_close{width:75px;height:22px;background:url(images/prettyPhoto/light_square/sprite.png) -1px -1px no-repeat;cursor:pointer} 
     85div.light_square .pp_nav .pp_play{background:url(images/prettyPhoto/light_square/sprite.png) -1px -100px no-repeat;height:15px;width:14px} 
     86div.light_square .pp_nav .pp_pause{background:url(images/prettyPhoto/light_square/sprite.png) -24px -100px no-repeat;height:15px;width:14px} 
     87div.light_square .pp_arrow_previous{background:url(images/prettyPhoto/light_square/sprite.png) 0 -71px no-repeat} 
     88div.light_square .pp_arrow_next{background:url(images/prettyPhoto/light_square/sprite.png) -22px -71px no-repeat} 
     89div.light_square .pp_next:hover{background:url(images/prettyPhoto/light_square/btnNext.png) center right no-repeat;cursor:pointer} 
     90div.light_square .pp_previous:hover{background:url(images/prettyPhoto/light_square/btnPrevious.png) center left no-repeat;cursor:pointer} 
     91div.facebook .pp_top .pp_left{background:url(images/prettyPhoto/facebook/sprite.png) -88px -53px no-repeat} 
     92div.facebook .pp_top .pp_middle{background:url(images/prettyPhoto/facebook/contentPatternTop.png) top left repeat-x} 
     93div.facebook .pp_top .pp_right{background:url(images/prettyPhoto/facebook/sprite.png) -110px -53px no-repeat} 
     94div.facebook .pp_content_container .pp_left{background:url(images/prettyPhoto/facebook/contentPatternLeft.png) top left repeat-y} 
     95div.facebook .pp_content_container .pp_right{background:url(images/prettyPhoto/facebook/contentPatternRight.png) top right repeat-y} 
     96div.facebook .pp_expand{background:url(images/prettyPhoto/facebook/sprite.png) -31px -26px no-repeat;cursor:pointer} 
     97div.facebook .pp_expand:hover{background:url(images/prettyPhoto/facebook/sprite.png) -31px -47px no-repeat;cursor:pointer} 
     98div.facebook .pp_contract{background:url(images/prettyPhoto/facebook/sprite.png) 0 -26px no-repeat;cursor:pointer} 
     99div.facebook .pp_contract:hover{background:url(images/prettyPhoto/facebook/sprite.png) 0 -47px no-repeat;cursor:pointer} 
     100div.facebook .pp_close{width:22px;height:22px;background:url(images/prettyPhoto/facebook/sprite.png) -1px -1px no-repeat;cursor:pointer} 
     101div.facebook .pp_description{margin:0 37px 0 0} 
     102div.facebook .pp_loaderIcon{background:url(images/prettyPhoto/facebook/loader.gif) center center no-repeat} 
     103div.facebook .pp_arrow_previous{background:url(images/prettyPhoto/facebook/sprite.png) 0 -71px no-repeat;height:22px;margin-top:0;width:22px} 
     104div.facebook .pp_arrow_previous.disabled{background-position:0 -96px;cursor:default} 
     105div.facebook .pp_arrow_next{background:url(images/prettyPhoto/facebook/sprite.png) -32px -71px no-repeat;height:22px;margin-top:0;width:22px} 
     106div.facebook .pp_arrow_next.disabled{background-position:-32px -96px;cursor:default} 
     107div.facebook .pp_nav{margin-top:0} 
     108div.facebook .pp_nav p{font-size:15px;padding:0 3px 0 4px} 
     109div.facebook .pp_nav .pp_play{background:url(images/prettyPhoto/facebook/sprite.png) -1px -123px no-repeat;height:22px;width:22px} 
     110div.facebook .pp_nav .pp_pause{background:url(images/prettyPhoto/facebook/sprite.png) -32px -123px no-repeat;height:22px;width:22px} 
     111div.facebook .pp_next:hover{background:url(images/prettyPhoto/facebook/btnNext.png) center right no-repeat;cursor:pointer} 
     112div.facebook .pp_previous:hover{background:url(images/prettyPhoto/facebook/btnPrevious.png) center left no-repeat;cursor:pointer} 
     113div.facebook .pp_bottom .pp_left{background:url(images/prettyPhoto/facebook/sprite.png) -88px -80px no-repeat} 
     114div.facebook .pp_bottom .pp_middle{background:url(images/prettyPhoto/facebook/contentPatternBottom.png) top left repeat-x} 
     115div.facebook .pp_bottom .pp_right{background:url(images/prettyPhoto/facebook/sprite.png) -110px -80px no-repeat} 
     116div.pp_pic_holder a:focus{outline:none} 
     117div.pp_overlay{background:#000;display:none;left:0;position:absolute;top:0;width:100%;z-index:9500} 
     118div.pp_pic_holder{display:none;position:absolute;width:100px;z-index:10000} 
     119.pp_content{height:40px;min-width:40px} 
     120* html .pp_content{width:40px} 
     121.pp_content_container{position:relative;text-align:left;width:100%} 
     122.pp_content_container .pp_left{padding-left:20px} 
     123.pp_content_container .pp_right{padding-right:20px} 
     124.pp_content_container .pp_details{float:left;margin:10px 0 2px} 
     125.pp_description{display:none;margin:0} 
     126.pp_social{float:left;margin:0} 
     127.pp_social .facebook{float:left;margin-left:5px;width:55px;overflow:hidden} 
     128.pp_social .twitter{float:left} 
     129.pp_nav{clear:right;float:left;margin:3px 10px 0 0} 
     130.pp_nav p{float:left;white-space:nowrap;margin:2px 4px} 
     131.pp_nav .pp_play,.pp_nav .pp_pause{float:left;margin-right:4px;text-indent:-10000px} 
     132a.pp_arrow_previous,a.pp_arrow_next{display:block;float:left;height:15px;margin-top:3px;overflow:hidden;text-indent:-10000px;width:14px} 
     133.pp_hoverContainer{position:absolute;top:0;width:100%;z-index:2000} 
     134.pp_gallery{display:none;left:50%;margin-top:-50px;position:absolute;z-index:10000} 
     135.pp_gallery div{float:left;overflow:hidden;position:relative} 
     136.pp_gallery ul{float:left;height:35px;position:relative;white-space:nowrap;margin:0 0 0 5px;padding:0} 
     137.pp_gallery ul a{border:1px rgba(0,0,0,0.5) solid;display:block;float:left;height:33px;overflow:hidden} 
     138.pp_gallery ul a img{border:0} 
     139.pp_gallery li{display:block;float:left;margin:0 5px 0 0;padding:0} 
     140.pp_gallery li.default a{background:url(images/prettyPhoto/facebook/default_thumbnail.gif) 0 0 no-repeat;display:block;height:33px;width:50px} 
     141.pp_gallery .pp_arrow_previous,.pp_gallery .pp_arrow_next{margin-top:7px!important} 
     142a.pp_next{background:url(images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat;display:block;float:right;height:100%;text-indent:-10000px;width:49%} 
     143a.pp_previous{background:url(images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat;display:block;float:left;height:100%;text-indent:-10000px;width:49%} 
     144a.pp_expand,a.pp_contract{cursor:pointer;display:none;height:20px;position:absolute;right:30px;text-indent:-10000px;top:10px;width:20px;z-index:20000} 
     145a.pp_close{position:absolute;right:0;top:0;display:block;line-height:22px;text-indent:-10000px} 
     146.pp_loaderIcon{display:block;height:24px;left:50%;position:absolute;top:50%;width:24px;margin:-12px 0 0 -12px} 
     147#pp_full_res{line-height:1!important} 
     148#pp_full_res .pp_inline{text-align:left} 
     149#pp_full_res .pp_inline p{margin:0 0 15px} 
     150div.ppt{color:#fff;display:none;font-size:17px;z-index:9999;margin:0 0 5px 15px} 
     151div.pp_default .pp_content,div.light_rounded .pp_content{background-color:#fff} 
     152div.pp_default #pp_full_res .pp_inline,div.light_rounded .pp_content .ppt,div.light_rounded #pp_full_res .pp_inline,div.light_square .pp_content .ppt,div.light_square #pp_full_res .pp_inline,div.facebook .pp_content .ppt,div.facebook #pp_full_res .pp_inline{color:#000} 
     153div.pp_default .pp_gallery ul li a:hover,div.pp_default .pp_gallery ul li.selected a,.pp_gallery ul a:hover,.pp_gallery li.selected a{border-color:#fff} 
     154div.pp_default .pp_details,div.light_rounded .pp_details,div.dark_rounded .pp_details,div.dark_square .pp_details,div.light_square .pp_details,div.facebook .pp_details{position:relative} 
     155div.light_rounded .pp_top .pp_middle,div.light_rounded .pp_content_container .pp_left,div.light_rounded .pp_content_container .pp_right,div.light_rounded .pp_bottom .pp_middle,div.light_square .pp_left,div.light_square .pp_middle,div.light_square .pp_right,div.light_square .pp_content,div.facebook .pp_content{background:#fff} 
     156div.light_rounded .pp_description,div.light_square .pp_description{margin-right:85px} 
     157div.light_rounded .pp_gallery a.pp_arrow_previous,div.light_rounded .pp_gallery a.pp_arrow_next,div.dark_rounded .pp_gallery a.pp_arrow_previous,div.dark_rounded .pp_gallery a.pp_arrow_next,div.dark_square .pp_gallery a.pp_arrow_previous,div.dark_square .pp_gallery a.pp_arrow_next,div.light_square .pp_gallery a.pp_arrow_previous,div.light_square .pp_gallery a.pp_arrow_next{margin-top:12px!important} 
     158div.light_rounded .pp_arrow_previous.disabled,div.dark_rounded .pp_arrow_previous.disabled,div.dark_square .pp_arrow_previous.disabled,div.light_square .pp_arrow_previous.disabled{background-position:0 -87px;cursor:default} 
     159div.light_rounded .pp_arrow_next.disabled,div.dark_rounded .pp_arrow_next.disabled,div.dark_square .pp_arrow_next.disabled,div.light_square .pp_arrow_next.disabled{background-position:-22px -87px;cursor:default} 
     160div.light_rounded .pp_loaderIcon,div.light_square .pp_loaderIcon{background:url(images/prettyPhoto/light_rounded/loader.gif) center center no-repeat} 
     161div.dark_rounded .pp_top .pp_middle,div.dark_rounded .pp_content,div.dark_rounded .pp_bottom .pp_middle{background:url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat} 
     162div.dark_rounded .currentTextHolder,div.dark_square .currentTextHolder{color:#c4c4c4} 
     163div.dark_rounded #pp_full_res .pp_inline,div.dark_square #pp_full_res .pp_inline{color:#fff} 
     164.pp_top,.pp_bottom{height:20px;position:relative} 
     165* html .pp_top,* html .pp_bottom{padding:0 20px} 
     166.pp_top .pp_left,.pp_bottom .pp_left{height:20px;left:0;position:absolute;width:20px} 
     167.pp_top .pp_middle,.pp_bottom .pp_middle{height:20px;left:20px;position:absolute;right:20px} 
     168* html .pp_top .pp_middle,* html .pp_bottom .pp_middle{left:0;position:static} 
     169.pp_top .pp_right,.pp_bottom .pp_right{height:20px;left:auto;position:absolute;right:0;top:0;width:20px} 
     170.pp_fade,.pp_gallery li.default a img{display:none} 
  • fancyflickr/trunk/readme.txt

    r199306 r574379  
    22Contributors: betzster 
    33Tags: photos, flickr 
    4 Requires at least: 2.8 
    5 Tested up to: 2.9.1 
    6 Stable tag: trunk 
     4Requires at least: 3.4 
     5Tested up to: 3.4.1 
     6Stable tag: 1.0 
    77 
    88Adds a nice looking gallery from flickr styled with a little CSS3 and jQuery, which degrades nicely in older browsers. 
     
    2424FancyFlickr uses the `[fancyflickr]` shortcode to display the FancyFlickr gallery in any post. The full options are `[fancyflickr set="SETID" num="NUMBEROFPICS"]`. Neither of these are required. Without any of the options set it will get the newest gallery with all of the pictures. 
    2525 
    26 = When I created a new set, the pictures on my post changed. Why? = 
    27  
    28 Right now, the plugin isn't smart enough to know which set is the newest at the time you wrote the post. I'm working on a way to solve this that will be available in the next version. 
    29  
    30 = Is there a way to choose which pictures inside a set are displayed? = 
    31  
    32 Right now the only way would be to set `num="NUMBEROFPHOTOS"` and rearrange your set on flickr. I know. It's annoying. I'm working on better ways to do this. 
    33  
    3426== Screenshots == 
    3527 
     
    3931 
    4032== Changelog == 
     33 
     34= 1.0 = 
     35* Rewrite helper to use `wp_http_request` instead of curl 
     36* Use more reliable plugin URL incase it's installed in a non-standard place 
     37* Use WordPress's jQuery instead of Google's 
     38* Cache results in WP_Object_Cache 
     39* Upate prettyPhoto 
    4140 
    4241= 0.3.2 = 
Note: See TracChangeset for help on using the changeset viewer.