YITH WooCommerce Zoom Magnifier - Version 2.0.0

Version Description

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Zoom Magnifier
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.4.0 to 2.0.0

Files changed (52) hide show
  1. assets/css/admin.css +131 -20
  2. assets/css/frontend.css +103 -65
  3. assets/css/yith_magnifier.css +85 -70
  4. assets/icons/lightbox.svg +18 -0
  5. assets/icons/zoom.svg +18 -0
  6. assets/images/01-bg.png +0 -0
  7. assets/images/01-icon.png +0 -0
  8. assets/images/01.png +0 -0
  9. assets/images/02-bg.png +0 -0
  10. assets/images/02-icon.png +0 -0
  11. assets/images/02.png +0 -0
  12. assets/images/03-bg.png +0 -0
  13. assets/images/03-icon.png +0 -0
  14. assets/images/03.png +0 -0
  15. assets/images/slider-arrow.png +0 -0
  16. assets/images/upgrade.png +0 -0
  17. assets/images/yith-woocommerce-zoom-magnifier-video.jpg +0 -0
  18. assets/js/init.min.js +1 -0
  19. assets/js/init.prettyPhoto.js +935 -0
  20. assets/js/jquery.carouFredSel.js +3822 -4253
  21. assets/js/jquery.carouFredSel.min.js +1 -1
  22. assets/js/jquery.min.js +1 -1
  23. assets/js/yith_magnifier.js +1041 -853
  24. assets/js/yith_magnifier.min.js +1 -1
  25. assets/js/ywzm_backend.js +88 -0
  26. assets/js/ywzm_backend.min.js +1 -0
  27. assets/js/ywzm_frontend.js +285 -62
  28. assets/js/ywzm_frontend.min.js +1 -1
  29. changelog.txt +190 -190
  30. class.yith-wcmg-admin.php +0 -112
  31. class.yith-wcmg-frontend.php +0 -173
  32. functions.yith-wcmg.php +0 -78
  33. init.php +154 -157
  34. languages/yith-woocommerce-zoom-magnifier.pot +243 -151
  35. lib/class.yith-wcmg-admin.php +97 -0
  36. lib/class.yith-wcmg-frontend.php +368 -0
  37. lib/class.yith-woocommerce-zoom-magnifier.php +177 -188
  38. lib/class.yith-ywzm-custom-types.php +0 -181
  39. lib/class.yith-ywzm-plugin-fw-loader.php +266 -253
  40. lib/compatibility/class-yith-wczm-compatibility.php +113 -0
  41. lib/compatibility/class-yith-wczm-elementor-compatibility.php +102 -0
  42. lib/compatibility/elementor/class-yith-wczm-product-images-widget.php +80 -0
  43. plugin-fw/LICENSE.txt +695 -695
  44. plugin-fw/assets/css/admin.css +333 -333
  45. plugin-fw/assets/css/codemirror/codemirror.css +260 -260
  46. plugin-fw/assets/css/colorbox.css +65 -65
  47. plugin-fw/assets/css/elementor.css +35 -35
  48. plugin-fw/assets/css/metaboxes.css +751 -751
  49. plugin-fw/assets/css/yit-plugin-panel.css +1087 -1087
  50. plugin-fw/assets/css/yit-upgrade-to-pro.css +82 -82
  51. plugin-fw/assets/css/yit-upgrader.css +21 -21
  52. plugin-fw/assets/css/yith-fields.css +1648 -2258
assets/css/admin.css CHANGED
@@ -1,20 +1,131 @@
1
- .yith_woocommerce_slider {
2
- width: 300px;
3
- float: left
4
- }
5
- .yith_woocommerce_slider_value {
6
- margin-top: -5px;
7
- margin-left: 10px;
8
- width: 50px;
9
- float: left;
10
- text-align: center;
11
- font-weight: bold;
12
- }
13
-
14
- .yith_banner {
15
- margin-top: 10px;
16
- }
17
-
18
- #eg-wrap .select_fake {/* solve back-end conflict with Essential Grid */
19
- height: 24px;
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .yith_woocommerce_slider {
2
+ width: 300px;
3
+ float: left
4
+ }
5
+
6
+ .yith_woocommerce_slider_value {
7
+ margin-top: -5px;
8
+ margin-left: 10px;
9
+ width: 50px;
10
+ float: left;
11
+ text-align: center;
12
+ font-weight: bold;
13
+ }
14
+
15
+ #eg-wrap .select_fake { /* solve back-end conflict with Essential Grid */
16
+ height: 24px;
17
+ }
18
+
19
+ .yith-plugins_page_yith_woocommerce_zoom-magnifier_panel .yith-plugin-fw-dimensions__dimensions{
20
+ max-width: 250px;
21
+ }
22
+
23
+ #yith_wcmg_slider_sizes .yith-plugin-fw-dimensions__linked{
24
+ display: none;
25
+ }
26
+
27
+ #yith_wcmg_slider_radius, #ywzm_zoom_icon_size, #ywzm_lightbox_icon_size, #yith_wcmg_zoom_radius, #yith_wcmg_lightbox_radius{
28
+ max-width: 75px;
29
+ }
30
+
31
+
32
+ .ywzm-admin-wrap-content{
33
+ background: white;
34
+ padding: 20px;
35
+ }
36
+
37
+ .yith-plugin-ui .ywzm-admin-wrap-content h2 {
38
+ border: 0;
39
+ border-top-color: currentcolor;
40
+ border-top-style: none;
41
+ border-top-width: 0px;
42
+ padding: 0;
43
+ }
44
+
45
+
46
+ .ywzm-admin-no-posts {
47
+ text-align: center;
48
+ padding: 50px;
49
+ }
50
+
51
+ .ywzm-admin-no-posts-logo {
52
+ padding-bottom: 10px;
53
+ }
54
+
55
+ .ywzm-admin-no-posts-text {
56
+ font-size: 16px;
57
+ line-height: 30px;
58
+ margin-top: 20px;
59
+ }
60
+
61
+ .ywzm-admin-no-posts a.page-title-action {
62
+ padding: 5px 30px !important;
63
+ }
64
+
65
+ .ywzm-admin-no-posts-text p {
66
+ font-size: 14px;
67
+ line-height: 1em;
68
+ }
69
+
70
+ .wrap-title {
71
+ display: flex;
72
+ align-items: center;
73
+ }
74
+
75
+ .yith-plugins_page_yith_woocommerce_zoom-magnifier_panel .ui-dialog-buttonpane .ui-button {
76
+ box-shadow: none;
77
+ background: #007694;
78
+ color: #fff;
79
+ border: 0;
80
+ }
81
+
82
+
83
+ table.excluded_categories td,
84
+ table.excluded_categories th,
85
+ table.excluded_products td,
86
+ table.excluded_products th {
87
+ vertical-align: middle;
88
+ }
89
+
90
+ table.excluded_categories .column-image,
91
+ table.excluded_products .column-image {
92
+ width: 52px;
93
+ text-align: center;
94
+ white-space: nowrap;
95
+ }
96
+
97
+ table.excluded_categories .column-image img,
98
+ table.excluded_products .column-image img {
99
+ margin: 0;
100
+ width: auto;
101
+ height: auto;
102
+ max-width: 40px;
103
+ max-height: 40px;
104
+ }
105
+
106
+ table.excluded_categories .column-slug,
107
+ table.excluded_categories .column-name {
108
+ width: 25%;
109
+ }
110
+
111
+ table.excluded_categories .column-count {
112
+ width: 74px;
113
+ }
114
+
115
+ table.excluded_categories .column-actions,
116
+ table.excluded_products .column-actions {
117
+ width: 100px;
118
+ }
119
+
120
+ .wp-core-ui .yith-plugin-ui .ywzm-admin-wrap-content .button-secondary,
121
+ .wp-core-ui .yith-plugin-ui .ywzm-admin-wrap-content .button-primary {
122
+ line-height: 30px;
123
+ }
124
+ .ywzm-admin-wrap-content {
125
+ background: white;
126
+ padding: 20px;
127
+ }
128
+
129
+ .ywzm-admin-wrap-content input#add {
130
+ margin-top: 7px;
131
+ }
assets/css/frontend.css CHANGED
@@ -1,65 +1,103 @@
1
- /* gallery */
2
- .yith_magnifier_gallery {
3
- margin: 0;
4
- padding: 0;
5
- }
6
-
7
- .yith_magnifier_gallery li {
8
- position: relative;
9
- float: left;
10
- display: block;
11
- }
12
-
13
- .yith_magnifier_gallery li.last {
14
- margin-right: 0;
15
- }
16
-
17
- .yith_magnifier_gallery li a {
18
- width: 100% !important;
19
- display: block;
20
- margin-top: 10px;
21
- height: auto !important;
22
- }
23
-
24
- /* next/prev */
25
- .single-product.woocommerce .thumbnails {
26
- position: relative;
27
- }
28
-
29
- .single-product.woocommerce .thumbnails #slider-prev,
30
- .single-product.woocommerce .thumbnails #slider-next {
31
- display: none !important;
32
- cursor: pointer;
33
- width: 27px;
34
- height: 26px;
35
- background: url('../images/slider-arrow.png') no-repeat left center;
36
- position: absolute;
37
- top: 48%;
38
- margin-top: -2px;
39
- }
40
-
41
- .single-product.woocommerce .thumbnails #slider-prev {
42
- background-position: left center;
43
- left: 0px;
44
- }
45
-
46
- .single-product.woocommerce .thumbnails #slider-next {
47
- background-position: right center;
48
- right: 0px;
49
- }
50
-
51
- .single-product.woocommerce .thumbnails:hover #slider-prev,
52
- .single-product.woocommerce .thumbnails:hover #slider-next {
53
- display: block !important;
54
- }
55
-
56
- span.onsale {
57
- z-index: 10000
58
- }
59
-
60
- div.pp_woocommerce a.pp_expand {
61
- display: inline;
62
- bottom: 10px;
63
- top: initial;
64
- left: 10px;
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* gallery */
2
+ .yith_magnifier_gallery {
3
+ margin: 0;
4
+ padding: 0;
5
+ text-align: center;
6
+ }
7
+
8
+ .yith_magnifier_gallery li {
9
+ position: relative;
10
+ display: inline-block;
11
+ vertical-align: center;
12
+ top: 0;
13
+ }
14
+
15
+ /* .yith_magnifier_gallery li.last {
16
+ margin-right: 0;
17
+ } */
18
+
19
+ .yith_magnifier_gallery li a {
20
+ width: 100% !important;
21
+ display: block;
22
+ margin-top: 10px;
23
+ height: auto !important;
24
+ overflow: hidden;
25
+ }
26
+
27
+ /* next/prev */
28
+ .single-product.woocommerce .thumbnails {
29
+ position: relative;
30
+ overflow: hidden;
31
+ }
32
+
33
+ .single-product.woocommerce .thumbnails .dashicons{
34
+ display: table-cell;
35
+ text-align: center;
36
+ vertical-align: middle;
37
+ padding-bottom: 2px;
38
+ }
39
+
40
+
41
+ .single-product.woocommerce .thumbnails #slider-prev,
42
+ .single-product.woocommerce .thumbnails #slider-next {
43
+ display: none;
44
+ cursor: pointer;
45
+ width: 25px;
46
+ height: 25px;
47
+ position: absolute;
48
+ top: 50%;
49
+ transform: translateY( -50% );
50
+ }
51
+
52
+ .single-product.woocommerce .thumbnails #slider-prev {
53
+ background-position: left center;
54
+ left: 1px;
55
+ }
56
+
57
+ .single-product.woocommerce .thumbnails #slider-next {
58
+ background-position: right center;
59
+ right: 0px;
60
+ }
61
+
62
+ .single-product.woocommerce .thumbnails:hover #slider-prev,
63
+ .single-product.woocommerce .thumbnails:hover #slider-next {
64
+ display: block !important;
65
+ }
66
+
67
+ span.onsale {
68
+ z-index: 10000
69
+ }
70
+
71
+ div.pp_woocommerce a.yith_expand {
72
+ /*background: url("../icons/lightbox.svg") no-repeat center center;*/
73
+ display: inline;
74
+ cursor: pointer;
75
+ font-size: 25px;
76
+ position: absolute;
77
+ text-decoration: none;
78
+ text-indent: -10000px;
79
+ z-index: 20000;
80
+ height: 25px;
81
+ width: 25px;
82
+ line-height: 1em;
83
+ }
84
+
85
+ .expand-button-hidden svg{
86
+ display: block;
87
+ padding: 2px;
88
+ }
89
+
90
+ .zoom-button-hidden svg{
91
+ display: block;
92
+ padding: 5px;
93
+ }
94
+
95
+ .expand-button-hidden svg {
96
+ display: block;
97
+ padding: 5px;
98
+ }
99
+
100
+
101
+ .elementor-widget-wrap .yith_magnifier_zoom.woocommerce-main-image img{
102
+ width: 100%;
103
+ }
assets/css/yith_magnifier.css CHANGED
@@ -1,70 +1,85 @@
1
- .yith_magnifier_zoom_wrap {
2
- top: 0;
3
- position: relative;
4
- }
5
-
6
- .yith_magnifier_loading {
7
- color:white;
8
- background:#222;
9
- padding:3px;
10
- border:1px solid #000;
11
- position: absolute;
12
- text-align: center;
13
- top: 10%;
14
- z-index: 9999;
15
- }
16
-
17
- .yith_magnifier_zoom {
18
- position: relative;
19
- display: block;
20
- }
21
-
22
- .yith_magnifier_zoom img {
23
- display: block;
24
- }
25
-
26
- .yith_magnifier_mousetrap {
27
- z-index: 999;
28
- position: absolute;
29
- width: 0px;
30
- height :0px;
31
- left: 0;
32
- top: 0;
33
- }
34
-
35
- /* ie fix */
36
- .ie .yith_magnifier_mousetrap {
37
- background-image: url(".");
38
- }
39
-
40
- .yith_magnifier_lens {
41
- display: none;
42
- z-index:98;
43
- position:absolute;
44
- overflow: hidden;
45
-
46
- border: 1px solid #ccc;
47
- }
48
-
49
- .yith_magnifier_lens img {
50
- width: auto !important;
51
- max-width: none !important;
52
-
53
- -webkit-transition: all ease-in-out 0s !important;
54
- -moz-transition: all ease-in-out 0s !important;
55
- -o-transition: all ease-in-out 0s !important;
56
- transition: all ease-in-out 0s !important;
57
- }
58
-
59
- .yith_magnifier_zoom_magnifier {
60
- display:none;
61
- position:absolute;
62
- z-index: 99;
63
-
64
- border:4px solid #ccc;
65
- overflow:hidden;
66
- }
67
-
68
- .yith_magnifier_gallery {
69
- list-style: none;
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .yith_magnifier_zoom_wrap {
2
+ top: 0;
3
+ position: relative;
4
+ }
5
+
6
+ .yith_magnifier_loading {
7
+ color:white;
8
+ background:#222;
9
+ padding:3px;
10
+ border:1px solid #000;
11
+ position: absolute;
12
+ text-align: center;
13
+ top: 10%;
14
+ z-index: 9999;
15
+ }
16
+
17
+ .yith_magnifier_zoom {
18
+ position: relative;
19
+ display: block;
20
+ }
21
+
22
+ .yith_magnifier_zoom img {
23
+ display: block;
24
+ }
25
+
26
+ .yith_magnifier_mousetrap {
27
+ z-index: 999;
28
+ position: absolute;
29
+ width: 0px;
30
+ height :0px;
31
+ left: 0;
32
+ top: 0;
33
+ }
34
+
35
+ /* ie fix */
36
+ .ie .yith_magnifier_mousetrap {
37
+ background-image: url(".");
38
+ }
39
+
40
+ .yith_magnifier_lens {
41
+ display: none;
42
+ z-index:98;
43
+ position:absolute;
44
+ overflow: hidden;
45
+
46
+ border: 1px solid #ccc;
47
+ }
48
+
49
+ .yith_magnifier_lens img {
50
+ width: auto !important;
51
+ max-width: none !important;
52
+
53
+ -webkit-transition: all ease-in-out 0s !important;
54
+ -moz-transition: all ease-in-out 0s !important;
55
+ -o-transition: all ease-in-out 0s !important;
56
+ transition: all ease-in-out 0s !important;
57
+ }
58
+
59
+ .yith_magnifier_zoom_magnifier {
60
+ display:none;
61
+ position:absolute;
62
+ z-index: 99;
63
+
64
+ border:4px solid #ccc;
65
+ overflow:hidden;
66
+ }
67
+
68
+ .yith_magnifier_gallery {
69
+ list-style: none;
70
+ }
71
+
72
+
73
+ /* ul.yith_magnifier_gallery li {
74
+ margin-right: 10px;
75
+ text-align: center;
76
+ overflow: hidden;
77
+ }
78
+
79
+ ul.yith_magnifier_gallery li:last-child {
80
+ margin-right: 0px;
81
+ } */
82
+
83
+ .yith_magnifier_thumbnail {
84
+ margin-right: 1px;
85
+ }
assets/icons/lightbox.svg ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="19px" height="19px" viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>arrow / expand</title>
4
+ <defs>
5
+ <rect id="path-1" x="0" y="0" width="30" height="30"></rect>
6
+ </defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="Product-page---example-1" transform="translate(-940.000000, -1014.000000)">
9
+ <g id="arrow-/-expand" transform="translate(934.500000, 1008.500000)">
10
+ <mask id="mask-2" fill="white">
11
+ <use xlink:href="#path-1"></use>
12
+ </mask>
13
+ <g id="arrow-/-expand-(Background/Mask)"></g>
14
+ <path d="M21.25,8.75 L15,8.75 L15,6.25 L23.75,6.25 L23.740468,15.0000006 L21.25,15.0000006 L21.25,8.75 Z M8.75,21.25 L15,21.25 L15,23.75 L6.25,23.75 L6.25953334,14.9999988 L8.75,14.9999988 L8.75,21.25 Z" fill="#000000" mask="url(#mask-2)"></path>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </svg>
assets/icons/zoom.svg ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>edit / search</title>
4
+ <defs>
5
+ <rect id="path-1" x="0" y="0" width="30" height="30"></rect>
6
+ </defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="Product-page---example-1" transform="translate(-990.000000, -1013.000000)">
9
+ <g id="edit-/-search" transform="translate(986.000000, 1010.000000)">
10
+ <mask id="mask-2" fill="white">
11
+ <use xlink:href="#path-1"></use>
12
+ </mask>
13
+ <g id="edit-/-search-(Background/Mask)"></g>
14
+ <path d="M17.9704714,15.5960917 C20.0578816,12.6670864 19.7876957,8.57448101 17.1599138,5.94669908 C14.2309815,3.01776677 9.4822444,3.01776707 6.55331239,5.94669908 C3.62438008,8.87563139 3.62438008,13.6243683 6.55331239,16.5533006 C9.18109432,19.1810825 13.2736993,19.4512688 16.2027049,17.3638582 L23.3470976,24.5082521 L25.1148653,22.7404845 L17.9704714,15.5960917 C19.3620782,13.6434215 19.3620782,13.6434215 17.9704714,15.5960917 Z M15.3921473,7.71446586 C17.3447686,9.6670872 17.3447686,12.8329128 15.3921473,14.7855341 C13.4395258,16.7381556 10.273701,16.7381555 8.32107961,14.7855341 C6.36845812,12.8329127 6.36845812,9.66708735 8.32107961,7.71446586 C10.273701,5.76184452 13.4395258,5.76184437 15.3921473,7.71446586 C16.6938949,9.01621342 16.6938949,9.01621342 15.3921473,7.71446586 Z" fill="#000000" mask="url(#mask-2)"></path>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </svg>
assets/images/01-bg.png DELETED
Binary file
assets/images/01-icon.png DELETED
Binary file
assets/images/01.png DELETED
Binary file
assets/images/02-bg.png DELETED
Binary file
assets/images/02-icon.png DELETED
Binary file
assets/images/02.png DELETED
Binary file
assets/images/03-bg.png DELETED
Binary file
assets/images/03-icon.png DELETED
Binary file
assets/images/03.png DELETED
Binary file
assets/images/slider-arrow.png DELETED
Binary file
assets/images/upgrade.png DELETED
Binary file
assets/images/yith-woocommerce-zoom-magnifier-video.jpg DELETED
Binary file
assets/js/init.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(y){function k(){var t=location.href;return hashtag=-1!==t.indexOf("#prettyPhoto")&&decodeURI(t.substring(t.indexOf("#prettyPhoto")+1,t.length)),hashtag=hashtag&&hashtag.replace(/<|>/g,""),hashtag}function b(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==e?"":e[1]}y.prettyPhoto={version:"3.1.6"},y.fn.prettyPhoto=function(e){e=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> \t\t\t\t\t\t<div class="ppt">&nbsp;</div> \t\t\t\t\t\t<div class="pp_top"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_content_container"> \t\t\t\t\t\t\t<div class="pp_left"> \t\t\t\t\t\t\t<div class="pp_right"> \t\t\t\t\t\t\t\t<div class="pp_content"> \t\t\t\t\t\t\t\t\t<div class="pp_loaderIcon"></div> \t\t\t\t\t\t\t\t\t<div class="pp_fade"> \t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_expand" title="Expand the image">\t\t\t\t\t\t\t\t\t\t<div class="expand-button-hidden">\t<svg width="19px" height="19px" viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\t\t<defs>\t\t\t<rect id="path-1" x="0" y="0" width="30" height="30"></rect>\t\t</defs>\t\t<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\t\t\t<g id="Product-page---example-1" transform="translate(-940.000000, -1014.000000)">\t\t\t\t<g id="arrow-/-expand" transform="translate(934.500000, 1008.500000)">\t\t\t\t\t<mask id="mask-2" fill="white">\t\t\t\t\t\t<use xlink:href="#path-1"></use>\t\t\t\t\t</mask>\t\t\t\t\t<g id="arrow-/-expand-(Background/Mask)"></g>\t\t\t\t\t<path d="M21.25,8.75 L15,8.75 L15,6.25 L23.75,6.25 L23.740468,15.0000006 L21.25,15.0000006 L21.25,8.75 Z M8.75,21.25 L15,21.25 L15,23.75 L6.25,23.75 L6.25953334,14.9999988 L8.75,14.9999988 L8.75,21.25 Z" fill="#000000" mask="url(#mask-2)"></path>\t\t\t\t</g>\t\t\t</g>\t\t</g>\t</svg>\t</div></a> \t\t\t\t\t\t\t\t\t\t<div class="pp_hoverContainer"> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_next" href="#">next</a> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_previous" href="#">previous</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t<div id="pp_full_res"></div> \t\t\t\t\t\t\t\t\t\t<div class="pp_details"> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_nav"> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t\t\t\t\t<p class="currentTextHolder">0/0</p> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t\t<p class="pp_description"></p> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_social">{pp_social}</div> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_close" href="#">Close</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_bottom"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t<div> \t\t\t\t\t\t\t\t\t<ul> \t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t</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="https://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="https://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="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//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>'},e);var i,t,o,p,a,s,n,l=this,r=!1,d=y(window).height(),h=y(window).width();function c(){y(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(d/2-i.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:i.contentHeight,width:i.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:h/2-i.containerWidth/2<0?0:h/2-i.containerWidth/2,width:i.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(i.height).width(i.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==f(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(i.resized?y("a.pp_expand,a.pp_contract").show():y("a.pp_expand").hide()),!settings.autoplay_slideshow||n||t||y.prettyPhoto.startSlideshow(),settings.changepicturecallback(),t=!0}),isSet&&settings.overlay_gallery&&"image"==f(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((i.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,0==totalPage?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$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,y.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").off("mouseenter mouseleave"),e.ajaxcallback()}function _(t){$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(){y(".pp_loaderIcon").show(),t()})}function g(t,e){if(resized=!1,m(t,e),imageWidth=t,imageHeight=e,(h<s||d<a)&&doresize&&settings.allow_resize&&!r){for(resized=!0,fitting=!1;!fitting;)h<s?(imageWidth=h-200,imageHeight=e/t*imageWidth):d<a?(imageHeight=d-200,imageWidth=t/e*imageHeight):fitting=!0,a=imageHeight,s=imageWidth;(h<s||d<a)&&g(s,a),m(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(a),containerWidth:Math.floor(s)+2*settings.horizontal_padding,contentHeight:Math.floor(o),contentWidth:Math.floor(p),resized:resized}}function m(t,e){t=parseFloat(t),e=parseFloat(e),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(t),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(y("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(t),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(y("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),o=e+detailsHeight,p=t,a=o+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),s=t}function f(t){return t.match(/youtube\.com\/watch/i)||t.match(/youtu\.be/i)?"youtube":t.match(/vimeo\.com/i)?"vimeo":t.match(/\b.mov\b/i)?"quicktime":t.match(/\b.swf\b/i)?"flash":t.match(/\biframe=true\b/i)?"iframe":t.match(/\bajax=true\b/i)?"ajax":t.match(/\bcustom=true\b/i)?"custom":"#"==t.substr(0,1)?"inline":"image"}function u(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=v(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=d/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>d)return;$pp_pic_holder.css({top:projectedTop,left:h/2+scroll_pos.scrollLeft-contentwidth/2})}}function v(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function w(){if(settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href))),settings.markup=settings.markup.replace("{pp_social}",""),y("body").append(settings.markup),$pp_pic_holder=y(".pp_pic_holder"),$ppt=y(".ppt"),$pp_overlay=y("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="";for(var t=0;t<pp_images.length;t++)img_src=pp_images[t].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",pp_images[t]):(classname="default",""),toInject+="<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=y(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").on("click",function(){return y.prettyPhoto.changeGalleryPage("next"),y.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").on("click",function(){return y.prettyPhoto.changeGalleryPage("previous"),y.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").on("mouseenter",function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()}).on("mouseleave",function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(t){y(this).find("a").on("click",function(){return y.prettyPhoto.changePage(t),y.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").on("click",function(){return y.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:y(document).height(),width:y(window).width()}).on("click",function(){settings.modal||y.prettyPhoto.close()}),y("a.pp_close").on("click",function(){return y.prettyPhoto.close(),!1}),settings.allow_expand&&y("a.pp_expand").on("click",function(t){return doresize=y(this).hasClass("pp_expand")?(y(this).removeClass("pp_expand").addClass("pp_contract"),!1):(y(this).removeClass("pp_contract").addClass("pp_expand"),!0),_(function(){y.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").on("click",function(){return y.prettyPhoto.changePage("previous"),y.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").on("click",function(){return y.prettyPhoto.changePage("next"),y.prettyPhoto.stopSlideshow(),!1}),u()}return doresize=!0,scroll_pos=v(),y(window).off("resize.prettyphoto").on("resize.prettyphoto",function(){u(),d=y(window).height(),h=y(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(y(document).height()).width(h)}),e.keyboard_shortcuts&&y(document).off("keydown.prettyphoto").on("keydown.prettyphoto",function(t){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(t.keyCode){case 37:y.prettyPhoto.changePage("previous"),t.preventDefault();break;case 39:y.prettyPhoto.changePage("next"),t.preventDefault();break;case 27:settings.modal||y.prettyPhoto.close(),t.preventDefault()}}),y.prettyPhoto.initialize=function(){return settings=e,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=y(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?jQuery.map(l,function(t,e){if(-1!=y(t).attr(settings.hook).indexOf(theRel))return y(t).attr("href")}):y.makeArray(y(this).attr("href")),pp_titles=isSet?jQuery.map(l,function(t,e){if(-1!=y(t).attr(settings.hook).indexOf(theRel))return y(t).find("img").attr("alt")?y(t).find("img").attr("alt"):""}):y.makeArray(y(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(l,function(t,e){if(-1!=y(t).attr(settings.hook).indexOf(theRel))return y(t).attr("title")?y(t).attr("title"):""}):y.makeArray(y(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(y(this).attr("href"),pp_images),rel_index=isSet?set_position:y("a["+settings.hook+"^='"+theRel+"']").index(y(this)),w(),settings.allow_resize&&y(window).on("scroll.prettyphoto",function(){u()}),y.prettyPhoto.open(),!1},y.prettyPhoto.open=function(t){return"undefined"==typeof settings&&(settings=e,pp_images=y.makeArray(t),pp_titles=arguments[1]?y.makeArray(arguments[1]):y.makeArray(""),pp_descriptions=arguments[2]?y.makeArray(arguments[2]):y.makeArray(""),isSet=1<pp_images.length,set_position=arguments[3]||0,w(t.target)),settings.hideflash&&y("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),1<y(pp_images).length?y(".pp_nav").show():y(".pp_nav").hide(),y(".pp_loaderIcon").show(),settings.deeplinking&&"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/"),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)),$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+y(pp_images).length),"undefined"!=typeof pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(b("width",pp_images[set_position]))?b("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(b("height",pp_images[set_position]))?b("height",pp_images[set_position]):settings.default_height.toString(),r=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(y(window).height()*parseFloat(movie_height)/100-150),r=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(y(window).width()*parseFloat(movie_width)/100-150),r=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;"),imgPreloader="",skipInjection=!1,f(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position<y(pp_images).length-1&&(nextImage.src=pp_images[set_position+1]),prevImage=new Image,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(){i=g(imgPreloader.width,imgPreloader.height),c()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),y.prettyPhoto.close()},imgPreloader.src=pp_images[set_position];break;case"youtube":i=g(movie_width,movie_height),movie_id=b("v",pp_images[set_position]),""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],0<movie_id.indexOf("?")&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),0<movie_id.indexOf("&")&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="//www.youtube.com/embed/"+movie_id,b("rel",pp_images[set_position])?movie+="?rel="+b("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":i=g(movie_width,movie_height),movie_id=pp_images[set_position];var t=movie_id.match(/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/);movie="//player.vimeo.com/video/"+t[3]+"?title=0&amp;byline=0&amp;portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=i.width+"/embed/?moog_width="+i.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,i.height).replace(/{path}/g,movie);break;case"quicktime":(i=g(movie_width,movie_height)).height+=15,i.contentHeight+=15,i.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":i=g(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,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":i=g(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,i.width).replace(/{height}/g,i.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,i=g(movie_width,movie_height),doresize=!0,skipInjection=!0,y.get(pp_images[set_position],function(t){toInject=settings.inline_markup.replace(/{content}/g,t),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,c()});break;case"custom":i=g(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=y(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(y("body")).show(),doresize=!1,i=g(y(myClone).width(),y(myClone).height()),doresize=!0,y(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,y(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,c())}),!1},y.prettyPhoto.changePage=function(t){currentGalleryPage=0,"previous"==t?(set_position--,set_position<0&&(set_position=y(pp_images).length-1)):"next"==t?(set_position++,set_position>y(pp_images).length-1&&(set_position=0)):set_position=t,rel_index=set_position,doresize=doresize||!0,settings.allow_expand&&y(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),_(function(){y.prettyPhoto.open()})},y.prettyPhoto.changeGalleryPage=function(t){"next"==t?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==t?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=t,slide_speed="next"==t||"previous"==t?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},y.prettyPhoto.startSlideshow=function(){void 0===n?($pp_pic_holder.find(".pp_play").off("click").removeClass("pp_play").addClass("pp_pause").on("click",function(){return y.prettyPhoto.stopSlideshow(),!1}),n=setInterval(y.prettyPhoto.startSlideshow,settings.slideshow)):y.prettyPhoto.changePage("next")},y.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").off("click").removeClass("pp_pause").addClass("pp_play").on("click",function(){return y.prettyPhoto.startSlideshow(),!1}),clearInterval(n),n=undefined},y.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(y.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),y("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){y(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&y("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),y(this).remove(),y(window).off("scroll.prettyphoto"),-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto"),settings.callback(),doresize=!0,t=!1,delete settings}))},!pp_alreadyInitialized&&k()&&(pp_alreadyInitialized=!0,hashIndex=k(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){y("a["+e.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.off("click.prettyphoto").on("click.prettyphoto",y.prettyPhoto.initialize)}}(jQuery);var pp_alreadyInitialized=!1;
assets/js/init.prettyPhoto.js ADDED
@@ -0,0 +1,935 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ------------------------------------------------------------------------
2
+ Class: prettyPhoto
3
+ Use: Lightbox clone for jQuery
4
+ Author: Stephane Caron (http://www.no-margin-for-errors.com)
5
+ Version: 3.1.6
6
+ ------------------------------------------------------------------------- */
7
+ (function($) {
8
+ $.prettyPhoto = {version: '3.1.6'};
9
+
10
+ $.fn.prettyPhoto = function(pp_settings) {
11
+ pp_settings = jQuery.extend({
12
+ hook: 'rel', /* the attribute tag to use for prettyPhoto hooks. default: 'rel'. For HTML5, use "data-rel" or similar. */
13
+ animation_speed: 'fast', /* fast/slow/normal */
14
+ ajaxcallback: function() {},
15
+ slideshow: 5000, /* false OR interval time in ms */
16
+ autoplay_slideshow: false, /* true/false */
17
+ opacity: 0.80, /* Value between 0 and 1 */
18
+ show_title: true, /* true/false */
19
+ allow_resize: true, /* Resize the photos bigger than viewport. true/false */
20
+ allow_expand: true, /* Allow the user to expand a resized image. true/false */
21
+ default_width: 500,
22
+ default_height: 344,
23
+ counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
24
+ theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
25
+ horizontal_padding: 20, /* The padding on each side of the picture */
26
+ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
27
+ wmode: 'opaque', /* Set the flash wmode attribute */
28
+ autoplay: true, /* Automatically start videos: True/False */
29
+ modal: false, /* If set to true, only the close button will close the window */
30
+ deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */
31
+ overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
32
+ overlay_gallery_max: 30, /* Maximum number of pictures in the overlay gallery */
33
+ keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */
34
+ changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
35
+ callback: function(){}, /* Called when prettyPhoto is closed */
36
+ ie6_fallback: true,
37
+ markup: '<div class="pp_pic_holder"> \
38
+ <div class="ppt">&nbsp;</div> \
39
+ <div class="pp_top"> \
40
+ <div class="pp_left"></div> \
41
+ <div class="pp_middle"></div> \
42
+ <div class="pp_right"></div> \
43
+ </div> \
44
+ <div class="pp_content_container"> \
45
+ <div class="pp_left"> \
46
+ <div class="pp_right"> \
47
+ <div class="pp_content"> \
48
+ <div class="pp_loaderIcon"></div> \
49
+ <div class="pp_fade"> \
50
+ <a href="#" class="pp_expand" title="Expand the image">\
51
+ <div class="expand-button-hidden">\
52
+ \t<svg width="19px" height="19px" viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\
53
+ \t\t<defs>\
54
+ \t\t\t<rect id="path-1" x="0" y="0" width="30" height="30"></rect>\
55
+ \t\t</defs>\
56
+ \t\t<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
57
+ \t\t\t<g id="Product-page---example-1" transform="translate(-940.000000, -1014.000000)">\
58
+ \t\t\t\t<g id="arrow-/-expand" transform="translate(934.500000, 1008.500000)">\
59
+ \t\t\t\t\t<mask id="mask-2" fill="white">\
60
+ \t\t\t\t\t\t<use xlink:href="#path-1"></use>\
61
+ \t\t\t\t\t</mask>\
62
+ \t\t\t\t\t<g id="arrow-/-expand-(Background/Mask)"></g>\
63
+ \t\t\t\t\t<path d="M21.25,8.75 L15,8.75 L15,6.25 L23.75,6.25 L23.740468,15.0000006 L21.25,15.0000006 L21.25,8.75 Z M8.75,21.25 L15,21.25 L15,23.75 L6.25,23.75 L6.25953334,14.9999988 L8.75,14.9999988 L8.75,21.25 Z" fill="#000000" mask="url(#mask-2)"></path>\
64
+ \t\t\t\t</g>\
65
+ \t\t\t</g>\
66
+ \t\t</g>\
67
+ \t</svg>\
68
+ \t</div></a> \
69
+ <div class="pp_hoverContainer"> \
70
+ <a class="pp_next" href="#">next</a> \
71
+ <a class="pp_previous" href="#">previous</a> \
72
+ </div> \
73
+ <div id="pp_full_res"></div> \
74
+ <div class="pp_details"> \
75
+ <div class="pp_nav"> \
76
+ <a href="#" class="pp_arrow_previous">Previous</a> \
77
+ <p class="currentTextHolder">0/0</p> \
78
+ <a href="#" class="pp_arrow_next">Next</a> \
79
+ </div> \
80
+ <p class="pp_description"></p> \
81
+ <div class="pp_social">{pp_social}</div> \
82
+ <a class="pp_close" href="#">Close</a> \
83
+ </div> \
84
+ </div> \
85
+ </div> \
86
+ </div> \
87
+ </div> \
88
+ </div> \
89
+ <div class="pp_bottom"> \
90
+ <div class="pp_left"></div> \
91
+ <div class="pp_middle"></div> \
92
+ <div class="pp_right"></div> \
93
+ </div> \
94
+ </div> \
95
+ <div class="pp_overlay"></div>',
96
+ gallery_markup: '<div class="pp_gallery"> \
97
+ <a href="#" class="pp_arrow_previous">Previous</a> \
98
+ <div> \
99
+ <ul> \
100
+ {gallery} \
101
+ </ul> \
102
+ </div> \
103
+ <a href="#" class="pp_arrow_next">Next</a> \
104
+ </div>',
105
+ image_markup: '<img id="fullResImage" src="{path}" />',
106
+ 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>',
107
+ quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://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="https://www.apple.com/quicktime/download/"></embed></object>',
108
+ iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
109
+ inline_markup: '<div class="pp_inline">{content}</div>',
110
+ custom_markup: '',
111
+ social_tools: '<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//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>' /* html or false to disable */
112
+ }, pp_settings);
113
+
114
+ // Global variables accessible only by prettyPhoto
115
+ var matchedObjects = this, percentBased = false, pp_dimensions, pp_open,
116
+
117
+ // prettyPhoto container specific
118
+ pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth,
119
+
120
+ // Window size
121
+ windowHeight = $(window).height(), windowWidth = $(window).width(),
122
+
123
+ // Global elements
124
+ pp_slideshow;
125
+
126
+ doresize = true, scroll_pos = _get_scroll();
127
+
128
+ // Window/Keyboard events
129
+ $(window).off('resize.prettyphoto').on('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); });
130
+
131
+
132
+ if(pp_settings.keyboard_shortcuts) {
133
+ $(document).off('keydown.prettyphoto').on('keydown.prettyphoto',function(e){
134
+ if(typeof $pp_pic_holder != 'undefined'){
135
+ if($pp_pic_holder.is(':visible')){
136
+ switch(e.keyCode){
137
+ case 37:
138
+ $.prettyPhoto.changePage('previous');
139
+ e.preventDefault();
140
+ break;
141
+ case 39:
142
+ $.prettyPhoto.changePage('next');
143
+ e.preventDefault();
144
+ break;
145
+ case 27:
146
+ if(!settings.modal)
147
+ $.prettyPhoto.close();
148
+ e.preventDefault();
149
+ break;
150
+ };
151
+ // return false;
152
+ };
153
+ };
154
+ });
155
+ };
156
+
157
+ /**
158
+ * Initialize prettyPhoto.
159
+ */
160
+ $.prettyPhoto.initialize = function() {
161
+
162
+ settings = pp_settings;
163
+
164
+ if(settings.theme == 'pp_default') settings.horizontal_padding = 16;
165
+
166
+ // Find out if the picture is part of a set
167
+ theRel = $(this).attr(settings.hook);
168
+ galleryRegExp = /\[(?:.*)\]/;
169
+ isSet = (galleryRegExp.exec(theRel)) ? true : false;
170
+
171
+ // Put the SRCs, TITLEs, ALTs into an array.
172
+ 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'));
173
+ 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'));
174
+ 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'));
175
+
176
+ if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false;
177
+
178
+ set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned
179
+ rel_index = (isSet) ? set_position : $("a["+settings.hook+"^='"+theRel+"']").index($(this));
180
+
181
+ _build_overlay(this); // Build the overlay {this} being the caller
182
+
183
+ if(settings.allow_resize)
184
+ $(window).on('scroll.prettyphoto',function(){ _center_overlay(); });
185
+
186
+
187
+ $.prettyPhoto.open();
188
+
189
+
190
+ return false;
191
+ }
192
+
193
+
194
+ /**
195
+ * Opens the prettyPhoto modal box.
196
+ * @param image {String,Array} Full path to the image to be open, can also be an array containing full images paths.
197
+ * @param title {String,Array} The title to be displayed with the picture, can also be an array containing all the titles.
198
+ * @param description {String,Array} The description to be displayed with the picture, can also be an array containing all the descriptions.
199
+ */
200
+ $.prettyPhoto.open = function(event) {
201
+ if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables
202
+ settings = pp_settings;
203
+ pp_images = $.makeArray(arguments[0]);
204
+ pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray("");
205
+ pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray("");
206
+ isSet = (pp_images.length > 1) ? true : false;
207
+ set_position = (arguments[3])? arguments[3]: 0;
208
+ _build_overlay(event.target); // Build the overlay {this} being the caller
209
+ }
210
+
211
+ if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); // Hide the flash
212
+
213
+ _checkPosition($(pp_images).length); // Hide the next/previous links if on first or last images.
214
+
215
+ $('.pp_loaderIcon').show();
216
+
217
+ if(settings.deeplinking)
218
+ setHashtag();
219
+
220
+ // Rebuild Facebook Like Button with updated href
221
+ if(settings.social_tools){
222
+ facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
223
+ $pp_pic_holder.find('.pp_social').html(facebook_like_link);
224
+ }
225
+
226
+ // Fade the content in
227
+ if($ppt.is(':hidden')) $ppt.css('opacity',0).show();
228
+ $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);
229
+
230
+ // Display the current position
231
+ $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).length);
232
+
233
+ // Set the description
234
+ if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){
235
+ $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));
236
+ }else{
237
+ $pp_pic_holder.find('.pp_description').hide();
238
+ }
239
+
240
+ // Get the dimensions
241
+ movie_width = ( parseFloat(getParam('width',pp_images[set_position])) ) ? getParam('width',pp_images[set_position]) : settings.default_width.toString();
242
+ movie_height = ( parseFloat(getParam('height',pp_images[set_position])) ) ? getParam('height',pp_images[set_position]) : settings.default_height.toString();
243
+
244
+ // If the size is % based, calculate according to window dimensions
245
+ percentBased=false;
246
+ if(movie_height.indexOf('%') != -1) { movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased = true; }
247
+ if(movie_width.indexOf('%') != -1) { movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true; }
248
+
249
+ // Fade the holder
250
+ $pp_pic_holder.fadeIn(function(){
251
+ // Set the title
252
+ (settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html('&nbsp;');
253
+
254
+ imgPreloader = "";
255
+ skipInjection = false;
256
+
257
+ // Inject the proper content
258
+ switch(_getFileType(pp_images[set_position])){
259
+ case 'image':
260
+ imgPreloader = new Image();
261
+
262
+ // Preload the neighbour images
263
+ nextImage = new Image();
264
+ if(isSet && set_position < $(pp_images).length -1) nextImage.src = pp_images[set_position + 1];
265
+ prevImage = new Image();
266
+ if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1];
267
+
268
+ $pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup.replace(/{path}/g,pp_images[set_position]);
269
+
270
+ imgPreloader.onload = function(){
271
+ // Fit item to viewport
272
+ pp_dimensions = _fitToViewport(imgPreloader.width,imgPreloader.height);
273
+
274
+ _showContent();
275
+ };
276
+
277
+ imgPreloader.onerror = function(){
278
+ alert('Image cannot be loaded. Make sure the path is correct and image exist.');
279
+ $.prettyPhoto.close();
280
+ };
281
+
282
+ imgPreloader.src = pp_images[set_position];
283
+ break;
284
+
285
+ case 'youtube':
286
+ pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport
287
+
288
+ // Regular youtube link
289
+ movie_id = getParam('v',pp_images[set_position]);
290
+
291
+ // youtu.be link
292
+ if(movie_id == ""){
293
+ movie_id = pp_images[set_position].split('youtu.be/');
294
+ movie_id = movie_id[1];
295
+ if(movie_id.indexOf('?') > 0)
296
+ movie_id = movie_id.substr(0,movie_id.indexOf('?')); // Strip anything after the ?
297
+
298
+ if(movie_id.indexOf('&') > 0)
299
+ movie_id = movie_id.substr(0,movie_id.indexOf('&')); // Strip anything after the &
300
+ }
301
+
302
+ movie = '//www.youtube.com/embed/'+movie_id;
303
+ (getParam('rel',pp_images[set_position])) ? movie+="?rel="+getParam('rel',pp_images[set_position]) : movie+="?rel=1";
304
+
305
+ if(settings.autoplay) movie += "&autoplay=1";
306
+
307
+ 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);
308
+ break;
309
+
310
+ case 'vimeo':
311
+ pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport
312
+
313
+ movie_id = pp_images[set_position];
314
+ var regExp = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;
315
+ var match = movie_id.match(regExp);
316
+
317
+ movie = '//player.vimeo.com/video/'+ match[3] +'?title=0&amp;byline=0&amp;portrait=0';
318
+ if(settings.autoplay) movie += "&autoplay=1;";
319
+
320
+ vimeo_width = pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width'];
321
+
322
+ toInject = settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);
323
+ break;
324
+
325
+ case 'quicktime':
326
+ pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport
327
+ pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15; // Add space for the control bar
328
+
329
+ 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);
330
+ break;
331
+
332
+ case 'flash':
333
+ pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport
334
+
335
+ flash_vars = pp_images[set_position];
336
+ flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length);
337
+
338
+ filename = pp_images[set_position];
339
+ filename = filename.substring(0,filename.indexOf('?'));
340
+
341
+ 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);
342
+ break;
343
+
344
+ case 'iframe':
345
+ pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport
346
+
347
+ frame_url = pp_images[set_position];
348
+ frame_url = frame_url.substr(0,frame_url.indexOf('iframe')-1);
349
+
350
+ toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);
351
+ break;
352
+
353
+ case 'ajax':
354
+ doresize = false; // Make sure the dimensions are not resized.
355
+ pp_dimensions = _fitToViewport(movie_width,movie_height);
356
+ doresize = true; // Reset the dimensions
357
+
358
+ skipInjection = true;
359
+ $.get(pp_images[set_position],function(responseHTML){
360
+ toInject = settings.inline_markup.replace(/{content}/g,responseHTML);
361
+ $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject;
362
+ _showContent();
363
+ });
364
+
365
+ break;
366
+
367
+ case 'custom':
368
+ pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport
369
+
370
+ toInject = settings.custom_markup;
371
+ break;
372
+
373
+ case 'inline':
374
+ // to get the item height clone it, apply default width, wrap it in the prettyPhoto containers , then delete
375
+ 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();
376
+ doresize = false; // Make sure the dimensions are not resized.
377
+ pp_dimensions = _fitToViewport($(myClone).width(),$(myClone).height());
378
+ doresize = true; // Reset the dimensions
379
+ $(myClone).remove();
380
+ toInject = settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());
381
+ break;
382
+ };
383
+
384
+ if(!imgPreloader && !skipInjection){
385
+ $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject;
386
+
387
+ // Show content
388
+ _showContent();
389
+
390
+
391
+ };
392
+ });
393
+
394
+ return false;
395
+ };
396
+
397
+
398
+ /**
399
+ * Change page in the prettyPhoto modal box
400
+ * @param direction {String} Direction of the paging, previous or next.
401
+ */
402
+ $.prettyPhoto.changePage = function(direction){
403
+ currentGalleryPage = 0;
404
+
405
+ if(direction == 'previous') {
406
+ set_position--;
407
+ if (set_position < 0) set_position = $(pp_images).length-1;
408
+ }else if(direction == 'next'){
409
+ set_position++;
410
+ if(set_position > $(pp_images).length-1) set_position = 0;
411
+ }else{
412
+ set_position=direction;
413
+ };
414
+
415
+ rel_index = set_position;
416
+
417
+ if(!doresize) doresize = true; // Allow the resizing of the images
418
+ if(settings.allow_expand) {
419
+ $('.pp_contract').removeClass('pp_contract').addClass('pp_expand');
420
+ }
421
+
422
+ _hideContent(function(){ $.prettyPhoto.open(); });
423
+ };
424
+
425
+
426
+ /**
427
+ * Change gallery page in the prettyPhoto modal box
428
+ * @param direction {String} Direction of the paging, previous or next.
429
+ */
430
+ $.prettyPhoto.changeGalleryPage = function(direction){
431
+ if(direction=='next'){
432
+ currentGalleryPage ++;
433
+
434
+ if(currentGalleryPage > totalPage) currentGalleryPage = 0;
435
+ }else if(direction=='previous'){
436
+ currentGalleryPage --;
437
+
438
+ if(currentGalleryPage < 0) currentGalleryPage = totalPage;
439
+ }else{
440
+ currentGalleryPage = direction;
441
+ };
442
+
443
+ slide_speed = (direction == 'next' || direction == 'previous') ? settings.animation_speed : 0;
444
+
445
+ slide_to = currentGalleryPage * (itemsPerPage * itemWidth);
446
+
447
+ $pp_gallery.find('ul').animate({left:-slide_to},slide_speed);
448
+ };
449
+
450
+
451
+ /**
452
+ * Start the slideshow...
453
+ */
454
+ $.prettyPhoto.startSlideshow = function(){
455
+ if(typeof pp_slideshow == 'undefined'){
456
+ $pp_pic_holder.find('.pp_play').off('click').removeClass('pp_play').addClass('pp_pause').on( 'click', function(){
457
+ $.prettyPhoto.stopSlideshow();
458
+ return false;
459
+ });
460
+ pp_slideshow = setInterval($.prettyPhoto.startSlideshow,settings.slideshow);
461
+ }else{
462
+ $.prettyPhoto.changePage('next');
463
+ };
464
+ }
465
+
466
+
467
+ /**
468
+ * Stop the slideshow...
469
+ */
470
+ $.prettyPhoto.stopSlideshow = function(){
471
+ $pp_pic_holder.find('.pp_pause').off('click').removeClass('pp_pause').addClass('pp_play').on( 'click', function(){
472
+ $.prettyPhoto.startSlideshow();
473
+ return false;
474
+ });
475
+ clearInterval(pp_slideshow);
476
+ pp_slideshow=undefined;
477
+ }
478
+
479
+
480
+ /**
481
+ * Closes prettyPhoto.
482
+ */
483
+ $.prettyPhoto.close = function(){
484
+ if($pp_overlay.is(":animated")) return;
485
+
486
+ $.prettyPhoto.stopSlideshow();
487
+
488
+ $pp_pic_holder.stop().find('object,embed').css('visibility','hidden');
489
+
490
+ $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); });
491
+
492
+ $pp_overlay.fadeOut(settings.animation_speed, function(){
493
+
494
+ if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible'); // Show the flash
495
+
496
+ $(this).remove(); // No more need for the prettyPhoto markup
497
+
498
+ $(window).off('scroll.prettyphoto');
499
+
500
+ clearHashtag();
501
+
502
+ settings.callback();
503
+
504
+ doresize = true;
505
+
506
+ pp_open = false;
507
+
508
+ delete settings;
509
+ });
510
+ };
511
+
512
+ /**
513
+ * Set the proper sizes on the containers and animate the content in.
514
+ */
515
+ function _showContent(){
516
+ $('.pp_loaderIcon').hide();
517
+
518
+ // Calculate the opened top position of the pic holder
519
+ projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2));
520
+ if(projectedTop < 0) projectedTop = 0;
521
+
522
+ $ppt.fadeTo(settings.animation_speed,1);
523
+
524
+ // Resize the content holder
525
+ $pp_pic_holder.find('.pp_content')
526
+ .animate({
527
+ height:pp_dimensions['contentHeight'],
528
+ width:pp_dimensions['contentWidth']
529
+ },settings.animation_speed);
530
+
531
+ // Resize picture the holder
532
+ $pp_pic_holder.animate({
533
+ 'top': projectedTop,
534
+ 'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0 : (windowWidth/2) - (pp_dimensions['containerWidth']/2),
535
+ width:pp_dimensions['containerWidth']
536
+ },settings.animation_speed,function(){
537
+ $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);
538
+
539
+ $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); // Fade the new content
540
+
541
+ // Show the nav
542
+ if(isSet && _getFileType(pp_images[set_position])=="image") { $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); }
543
+
544
+ if(settings.allow_expand) {
545
+ if(pp_dimensions['resized']){ // Fade the resizing link if the image is resized
546
+ $('a.pp_expand,a.pp_contract').show();
547
+ }else{
548
+ $('a.pp_expand').hide();
549
+ }
550
+ }
551
+
552
+ if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow();
553
+
554
+ settings.changepicturecallback(); // Callback!
555
+
556
+ pp_open = true;
557
+ });
558
+
559
+ _insert_gallery();
560
+ pp_settings.ajaxcallback();
561
+
562
+ };
563
+
564
+ /**
565
+ * Hide the content...DUH!
566
+ */
567
+ function _hideContent(callback){
568
+ // Fade out the current picture
569
+ $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');
570
+ $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){
571
+ $('.pp_loaderIcon').show();
572
+
573
+ callback();
574
+ });
575
+ };
576
+
577
+ /**
578
+ * Check the item position in the gallery array, hide or show the navigation links
579
+ * @param setCount {integer} The total number of items in the set
580
+ */
581
+ function _checkPosition(setCount){
582
+ (setCount > 1) ? $('.pp_nav').show() : $('.pp_nav').hide(); // Hide the bottom nav if it's not a set.
583
+ };
584
+
585
+ /**
586
+ * Resize the item dimensions if it's bigger than the viewport
587
+ * @param width {integer} Width of the item to be opened
588
+ * @param height {integer} Height of the item to be opened
589
+ * @return An array containin the "fitted" dimensions
590
+ */
591
+ function _fitToViewport(width,height){
592
+ resized = false;
593
+
594
+ _getDimensions(width,height);
595
+
596
+ // Define them in case there's no resize needed
597
+ imageWidth = width, imageHeight = height;
598
+
599
+ if( ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) {
600
+ resized = true, fitting = false;
601
+
602
+ while (!fitting){
603
+ if((pp_containerWidth > windowWidth)){
604
+ imageWidth = (windowWidth - 200);
605
+ imageHeight = (height/width) * imageWidth;
606
+ }else if((pp_containerHeight > windowHeight)){
607
+ imageHeight = (windowHeight - 200);
608
+ imageWidth = (width/height) * imageHeight;
609
+ }else{
610
+ fitting = true;
611
+ };
612
+
613
+ pp_containerHeight = imageHeight, pp_containerWidth = imageWidth;
614
+ };
615
+
616
+
617
+
618
+ if((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)){
619
+ _fitToViewport(pp_containerWidth,pp_containerHeight)
620
+ };
621
+
622
+ _getDimensions(imageWidth,imageHeight);
623
+ };
624
+
625
+ return {
626
+ width:Math.floor(imageWidth),
627
+ height:Math.floor(imageHeight),
628
+ containerHeight:Math.floor(pp_containerHeight),
629
+ containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2),
630
+ contentHeight:Math.floor(pp_contentHeight),
631
+ contentWidth:Math.floor(pp_contentWidth),
632
+ resized:resized
633
+ };
634
+ };
635
+
636
+ /**
637
+ * Get the containers dimensions according to the item size
638
+ * @param width {integer} Width of the item to be opened
639
+ * @param height {integer} Height of the item to be opened
640
+ */
641
+ function _getDimensions(width,height){
642
+ width = parseFloat(width);
643
+ height = parseFloat(height);
644
+
645
+ // Get the details height, to do so, I need to clone it since it's invisible
646
+ $pp_details = $pp_pic_holder.find('.pp_details');
647
+ $pp_details.width(width);
648
+ detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom'));
649
+
650
+ $pp_details = $pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({
651
+ 'position':'absolute',
652
+ 'top':-10000
653
+ });
654
+ detailsHeight += $pp_details.height();
655
+ detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; // Min-height for the details
656
+ $pp_details.remove();
657
+
658
+ // Get the titles height, to do so, I need to clone it since it's invisible
659
+ $pp_title = $pp_pic_holder.find('.ppt');
660
+ $pp_title.width(width);
661
+ titleHeight = parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom'));
662
+ $pp_title = $pp_title.clone().appendTo($('body')).css({
663
+ 'position':'absolute',
664
+ 'top':-10000
665
+ });
666
+ titleHeight += $pp_title.height();
667
+ $pp_title.remove();
668
+
669
+ // Get the container size, to resize the holder to the right dimensions
670
+ pp_contentHeight = height + detailsHeight;
671
+ pp_contentWidth = width;
672
+ pp_containerHeight = pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height();
673
+ pp_containerWidth = width;
674
+ }
675
+
676
+ function _getFileType(itemSrc){
677
+ if (itemSrc.match(/youtube\.com\/watch/i) || itemSrc.match(/youtu\.be/i)) {
678
+ return 'youtube';
679
+ }else if (itemSrc.match(/vimeo\.com/i)) {
680
+ return 'vimeo';
681
+ }else if(itemSrc.match(/\b.mov\b/i)){
682
+ return 'quicktime';
683
+ }else if(itemSrc.match(/\b.swf\b/i)){
684
+ return 'flash';
685
+ }else if(itemSrc.match(/\biframe=true\b/i)){
686
+ return 'iframe';
687
+ }else if(itemSrc.match(/\bajax=true\b/i)){
688
+ return 'ajax';
689
+ }else if(itemSrc.match(/\bcustom=true\b/i)){
690
+ return 'custom';
691
+ }else if(itemSrc.substr(0,1) == '#'){
692
+ return 'inline';
693
+ }else{
694
+ return 'image';
695
+ };
696
+ };
697
+
698
+ function _center_overlay(){
699
+ if(doresize && typeof $pp_pic_holder != 'undefined') {
700
+ scroll_pos = _get_scroll();
701
+ contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width();
702
+
703
+ projectedTop = (windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2);
704
+ if(projectedTop < 0) projectedTop = 0;
705
+
706
+ if(contentHeight > windowHeight)
707
+ return;
708
+
709
+ $pp_pic_holder.css({
710
+ 'top': projectedTop,
711
+ 'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2)
712
+ });
713
+ };
714
+ };
715
+
716
+ function _get_scroll(){
717
+ if (self.pageYOffset) {
718
+ return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};
719
+ } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
720
+ return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};
721
+ } else if (document.body) {// all other Explorers
722
+ return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};
723
+ };
724
+ };
725
+
726
+ function _resize_overlay() {
727
+ windowHeight = $(window).height(), windowWidth = $(window).width();
728
+
729
+ if(typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()).width(windowWidth);
730
+ };
731
+
732
+ function _insert_gallery(){
733
+ if(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image") {
734
+ itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.
735
+ navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme
736
+
737
+ itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth);
738
+ itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length;
739
+ totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1;
740
+
741
+ // Hide the nav in the case there's no need for links
742
+ if(totalPage == 0){
743
+ navWidth = 0; // No nav means no width!
744
+ $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();
745
+ }else{
746
+ $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();
747
+ };
748
+
749
+ galleryWidth = itemsPerPage * itemWidth;
750
+ fullGalleryWidth = pp_images.length * itemWidth;
751
+
752
+ // Set the proper width to the gallery items
753
+ $pp_gallery
754
+ .css('margin-left',-((galleryWidth/2) + (navWidth/2)))
755
+ .find('div:first').width(galleryWidth+5)
756
+ .find('ul').width(fullGalleryWidth)
757
+ .find('li.selected').removeClass('selected');
758
+
759
+ goToPage = (Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage) : totalPage;
760
+
761
+ $.prettyPhoto.changeGalleryPage(goToPage);
762
+
763
+ $pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');
764
+ }else{
765
+ $pp_pic_holder.find('.pp_content').off('mouseenter mouseleave');
766
+ // $pp_gallery.hide();
767
+ }
768
+ }
769
+
770
+ function _build_overlay(caller){
771
+ // Inject Social Tool markup into General markup
772
+ if(settings.social_tools)
773
+ facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
774
+
775
+ settings.markup = settings.markup.replace('{pp_social}','');
776
+
777
+ $('body').append(settings.markup); // Inject the markup
778
+
779
+ $pp_pic_holder = $('.pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); // Set my global selectors
780
+
781
+ // Inject the inline gallery!
782
+ if(isSet && settings.overlay_gallery) {
783
+ currentGalleryPage = 0;
784
+ toInject = "";
785
+ for (var i=0; i < pp_images.length; i++) {
786
+ if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){
787
+ classname = 'default';
788
+ img_src = '';
789
+ }else{
790
+ classname = '';
791
+ img_src = pp_images[i];
792
+ }
793
+ toInject += "<li class='"+classname+"'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>";
794
+ };
795
+
796
+ toInject = settings.gallery_markup.replace(/{gallery}/g,toInject);
797
+
798
+ $pp_pic_holder.find('#pp_full_res').after(toInject);
799
+
800
+ $pp_gallery = $('.pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors
801
+
802
+ $pp_gallery.find('.pp_arrow_next').on( 'click', function(){
803
+ $.prettyPhoto.changeGalleryPage('next');
804
+ $.prettyPhoto.stopSlideshow();
805
+ return false;
806
+ });
807
+
808
+ $pp_gallery.find('.pp_arrow_previous').on( 'click', function(){
809
+ $.prettyPhoto.changeGalleryPage('previous');
810
+ $.prettyPhoto.stopSlideshow();
811
+ return false;
812
+ });
813
+
814
+ $pp_pic_holder.find('.pp_content').on( 'mouseenter',
815
+ function(){
816
+ $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();
817
+ } ).on( 'mouseleave',
818
+ function(){
819
+ $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();
820
+ });
821
+
822
+ itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.
823
+ $pp_gallery_li.each(function(i){
824
+ $(this)
825
+ .find('a')
826
+ .on( 'click', function(){
827
+ $.prettyPhoto.changePage(i);
828
+ $.prettyPhoto.stopSlideshow();
829
+ return false;
830
+ });
831
+ });
832
+ };
833
+
834
+
835
+ // Inject the play/pause if it's a slideshow
836
+ if(settings.slideshow){
837
+ $pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
838
+ $pp_pic_holder.find('.pp_nav .pp_play').on( 'click', function(){
839
+ $.prettyPhoto.startSlideshow();
840
+ return false;
841
+ });
842
+ }
843
+
844
+ $pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); // Set the proper theme
845
+
846
+ $pp_overlay
847
+ .css({
848
+ 'opacity':0,
849
+ 'height':$(document).height(),
850
+ 'width':$(window).width()
851
+ })
852
+ .on('click',function(){
853
+ if(!settings.modal) $.prettyPhoto.close();
854
+ });
855
+
856
+ $('a.pp_close').on('click',function(){ $.prettyPhoto.close(); return false; });
857
+
858
+
859
+ if(settings.allow_expand) {
860
+ $('a.pp_expand').on('click',function(e){
861
+ // Expand the image
862
+ if($(this).hasClass('pp_expand')){
863
+ $(this).removeClass('pp_expand').addClass('pp_contract');
864
+ doresize = false;
865
+ }else{
866
+ $(this).removeClass('pp_contract').addClass('pp_expand');
867
+ doresize = true;
868
+ };
869
+
870
+ _hideContent(function(){ $.prettyPhoto.open(); });
871
+
872
+ return false;
873
+ });
874
+ }
875
+
876
+ $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').on('click',function(){
877
+ $.prettyPhoto.changePage('previous');
878
+ $.prettyPhoto.stopSlideshow();
879
+ return false;
880
+ });
881
+
882
+ $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').on('click',function(){