prettyPhoto Pluggin

prettyPhoto Pluggin

I have the working code a the Pretty Photo Pluggin , but i wanted to understand the code better 

Below is the html code . 

and below is the Jquery code . 

  1. jQuery("body").on("click", "a[rel^='prettyPhoto']", function() {
  2.     jQuery.prettyPhoto.open(jQuery(this).attr("href"),"","");
  3.     return false;
  4. });

  5. jQuery(document).ready(function(){
  6. $('a > img').parent().attr('rel', 'prettyPhoto');
  7. jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({
  8. theme: 'facebook', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
  9. animation_speed: 'fast', /* fast/slow/normal */
  10. slideshow: 5000, /* false OR interval time in ms */
  11. autoplay_slideshow: false, /* true/false */
  12. opacity: 0.80, /* Value between 0 and 1 */
  13. show_title: true, /* true/false */
  14. allow_resize: true, /* Resize the photos bigger than viewport. true/false */
  15. default_width: 500,
  16. default_height: 344,
  17. counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
  18. horizontal_padding: 20, /* The padding on each side of the picture */
  19. hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
  20. wmode: 'opaque', /* Set the flash wmode attribute */
  21. autoplay: true, /* Automatically start videos: True/False */
  22. modal: false, /* If set to true, only the close button will close the window */
  23. deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */
  24. overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
  25. keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */
  26. changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
  27. callback: function(){}, /* Called when prettyPhoto is closed */
  28. ie6_fallback: true
  29.     /* Read full article >> http://aslamise.blogspot.in/2013/02/add-pretty-photo-jquery-plugin-to-your-page-and-automate-assigning-the-rel-prettyphoto-tag-for-each-image-at-once.html */
  30. });
  31. jQuery(".toggle_content").hide();
  32. });


Can somebody explain to me on the secound line 

  1. jQuery.prettyPhoto.open(jQuery(this).attr("href"),"","");
what is the above doing , also on the secound last line . 


  1. jQuery(".toggle_content").hide();
What is the above doing ? 

Also i understand that the 7th line is initializing the prettyPhoto Pluggin 

  1. jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto
But why the secound selector i.e . 

  1. a[rel^='lightbox']
I have the working Js fiddle if it helps . 


Will appreciate ur help , Thank You . 


Gautam