Shortcodes by Angie Makes - Version 1.94

Version Description

Download this release

Release Info

Developer cbaldelomar
Plugin Icon wp plugin Shortcodes by Angie Makes
Version 1.94
Comparing to
See all releases

Code changes from version 1.93 to 1.94

README.md CHANGED
@@ -66,6 +66,12 @@ Use the shortcode manager in the TinyMCE text editor
66
 
67
  ## Changelog ##
68
 
 
 
 
 
 
 
69
  ### Version 1.93
70
 
71
  * added ability for themes to disable share buttons filter
66
 
67
  ## Changelog ##
68
 
69
+ ### Version 1.94
70
+
71
+ * Added post_slider shortcode
72
+ * Added text selection to shortcode inserts
73
+ * Fixed bug with width of social icon square
74
+
75
  ### Version 1.93
76
 
77
  * added ability for themes to disable share buttons filter
includes/css/style.css CHANGED
@@ -815,37 +815,37 @@
815
  .wc-shortcodes-social-icons.wc-shortcodes-maxheight-68 img { max-height: 68px; }
816
  .wc-shortcodes-social-icons.wc-shortcodes-maxheight-70 img { max-height: 70px; }
817
 
818
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-10 i { font-size: 5px; line-height: 10px; height: 10px; width: auto; }
819
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-12 i { font-size: 6px; line-height: 12px; height: 12px; width: auto; }
820
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-14 i { font-size: 7px; line-height: 14px; height: 14px; width: auto; }
821
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-16 i { font-size: 8px; line-height: 16px; height: 16px; width: auto; }
822
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-18 i { font-size: 9px; line-height: 18px; height: 18px; width: auto; }
823
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-20 i { font-size: 10px; line-height: 20px; height: 20px; width: auto; }
824
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-22 i { font-size: 11px; line-height: 22px; height: 22px; width: auto; }
825
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-24 i { font-size: 12px; line-height: 24px; height: 24px; width: auto; }
826
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-26 i { font-size: 13px; line-height: 26px; height: 26px; width: auto; }
827
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-28 i { font-size: 14px; line-height: 28px; height: 28px; width: auto; }
828
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-30 i { font-size: 15px; line-height: 30px; height: 30px; width: auto; }
829
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-32 i { font-size: 16px; line-height: 32px; height: 32px; width: auto; }
830
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-34 i { font-size: 17px; line-height: 34px; height: 34px; width: auto; }
831
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-36 i { font-size: 18px; line-height: 36px; height: 36px; width: auto; }
832
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-38 i { font-size: 19px; line-height: 38px; height: 38px; width: auto; }
833
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-40 i { font-size: 20px; line-height: 40px; height: 40px; width: auto; }
834
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-42 i { font-size: 11px; line-height: 42px; height: 42px; width: auto; }
835
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-44 i { font-size: 22px; line-height: 44px; height: 44px; width: auto; }
836
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-46 i { font-size: 23px; line-height: 46px; height: 46px; width: auto; }
837
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-48 i { font-size: 24px; line-height: 48px; height: 48px; width: auto; }
838
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-50 i { font-size: 25px; line-height: 50px; height: 50px; width: auto; }
839
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-52 i { font-size: 26px; line-height: 52px; height: 52px; width: auto; }
840
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-54 i { font-size: 27px; line-height: 54px; height: 54px; width: auto; }
841
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-56 i { font-size: 28px; line-height: 56px; height: 56px; width: auto; }
842
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-58 i { font-size: 29px; line-height: 58px; height: 58px; width: auto; }
843
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-60 i { font-size: 30px; line-height: 60px; height: 60px; width: auto; }
844
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-62 i { font-size: 31px; line-height: 62px; height: 62px; width: auto; }
845
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-64 i { font-size: 32px; line-height: 64px; height: 64px; width: auto; }
846
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-66 i { font-size: 33px; line-height: 66px; height: 66px; width: auto; }
847
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-68 i { font-size: 34px; line-height: 68px; height: 68px; width: auto; }
848
- .wc-shortcodes-social-icons.wc-shortcodes-maxheight-70 i { font-size: 35px; line-height: 70px; height: 70px; width: auto; }
849
 
850
  .wc-shortcodes-social-icons li:first-child {
851
  margin-left: 0;
@@ -1818,6 +1818,125 @@ pre.pre-wrap {
1818
  margin-right: 0;
1819
  }
1820
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1821
 
1822
  /**
1823
  * [wc_image]
815
  .wc-shortcodes-social-icons.wc-shortcodes-maxheight-68 img { max-height: 68px; }
816
  .wc-shortcodes-social-icons.wc-shortcodes-maxheight-70 img { max-height: 70px; }
817
 
818
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-10 i { font-size: 5px; line-height: 10px; height: 10px; width: 10px; }
819
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-12 i { font-size: 6px; line-height: 12px; height: 12px; width: 12px; }
820
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-14 i { font-size: 7px; line-height: 14px; height: 14px; width: 14px; }
821
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-16 i { font-size: 8px; line-height: 16px; height: 16px; width: 16px; }
822
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-18 i { font-size: 9px; line-height: 18px; height: 18px; width: 18px; }
823
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-20 i { font-size: 10px; line-height: 20px; height: 20px; width: 20px; }
824
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-22 i { font-size: 11px; line-height: 22px; height: 22px; width: 22px; }
825
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-24 i { font-size: 12px; line-height: 24px; height: 24px; width: 24px; }
826
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-26 i { font-size: 13px; line-height: 26px; height: 26px; width: 26px; }
827
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-28 i { font-size: 14px; line-height: 28px; height: 28px; width: 28px; }
828
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-30 i { font-size: 15px; line-height: 30px; height: 30px; width: 30px; }
829
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-32 i { font-size: 16px; line-height: 32px; height: 32px; width: 32px; }
830
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-34 i { font-size: 17px; line-height: 34px; height: 34px; width: 34px; }
831
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-36 i { font-size: 18px; line-height: 36px; height: 36px; width: 36px; }
832
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-38 i { font-size: 19px; line-height: 38px; height: 38px; width: 38px; }
833
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-40 i { font-size: 20px; line-height: 40px; height: 40px; width: 40px; }
834
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-42 i { font-size: 11px; line-height: 42px; height: 42px; width: 42px; }
835
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-44 i { font-size: 22px; line-height: 44px; height: 44px; width: 44px; }
836
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-46 i { font-size: 23px; line-height: 46px; height: 46px; width: 46px; }
837
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-48 i { font-size: 24px; line-height: 48px; height: 48px; width: 48px; }
838
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-50 i { font-size: 25px; line-height: 50px; height: 50px; width: 50px; }
839
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-52 i { font-size: 26px; line-height: 52px; height: 52px; width: 52px; }
840
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-54 i { font-size: 27px; line-height: 54px; height: 54px; width: 54px; }
841
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-56 i { font-size: 28px; line-height: 56px; height: 56px; width: 56px; }
842
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-58 i { font-size: 29px; line-height: 58px; height: 58px; width: 58px; }
843
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-60 i { font-size: 30px; line-height: 60px; height: 60px; width: 60px; }
844
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-62 i { font-size: 31px; line-height: 62px; height: 62px; width: 62px; }
845
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-64 i { font-size: 32px; line-height: 64px; height: 64px; width: 64px; }
846
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-66 i { font-size: 33px; line-height: 66px; height: 66px; width: 66px; }
847
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-68 i { font-size: 34px; line-height: 68px; height: 68px; width: 68px; }
848
+ .wc-shortcodes-social-icons.wc-shortcodes-maxheight-70 i { font-size: 35px; line-height: 70px; height: 70px; width: 70px; }
849
 
850
  .wc-shortcodes-social-icons li:first-child {
851
  margin-left: 0;
1818
  margin-right: 0;
1819
  }
1820
  }
1821
+ /**
1822
+ * [wc_post_slider]
1823
+ * ----------------------------------------------------------------------------
1824
+ */
1825
+ .wc-shortcodes-post-slider-wrapper {
1826
+ height: 0;
1827
+ overflow: hidden;
1828
+ position: relative;
1829
+ }
1830
+ .wc-shortcodes-post-slider-wrapper .bx-wrapper {
1831
+ -moz-box-shadow: none;
1832
+ -webkit-box-shadow: none;
1833
+ box-shadow: none;
1834
+ background: transparent;
1835
+ }
1836
+ .wc-shortcodes-post-slide {
1837
+ background-size: cover;
1838
+ background-position: center;
1839
+ background-repeat: no-repeat;
1840
+ background-color: #cccccc;
1841
+ }
1842
+ .wc-shortcodes-post-slide-border {
1843
+ display: table;
1844
+ table-layout: fixed;
1845
+ width: 100%;
1846
+ height: 100%;
1847
+ }
1848
+ .wc-shortcodes-post-slide-content {
1849
+ height: 100%;
1850
+ display: table-cell;
1851
+ vertical-align: middle;
1852
+ text-align: center;
1853
+ border-width: 0;
1854
+ }
1855
+ .wc-shortcodes-post-slider-wrapper * {
1856
+ color: inherit !important;
1857
+ border-color: inherit !important;
1858
+ }
1859
+ .wc-shortcodes-post-slide-content-inner {
1860
+ max-width: 600px;
1861
+ margin-left: auto;
1862
+ margin-right: auto;
1863
+ padding: 1.5em;
1864
+ /* background-color: rgba(0, 0, 0, 0.3); */
1865
+ }
1866
+ /* DIRECTION CONTROLS (NEXT / PREV) */
1867
+ .bx-wrapper .bx-controls-direction a {
1868
+ position: absolute;
1869
+ top: 50%;
1870
+ margin-top: -17px;
1871
+ outline: 0;
1872
+ width: 34px;
1873
+ height: 34px;
1874
+ line-height: 30px;
1875
+ z-index: 9999;
1876
+ border: 2px solid #ffffff;
1877
+ border-radius: 9999px;
1878
+ text-align:center;
1879
+ opacity: 0;
1880
+ }
1881
+ .bx-wrapper .bx-controls-direction a.disabled {
1882
+ display: none;
1883
+ }
1884
+ .bx-wrapper .bx-prev {
1885
+ left: 10px;
1886
+ left: 0.625rem;
1887
+ }
1888
+ .bx-wrapper .bx-prev i {
1889
+ padding-right: 2px;
1890
+ }
1891
+ .bx-wrapper .bx-prev:hover,
1892
+ .bx-wrapper .bx-prev:focus {
1893
+ }
1894
+ .bx-wrapper .bx-next {
1895
+ right: 10px;
1896
+ right: 0.625rem;
1897
+ }
1898
+ .bx-wrapper .bx-next i {
1899
+ padding-left: 2px;
1900
+ }
1901
+ .bx-wrapper .bx-next:hover,
1902
+ .bx-wrapper .bx-next:focus {
1903
+ }
1904
+ .bx-wrapper:hover .bx-controls-direction a {
1905
+ opacity: 1;
1906
+ }
1907
+ .wc-shortcodes-read-more {
1908
+ display: block;
1909
+ }
1910
+ .wc-shortcodes-post-slide-button {
1911
+ padding: 0.625em 0.8125em;
1912
+ border-width: 2px;
1913
+ border-style: solid;
1914
+ text-decoration: none;
1915
+ display: inline-block;
1916
+ }
1917
+ .wc-shortcodes-post-slide-button:hover {
1918
+ text-decoration: none;
1919
+ }
1920
+ .wc-shortcodes-cat-posted-text {
1921
+ display: none;
1922
+ }
1923
+ .wc-shortcodes-post-slider .wc-shortcodes-post-slide a {
1924
+ text-decoration: none;
1925
+ box-shadow: none;
1926
+ }
1927
+ @media (max-width: 990px) {
1928
+ .wc-shortcodes-post-slide-content-inner {
1929
+ max-width: 80%;
1930
+ }
1931
+ }
1932
+ @media (max-width: 767px) {
1933
+ .wc-shortcodes-post-slider-wrapper .wc-shortcodes-post-slide-content-inner {
1934
+ max-width: none;
1935
+ }
1936
+ .wc-shortcodes-post-slider-wrapper .wc-shortcodes-entry-summary {
1937
+ display: none;
1938
+ }
1939
+ }
1940
 
1941
  /**
1942
  * [wc_image]
includes/functions.php CHANGED
@@ -444,3 +444,17 @@ function wc_shortcodes_share_buttons_filters() {
444
  }
445
  add_action( 'wp', 'wc_shortcodes_share_buttons_filters', 11 );
446
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  }
445
  add_action( 'wp', 'wc_shortcodes_share_buttons_filters', 11 );
446
 
447
+ function wc_shortcodes_get_posted_category() {
448
+ $html = null;
449
+ $cats = get_the_category_list( ', ' );
450
+
451
+ if ( ! empty( $cats ) ) {
452
+ $html .= '<div class="wc-shortcodes-entry-category">';
453
+ if ( ! empty( $cats ) ) {
454
+ $html .= '<span class="wc-shortcodes-cat-posted-text">' . __( 'Posted in', 'wpcanvas2' ) . ' </span><span class="wc-shortcodes-post-in-cat-links">' . $cats . '</span>';
455
+ }
456
+ $html .= '</div>';
457
+ }
458
+
459
+ return $html;
460
+ }
includes/js/post-slider.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ) {
2
+ "use strict";
3
+
4
+ $(document).ready(function(){
5
+ $('.wc-shortcodes-post-slider').bxSlider({
6
+ 'pager' : false,
7
+ 'mode' : 'fade',
8
+ 'nextText' : "<i class='fa fa-angle-right'></i>",
9
+ 'prevText' : "<i class='fa fa-angle-left'></i>",
10
+ 'onSliderLoad' : function() {
11
+ $(this).parent().parent().parent('.wc-shortcodes-post-slider-wrapper').css('height', 'auto');
12
+ }
13
+ });
14
+ });
15
+ } )( jQuery );
includes/mce/js/shortcodes-tinymce-4.js CHANGED
@@ -4,15 +4,27 @@
4
  var wcShortcodeManager = function(editor, url) {
5
  var wcDummyContent = 'Sample Content';
6
  var wcParagraphContent = '<p>Sample Content</p>';
7
-
8
 
9
  editor.addButton('wpc_shortcodes_button', function() {
 
10
  return {
11
  title: "",
12
  text: "[ ]",
13
  image: url + "/images/shortcodes.png",
14
  type: 'menubutton',
15
  icons: false,
 
 
 
 
 
 
 
 
 
 
 
16
  menu: [
17
  {
18
  text: 'Columns',
@@ -20,61 +32,61 @@
20
  {
21
  text: "1/2 + 1/2",
22
  onclick: function(){
23
- editor.insertContent('[wc_row][wc_column size="one-half" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
24
  }
25
  },
26
  {
27
  text: "1/3 + 1/3 + 1/3",
28
  onclick: function(){
29
- editor.insertContent('[wc_row][wc_column size="one-third" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
30
  }
31
  },
32
  {
33
  text: "1/3 + 2/3",
34
  onclick: function(){
35
- editor.insertContent('[wc_row][wc_column size="one-third" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="two-third" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
36
  }
37
  },
38
  {
39
  text: "2/3 + 1/3",
40
  onclick: function(){
41
- editor.insertContent('[wc_row][wc_column size="two-third" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
42
  }
43
  },
44
  {
45
  text: "1/4 + 1/4 + 1/4 + 1/4",
46
  onclick: function(){
47
- editor.insertContent('[wc_row][wc_column size="one-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
48
  }
49
  },
50
  {
51
  text: "1/4 + 1/2 + 1/4",
52
  onclick: function(){
53
- editor.insertContent('[wc_row][wc_column size="one-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
54
  }
55
  },
56
  {
57
  text: "1/2 + 1/4 + 1/4",
58
  onclick: function(){
59
- editor.insertContent('[wc_row][wc_column size="one-half" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
60
  }
61
  },
62
  {
63
  text: "1/4 + 1/4 + 1/2",
64
  onclick: function(){
65
- editor.insertContent('[wc_row][wc_column size="one-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
66
  }
67
  },
68
  {
69
  text: "1/4 + 3/4",
70
  onclick: function(){
71
- editor.insertContent('[wc_row][wc_column size="one-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="three-fourth" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
72
  }
73
  },
74
  {
75
  text: "3/4 + 1/4",
76
  onclick: function(){
77
- editor.insertContent('[wc_row][wc_column size="three-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '[/wc_column][/wc_row]');
78
  }
79
  }
80
  ]
@@ -184,6 +196,12 @@
184
  onclick: function(){
185
  editor.insertContent('[wc_posts author="" author_name="" p="" post__in="" order="DESC" orderby="date" post_status="publish" post_type="post" posts_per_page="10" taxonomy="" field="slug" terms="" title="yes" meta_all="yes" meta_author="yes" meta_date="yes" date_format="M j, Y" meta_comments="yes" thumbnail="yes" content="yes" paging="yes" size="wccarousel" filtering="yes" columns="3" gutter_space="40" heading_type="h2" layout="grid" template="borderless" excerpt_length="15"][/wc_posts]');
186
  }
 
 
 
 
 
 
187
  }
188
  ]
189
  },
@@ -322,13 +340,13 @@
322
  {
323
  text: "Accordion",
324
  onclick: function(){
325
- editor.insertContent('[wc_accordion collapse="0" leaveopen="0" layout="box"]<p>[wc_accordion_section title="Section 1"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p><p>[wc_accordion_section title="Section 2"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p>[/wc_accordion]');
326
  }
327
  },
328
  {
329
  text: "Tabs",
330
  onclick: function(){
331
- editor.insertContent('[wc_tabgroup layout="box"]<p>[wc_tab title="First Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab]</p><p>[wc_tab title="Second Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab]</p>[/wc_tabgroup]');
332
  }
333
  },
334
  {
4
  var wcShortcodeManager = function(editor, url) {
5
  var wcDummyContent = 'Sample Content';
6
  var wcParagraphContent = '<p>Sample Content</p>';
7
+ var wcDummyParagraphContent = '<p>Sample Content</p>';
8
 
9
  editor.addButton('wpc_shortcodes_button', function() {
10
+
11
  return {
12
  title: "",
13
  text: "[ ]",
14
  image: url + "/images/shortcodes.png",
15
  type: 'menubutton',
16
  icons: false,
17
+ onclick: function() {
18
+ var mceSelected = editor.selection.getContent({format: 'text'});
19
+ if ( mceSelected ) {
20
+ wcDummyContent = mceSelected;
21
+ wcParagraphContent = '<p>' + mceSelected + '</p>';
22
+ }
23
+ else {
24
+ wcDummyContent = 'Sample Content';
25
+ wcParagraphContent = '<p>Sample Content</p>';
26
+ }
27
+ },
28
  menu: [
29
  {
30
  text: 'Columns',
32
  {
33
  text: "1/2 + 1/2",
34
  onclick: function(){
35
+ editor.insertContent('[wc_row][wc_column size="one-half" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
36
  }
37
  },
38
  {
39
  text: "1/3 + 1/3 + 1/3",
40
  onclick: function(){
41
+ editor.insertContent('[wc_row][wc_column size="one-third" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third"]</p>' + wcDummyParagraphContent + '<p>[/wc_column][wc_column size="one-third" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
42
  }
43
  },
44
  {
45
  text: "1/3 + 2/3",
46
  onclick: function(){
47
+ editor.insertContent('[wc_row][wc_column size="one-third" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="two-third" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
48
  }
49
  },
50
  {
51
  text: "2/3 + 1/3",
52
  onclick: function(){
53
+ editor.insertContent('[wc_row][wc_column size="two-third" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
54
  }
55
  },
56
  {
57
  text: "1/4 + 1/4 + 1/4 + 1/4",
58
  onclick: function(){
59
+ editor.insertContent('[wc_row][wc_column size="one-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcDummyParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcDummyParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
60
  }
61
  },
62
  {
63
  text: "1/4 + 1/2 + 1/4",
64
  onclick: function(){
65
+ editor.insertContent('[wc_row][wc_column size="one-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half"]</p>' + wcDummyParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
66
  }
67
  },
68
  {
69
  text: "1/2 + 1/4 + 1/4",
70
  onclick: function(){
71
+ editor.insertContent('[wc_row][wc_column size="one-half" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcDummyParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
72
  }
73
  },
74
  {
75
  text: "1/4 + 1/4 + 1/2",
76
  onclick: function(){
77
+ editor.insertContent('[wc_row][wc_column size="one-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcDummyParagraphContent + '<p>[/wc_column][wc_column size="one-half" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
78
  }
79
  },
80
  {
81
  text: "1/4 + 3/4",
82
  onclick: function(){
83
+ editor.insertContent('[wc_row][wc_column size="one-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="three-fourth" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
84
  }
85
  },
86
  {
87
  text: "3/4 + 1/4",
88
  onclick: function(){
89
+ editor.insertContent('[wc_row][wc_column size="three-fourth" position="first"]' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcDummyParagraphContent + '[/wc_column][/wc_row]');
90
  }
91
  }
92
  ]
196
  onclick: function(){
197
  editor.insertContent('[wc_posts author="" author_name="" p="" post__in="" order="DESC" orderby="date" post_status="publish" post_type="post" posts_per_page="10" taxonomy="" field="slug" terms="" title="yes" meta_all="yes" meta_author="yes" meta_date="yes" date_format="M j, Y" meta_comments="yes" thumbnail="yes" content="yes" paging="yes" size="wccarousel" filtering="yes" columns="3" gutter_space="40" heading_type="h2" layout="grid" template="borderless" excerpt_length="15"][/wc_posts]');
198
  }
199
+ },
200
+ {
201
+ text: "Post Slider",
202
+ onclick: function(){
203
+ editor.insertContent('[wc_post_slider author="" author_name="" p="" post__in="" order="DESC" orderby="name" post_status="publish" post_type="post" posts_per_page="10" taxonomy="" field="slug" terms="" meta_category="yes" title="yes" content="yes" readmore="Continue Reading" size="full" heading_type="h2" heading_size="30" mobile_heading_size="24" excerpt_length="30" desktop_height="600" laptop_height="500" mobile_height="350" text_color="#ffffff"][/wc_post_slider]');
204
+ }
205
  }
206
  ]
207
  },
340
  {
341
  text: "Accordion",
342
  onclick: function(){
343
+ editor.insertContent('[wc_accordion collapse="0" leaveopen="0" layout="box"]<p>[wc_accordion_section title="Section 1"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p><p>[wc_accordion_section title="Section 2"]</p>' + wcDummyParagraphContent + '<p>[/wc_accordion_section]</p>[/wc_accordion]');
344
  }
345
  },
346
  {
347
  text: "Tabs",
348
  onclick: function(){
349
+ editor.insertContent('[wc_tabgroup layout="box"]<p>[wc_tab title="First Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab]</p><p>[wc_tab title="Second Tab"]</p>'+wcDummyParagraphContent+'<p>[/wc_tab]</p>[/wc_tabgroup]');
350
  }
351
  },
352
  {
includes/scripts.php CHANGED
@@ -26,6 +26,9 @@ if( ! function_exists('wc_shortcodes_scripts') ) :
26
 
27
  // slider
28
  wp_register_script( 'wordpresscanvas-rslides', plugin_dir_url( __FILE__ ) . 'js/responsiveslides.min.js', array ( 'jquery' ), '1.54', true );
 
 
 
29
 
30
  // posts
31
  wp_register_script( 'wc-shortcodes-posts', plugin_dir_url( __FILE__ ) . 'js/posts.js', array ( 'jquery', 'wordpresscanvas-rslides', 'jquery-masonry', 'wordpresscanvas-imagesloaded' ), $ver, true );
26
 
27
  // slider
28
  wp_register_script( 'wordpresscanvas-rslides', plugin_dir_url( __FILE__ ) . 'js/responsiveslides.min.js', array ( 'jquery' ), '1.54', true );
29
+ wp_register_style( 'wc-shortcodes-bxslider', plugin_dir_url( __FILE__ ) . 'vendors/bxslider/jquery.bxslider.min.css', array( ), '4.2.5' );
30
+ wp_register_script( 'wc-shortcodes-bxslider', plugin_dir_url( __FILE__ ) . 'vendors/bxslider/jquery.bxslider.min.js', array ( 'jquery' ), '4.2.5', true );
31
+ wp_register_script( 'wc-shortcodes-post-slider', plugin_dir_url( __FILE__ ) . 'js/post-slider.js', array ( 'jquery' ), $ver, true );
32
 
33
  // posts
34
  wp_register_script( 'wc-shortcodes-posts', plugin_dir_url( __FILE__ ) . 'js/posts.js', array ( 'jquery', 'wordpresscanvas-rslides', 'jquery-masonry', 'wordpresscanvas-imagesloaded' ), $ver, true );
includes/shortcode-functions.php CHANGED
@@ -1333,6 +1333,214 @@ if( ! function_exists( 'wc_shortcodes_posts' ) ) {
1333
  }
1334
  add_shortcode( 'wc_posts', 'wc_shortcodes_posts' );
1335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1336
 
1337
  if( !function_exists('wc_shortcodes_image') ) {
1338
  function wc_shortcodes_image( $atts ) {
1333
  }
1334
  add_shortcode( 'wc_posts', 'wc_shortcodes_posts' );
1335
 
1336
+ if( ! function_exists( 'wc_shortcodes_post_slider' ) ) {
1337
+ /**
1338
+ * Display posts in various formats
1339
+ *
1340
+ * @since 3.8
1341
+ * @access public
1342
+ *
1343
+ * @param mixed $atts
1344
+ * @return void
1345
+ */
1346
+ function wc_shortcodes_post_slider( $atts ) {
1347
+ global $data;
1348
+ global $post;
1349
+ global $wc_shortcodes_posts_query;
1350
+
1351
+ static $instance = 0;
1352
+ $instance++;
1353
+
1354
+ $atts = shortcode_atts( array(
1355
+ 'author' => '', //use author id
1356
+ 'author_name' => '', //use 'user_nicename' (NOT name).
1357
+ 'p' => false, //use post id.
1358
+ 'post__in' => false, //use post ids
1359
+ 'order' => 'DESC', // DESC, ASC
1360
+ 'orderby' => 'date',
1361
+ 'post_status' => 'publish',
1362
+ 'post_type' => 'post', // post, page, wc_portfolio_item, etc
1363
+ 'posts_per_page' => 10, //number of post to show per page
1364
+ 'nopaging' => true, //show all posts or use pagination. Default value is 'false', use paging.
1365
+ 'ignore_sticky_posts' => 0,
1366
+
1367
+ 'taxonomy' => '', // category, post_tag, wc_portfolio_tag, etc
1368
+ 'field' => 'slug', // slug or id
1369
+ 'terms' => '', // taxonomy terms.
1370
+
1371
+ 'meta_category' => true, // show heading?
1372
+ 'title' => true, // show heading?
1373
+ 'content' => true, // show main content?
1374
+ 'readmore' => 'Continue Reading', // show main content?
1375
+
1376
+ 'size' => 'full', // default thumbnail size
1377
+
1378
+ 'heading_type' => 'h2', // heading tag for title
1379
+ 'heading_size' => '30',
1380
+ 'mobile_heading_size' => '24',
1381
+ 'layout' => 'bxslider', // blog layout
1382
+ 'template' => 'slider',
1383
+ 'excerpt_length' => '55',
1384
+ 'desktop_height' => '650',
1385
+ 'laptop_height' => '500',
1386
+ 'mobile_height' => '350',
1387
+ 'text_color' => '#ffffff',
1388
+ ), $atts );
1389
+
1390
+ // fix bug with title argument being added to WP_Query() in 4.4
1391
+ $keys = array(
1392
+ 'meta_category',
1393
+ 'title',
1394
+ 'content',
1395
+ 'readmore',
1396
+
1397
+ 'size',
1398
+
1399
+ 'heading_type',
1400
+ 'heading_size',
1401
+ 'mobile_heading_size',
1402
+ 'layout',
1403
+ 'template',
1404
+ 'excerpt_length',
1405
+ 'desktop_height',
1406
+ 'laptop_height',
1407
+ 'mobile_height',
1408
+ 'text_color',
1409
+ );
1410
+
1411
+ $display = array();
1412
+ foreach ( $keys as $key ) {
1413
+ $display[ $key ] = $atts[ $key ];
1414
+ unset( $atts[ $key ] );
1415
+ }
1416
+
1417
+ // changed default layout name. Let's catch old inputs
1418
+ $valid_layouts = array( 'bxslider' );
1419
+ if ( ! in_array( $display['layout'], $valid_layouts ) ) {
1420
+ $display['layout'] = 'bxslider';
1421
+ }
1422
+
1423
+ $valid_templates = array( 'slider' );
1424
+ if ( ! in_array( $display['template'], $valid_templates ) ) {
1425
+ $display['template'] = 'slider';
1426
+ }
1427
+
1428
+ // clean input values
1429
+ $atts['terms'] = wc_shortcodes_comma_delim_to_array( $atts['terms'] );
1430
+ $wpc_term = null;
1431
+ if ( isset( $_GET['wpc_term'] ) && ! empty( $_GET['wpc_term'] ) ) {
1432
+ $wpc_term = $_GET['wpc_term'];
1433
+ }
1434
+ $atts['post__in'] = wc_shortcodes_comma_delim_to_array( $atts['post__in'] );
1435
+ $display['excerpt_length'] = (int) $display['excerpt_length'];
1436
+ $atts['order'] = strtoupper( $atts['order'] );
1437
+ $display['heading_type'] = strtolower( $display['heading_type'] );
1438
+
1439
+ if (isset($atts['posts_per_page']) && $atts['posts_per_page']) {
1440
+ $atts['posts_per_page'] = (int) $atts['posts_per_page'];
1441
+ }
1442
+ else {
1443
+ $atts['posts_per_page'] = 0;
1444
+ }
1445
+
1446
+ $display['desktop_height'] = (int) $display['desktop_height'];
1447
+ $display['laptop_height'] = (int) $display['laptop_height'];
1448
+ $display['mobile_height'] = (int) $display['mobile_height'];
1449
+ $display['heading_size'] = (int) $display['heading_size'];
1450
+ $display['mobile_heading_size'] = (int) $display['mobile_heading_size'];
1451
+
1452
+
1453
+ // add tax query if user specified
1454
+ if ( ! empty( $wpc_term ) ) {
1455
+ $atts['tax_query'] = array(
1456
+ array(
1457
+ 'taxonomy' => $atts['taxonomy'],
1458
+ 'field' => $atts['field'],
1459
+ 'terms' => $wpc_term,
1460
+ ),
1461
+ );
1462
+ }
1463
+ else if ( ! empty( $atts['terms'] ) ) {
1464
+ $atts['tax_query'] = array(
1465
+ array(
1466
+ 'taxonomy' => $atts['taxonomy'],
1467
+ 'field' => $atts['field'],
1468
+ 'terms' => $atts['terms'],
1469
+ ),
1470
+ );
1471
+ }
1472
+
1473
+ // setting attributes right for the php script
1474
+ $valid_headings = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' );
1475
+ $display['heading_type'] = in_array( $display['heading_type'], $valid_headings ) ? $display['heading_type'] : 'h2';
1476
+
1477
+ ($display['title'] == "yes") ? ($display['title'] = true) : ($display['title'] = false);
1478
+ ($display['content'] == "yes") ? ($display['content'] = true) : ($display['content'] = false);
1479
+ ($atts['order'] == "ASC") ? ($atts['order'] = "ASC") : ($atts['order'] = "DESC");
1480
+
1481
+ $is_grid = 'grid' == $display['layout'] ? true : false;
1482
+
1483
+ if ( 'bxslider' == $display['layout'] ) {
1484
+ wp_enqueue_script('wc-shortcodes-bxslider');
1485
+ wp_enqueue_script('wc-shortcodes-post-slider');
1486
+ }
1487
+
1488
+ $wc_shortcodes_posts_query = new WP_Query($atts);
1489
+ $wc_shortcodes_posts_query->excerpt_length = $display['excerpt_length'];
1490
+
1491
+ $html = '';
1492
+
1493
+ $html .= '<style>';
1494
+ $html .= '#wc-shortcodes-post-slider-'.$instance.' .wc-shortcodes-post-slide {';
1495
+ $html .= 'height: ' . $display['desktop_height'] . 'px;';
1496
+ $html .= '}';
1497
+ $html .= '#wc-shortcodes-post-slider-'.$instance.' .wc-shortcodes-entry-title {';
1498
+ $html .= 'font-size: ' . $display['heading_size'] . 'px;';
1499
+ $html .= '}';
1500
+ $html .= '@media (max-width: 1150px) {';
1501
+ $html .= '#wc-shortcodes-post-slider-'.$instance.' .wc-shortcodes-post-slide {';
1502
+ $html .= 'height: ' . $display['laptop_height'] . 'px;';
1503
+ $html .= '}';
1504
+ $html .= '}';
1505
+ $html .= '@media (max-width: 767px) {';
1506
+ $html .= '#wc-shortcodes-post-slider-'.$instance.' .wc-shortcodes-post-slide {';
1507
+ $html .= 'height: ' . $display['mobile_height'] . 'px;';
1508
+ $html .= '}';
1509
+ $html .= '#wc-shortcodes-post-slider-'.$instance.' .wc-shortcodes-entry-title {';
1510
+ $html .= 'font-size: ' . $display['mobile_heading_size'] . 'px;';
1511
+ $html .= '}';
1512
+ $html .= '}';
1513
+ $html .= '</style>';
1514
+
1515
+ $class = array();
1516
+ $class[] = 'wc-shortcodes-post-slider';
1517
+ $class[] = 'wc-shortcodes-clearfix';
1518
+ $class[] = 'wc-shortcodes-posts-layout-' . $display['layout'];
1519
+ $class[] = 'wc-shortcodes-posts-template-' . $display['template'];
1520
+
1521
+ $html .= '<div id="" class="wc-shortcodes-post-slider-wrapper" style="color:'.$display['text_color'].';">';
1522
+ $html .= '<div id="wc-shortcodes-post-slider-'.$instance.'" class="' . implode( ' ', $class ) . '">';
1523
+
1524
+ while( $wc_shortcodes_posts_query->have_posts() ) :
1525
+ $wc_shortcodes_posts_query->the_post();
1526
+
1527
+ if ( $display['content'] && empty( $post->post_excerpt ) && empty( $post->post_content ) )
1528
+ $display['content'] = false;
1529
+
1530
+ ob_start();
1531
+ include('templates/'.$display['template'].'/index.php');
1532
+ $html .= ob_get_clean();
1533
+
1534
+ endwhile;
1535
+
1536
+ $html .= '</div>';
1537
+ $html .= '</div>';
1538
+
1539
+ wp_reset_query();
1540
+ return $html;
1541
+ }
1542
+ }
1543
+ add_shortcode( 'wc_post_slider', 'wc_shortcodes_post_slider' );
1544
 
1545
  if( !function_exists('wc_shortcodes_image') ) {
1546
  function wc_shortcodes_image( $atts ) {
includes/templates/slider/content.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-slide'; ?>
2
+ <?php $image_style = ''; ?>
3
+ <?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
4
+ <?php $image_style = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), $display['size'] ); ?></a>
5
+ <?php $image_style = 'background-image:url(\''.$image_style[0].'\');'; ?>
6
+ <?php endif; ?>
7
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?> style="<?php echo $image_style; ?>">
8
+ <div class="wc-shortcodes-post-slide-border">
9
+
10
+ <div class="wc-shortcodes-post-slide-content">
11
+ <div class="wc-shortcodes-post-slide-content-inner">
12
+ <?php if ( $display['meta_category'] ) : ?>
13
+ <?php echo wc_shortcodes_get_posted_category(); ?>
14
+ <?php endif; ?>
15
+
16
+ <?php if ( $display['title'] ) : ?>
17
+ <div class="wc-shortcodes-entry-header">
18
+ <<?php echo $display['heading_type']; ?> class="wc-shortcodes-entry-title">
19
+ <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
20
+ </<?php echo $display['heading_type']; ?>>
21
+ </div><!-- .entry-header -->
22
+ <?php endif; ?>
23
+
24
+ <?php if ( $display['content'] ) : ?>
25
+ <div class="wc-shortcodes-entry-summary">
26
+ <?php wc_shortcodes_the_excerpt(); ?>
27
+ </div><!-- .entry-summary -->
28
+ <?php endif; ?>
29
+
30
+ <?php if ( $display['readmore'] ) : ?>
31
+ <div class="wc-shortcodes-read-more">
32
+ <a class="wc-shortcodes-post-slide-button" href="<?php the_permalink(); ?>"><?php echo $display['readmore']; ?></a>
33
+ </div><!-- .entry-summary -->
34
+ <?php endif; ?>
35
+ </div>
36
+ </div><!-- .wc-shortcodes-post-content -->
37
+ </div><!-- .wc-shortcodes-post-border -->
38
+ </div><!-- #post -->
includes/templates/slider/index.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $blog_use_excerpt = true;
3
+ $post_format = get_post_format();
4
+ if ( $blog_use_excerpt ) {
5
+ if ( empty( $post_format ) ) {
6
+ $post_format = 'excerpt';
7
+ }
8
+ }
9
+
10
+ $classes = wc_shortcodes_display_term_classes( $atts['taxonomy'] );
11
+
12
+ switch( $post_format ) {
13
+ /* case 'excerpt' :
14
+ include( 'content-excerpt.php' );
15
+ break;
16
+ case 'aside' :
17
+ include( 'content-aside.php' );
18
+ break;
19
+ case 'link' :
20
+ include( 'content-link.php' );
21
+ break;
22
+ case 'chat' :
23
+ include( 'content-chat.php' );
24
+ break;
25
+ case 'audio' :
26
+ include( 'content-audio.php' );
27
+ break;
28
+ case 'video' :
29
+ include( 'content-video.php' );
30
+ break;
31
+ case 'quote' :
32
+ include( 'content-quote.php' );
33
+ break;
34
+ case 'gallery' :
35
+ include( 'content-gallery.php' );
36
+ break; */
37
+ default :
38
+ include( 'content.php' );
39
+ }
40
+ ?>
includes/vendors/bxslider/LICENSE.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ License
2
+ -------
3
+
4
+ The MIT License (MIT)
5
+
6
+ Copyright © 2014 [Steven Wanderski](https://twitter.com/stevenwanderski)
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
includes/vendors/bxslider/README.md ADDED
@@ -0,0 +1,748 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #bxSlider 4.2.5
2
+ ##The fully-loaded, responsive jQuery content slider
3
+
4
+ ###Why should I use this slider?
5
+ * Fully responsive - will adapt to any device
6
+ * Horizontal, vertical, and fade modes
7
+ * Slides can contain images, video, or HTML content
8
+ * Full callback API and public methods
9
+ * Small file size, fully themed, simple to implement
10
+ * Browser support: Firefox, Chrome, Safari, iOS, Android, IE7+
11
+ * Tons of configuration options
12
+
13
+ For complete documentation, tons of examples, and a good time, visit:
14
+
15
+ [http://bxslider.com](http://bxslider.com)
16
+
17
+ Written by: Steven Wanderski - [http://stevenwanderski.com](http://stevenwanderski.com)
18
+
19
+ ###License
20
+ Released under the MIT license - http://opensource.org/licenses/MIT
21
+
22
+ Let's get on with it!
23
+
24
+ ##Installation
25
+
26
+ ###Step 1: Link required files
27
+
28
+ First and most important, the jQuery library needs to be included (no need to download - link directly from Google). Next, download the package from this site and link the bxSlider CSS file (for the theme) and the bxSlider Javascript file.
29
+
30
+ ```html
31
+ <!-- jQuery library (served from Google) -->
32
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
33
+ <!-- bxSlider Javascript file -->
34
+ <script src="/js/jquery.bxslider.min.js"></script>
35
+ <!-- bxSlider CSS file -->
36
+ <link href="/lib/jquery.bxslider.css" rel="stylesheet" />
37
+ ```
38
+
39
+ ###Step 2: Create HTML markup
40
+
41
+ Create a `<ul class="bxslider">` element, with a `<li>` for each slide. Slides can contain images, video, or any other HTML content!
42
+
43
+ ```html
44
+ <ul class="bxslider">
45
+ <li><img src="/images/pic1.jpg" /></li>
46
+ <li><img src="/images/pic2.jpg" /></li>
47
+ <li><img src="/images/pic3.jpg" /></li>
48
+ <li><img src="/images/pic4.jpg" /></li>
49
+ </ul>
50
+ ```
51
+
52
+ ###Step 3: Call the bxSlider
53
+
54
+ Call .bxSlider() on `<ul class="bxslider">`. Note that the call must be made inside of a $(document).ready() call, or the plugin will not work!
55
+
56
+ ```javascript
57
+ $(document).ready(function(){
58
+ $('.bxslider').bxSlider();
59
+ });
60
+ ```
61
+
62
+ ##Configuration options
63
+
64
+ ###General
65
+
66
+ **mode**
67
+ Type of transition between slides
68
+ ```
69
+ default: 'horizontal'
70
+ options: 'horizontal', 'vertical', 'fade'
71
+ ```
72
+
73
+ **speed**
74
+ Slide transition duration (in ms)
75
+ ```
76
+ default: 500
77
+ options: integer
78
+ ```
79
+
80
+ **slideMargin**
81
+ Margin between each slide
82
+ ```
83
+ default: 0
84
+ options: integer
85
+ ```
86
+
87
+ **startSlide**
88
+ Starting slide index (zero-based)
89
+ ```
90
+ default: 0
91
+ options: integer
92
+ ```
93
+
94
+ **randomStart**
95
+ Start slider on a random slide
96
+ ```
97
+ default: false
98
+ options: boolean (true / false)
99
+ ```
100
+
101
+ **slideSelector**
102
+ Element to use as slides (ex. <code>'div.slide'</code>).<br />Note: by default, bxSlider will use all immediate children of the slider element
103
+ ```
104
+ default: ''
105
+ options: jQuery selector
106
+ ```
107
+
108
+ **infiniteLoop**
109
+ If <code>true</code>, clicking "Next" while on the last slide will transition to the first slide and vice-versa
110
+ ```
111
+ default: true
112
+ options: boolean (true / false)
113
+ ```
114
+
115
+ **hideControlOnEnd**
116
+ If <code>true</code>, "Prev" and "Next" controls will receive a class <code>disabled</code> when slide is the first or the last<br/>Note: Only used when <code>infiniteLoop: false</code>
117
+ ```
118
+ default: false
119
+ options: boolean (true / false)
120
+ ```
121
+
122
+ **easing**
123
+ The type of "easing" to use during transitions. If using CSS transitions, include a value for the <code>transition-timing-function</code> property. If not using CSS transitions, you may include <code>plugins/jquery.easing.1.3.js</code> for many options.<br />See <a href="http://gsgd.co.uk/sandbox/jquery/easing/" target="_blank">http://gsgd.co.uk/sandbox/jquery/easing/</a> for more info.
124
+ ```
125
+ default: null
126
+ options: if using CSS: 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'cubic-bezier(n,n,n,n)'. If not using CSS: 'swing', 'linear' (see the above file for more options)
127
+ ```
128
+
129
+ **captions**
130
+ Include image captions. Captions are derived from the image's <code>title</code> attribute
131
+ ```
132
+ default: false
133
+ options: boolean (true / false)
134
+ ```
135
+
136
+ **ticker**
137
+ Use slider in ticker mode (similar to a news ticker)
138
+ ```
139
+ default: false
140
+ options: boolean (true / false)
141
+ ```
142
+
143
+ **tickerHover**
144
+ Ticker will pause when mouse hovers over slider. Note: this functionality does NOT work if using CSS transitions!
145
+ ```
146
+ default: false
147
+ options: boolean (true / false)
148
+ ```
149
+
150
+ **adaptiveHeight**
151
+ Dynamically adjust slider height based on each slide's height
152
+ ```
153
+ default: false
154
+ options: boolean (true / false)
155
+ ```
156
+
157
+ **adaptiveHeightSpeed**
158
+ Slide height transition duration (in ms). Note: only used if <code>adaptiveHeight: true</code>
159
+ ```
160
+ default: 500
161
+ options: integer
162
+ ```
163
+
164
+ **video**
165
+ If any slides contain video, set this to <code>true</code>. Also, include <code>plugins/jquery.fitvids.js</code><br />See <a href="http://fitvidsjs.com/" target="_blank">http://fitvidsjs.com/</a> for more info
166
+ ```
167
+ default: false
168
+ options: boolean (true / false)
169
+ ```
170
+
171
+ **responsive**
172
+ Enable or disable auto resize of the slider. Useful if you need to use fixed width sliders.
173
+ ```
174
+ default: true
175
+ options: boolean (true /false)
176
+ ```
177
+
178
+ **useCSS**
179
+ If true, CSS transitions will be used for horizontal and vertical slide animations (this uses native hardware acceleration). If false, jQuery animate() will be used.
180
+ ```
181
+ default: true
182
+ options: boolean (true / false)
183
+ ```
184
+
185
+ **preloadImages**
186
+ If 'all', preloads all images before starting the slider. If 'visible', preloads only images in the initially visible slides before starting the slider (tip: use 'visible' if all slides are identical dimensions)
187
+ ```
188
+ default: 'visible'
189
+ options: 'all', 'visible'
190
+ ```
191
+
192
+ **touchEnabled**
193
+ If <code>true</code>, slider will allow touch swipe transitions
194
+ ```
195
+ default: true
196
+ options: boolean (true / false)
197
+ ```
198
+
199
+ **swipeThreshold**
200
+ Amount of pixels a touch swipe needs to exceed in order to execute a slide transition. Note: only used if <code>touchEnabled: true</code>
201
+ ```
202
+ default: 50
203
+ options: integer
204
+ ```
205
+
206
+ **oneToOneTouch**
207
+ If <code>true</code>, non-fade slides follow the finger as it swipes
208
+ ```
209
+ default: true
210
+ options: boolean (true / false)
211
+ ```
212
+
213
+ **preventDefaultSwipeX**
214
+ If <code>true</code>, touch screen will not move along the x-axis as the finger swipes
215
+ ```
216
+ default: true
217
+ options: boolean (true / false)
218
+ ```
219
+
220
+ **preventDefaultSwipeY**
221
+ If <code>true</code>, touch screen will not move along the y-axis as the finger swipes
222
+ ```
223
+ default: false
224
+ options: boolean (true / false)
225
+ ```
226
+
227
+ **wrapperClass**
228
+ Class to wrap the slider in. Change to prevent from using default bxSlider styles.
229
+ ```
230
+ default: 'bx-wrapper'
231
+ options: string
232
+ ```
233
+
234
+ ###Pager
235
+
236
+ **pager**
237
+ If <code>true</code>, a pager will be added
238
+ ```
239
+ default: true
240
+ options: boolean (true / false)
241
+ ```
242
+
243
+ **pagerType**
244
+ If <code>'full'</code>, a pager link will be generated for each slide. If <code>'short'</code>, a x / y pager will be used (ex. 1 / 5)
245
+ ```
246
+ default: 'full'
247
+ options: 'full', 'short'
248
+ ```
249
+
250
+ **pagerShortSeparator**
251
+ If <code>pagerType: 'short'</code>, pager will use this value as the separating character
252
+ ```
253
+ default: ' / '
254
+ options: string
255
+ ```
256
+
257
+ **pagerSelector**
258
+ Element used to populate the populate the pager. By default, the pager is appended to the bx-viewport
259
+ ```
260
+ default: ''
261
+ options: jQuery selector
262
+ ```
263
+
264
+ **pagerCustom**
265
+ Parent element to be used as the pager. Parent element must contain a <code>&lt;a data-slide-index="x"&gt;</code> element for each slide. See example <a href="/examples/thumbnail-method-1">here</a>. Not for use with dynamic carousels.
266
+ ```
267
+ default: null
268
+ options: jQuery selector
269
+ ```
270
+
271
+ **buildPager**
272
+ If supplied, function is called on every slide element, and the returned value is used as the pager item markup.<br />See <a href="http://bxslider.com/examples">examples</a> for detailed implementation
273
+ ```
274
+ default: null
275
+ options: function(slideIndex)
276
+ ```
277
+
278
+ ###Controls
279
+
280
+ **controls**
281
+ If <code>true</code>, "Next" / "Prev" controls will be added
282
+ ```
283
+ default: true
284
+ options: boolean (true / false)
285
+ ```
286
+
287
+ **nextText**
288
+ Text to be used for the "Next" control
289
+ ```
290
+ default: 'Next'
291
+ options: string
292
+ ```
293
+
294
+ **prevText**
295
+ Text to be used for the "Prev" control
296
+ ```
297
+ default: 'Prev'
298
+ options: string
299
+ ```
300
+
301
+ **nextSelector**
302
+ Element used to populate the "Next" control
303
+ ```
304
+ default: null
305
+ options: jQuery selector
306
+ ```
307
+
308
+ **prevSelector**
309
+ Element used to populate the "Prev" control
310
+ ```
311
+ default: null
312
+ options: jQuery selector
313
+ ```
314
+
315
+ **autoControls**
316
+ If <code>true</code>, "Start" / "Stop" controls will be added
317
+ ```
318
+ default: false
319
+ options: boolean (true / false)
320
+ ```
321
+
322
+ **startText**
323
+ Text to be used for the "Start" control
324
+ ```
325
+ default: 'Start'
326
+ options: string
327
+ ```
328
+
329
+ **stopText**
330
+ Text to be used for the "Stop" control
331
+ ```
332
+ default: 'Stop'
333
+ options: string
334
+ ```
335
+
336
+ **autoControlsCombine**
337
+ When slideshow is playing only "Stop" control is displayed and vice-versa
338
+ ```
339
+ default: false
340
+ options: boolean (true / false)
341
+ ```
342
+
343
+ **autoControlsSelector**
344
+ Element used to populate the auto controls
345
+ ```
346
+ default: null
347
+ options: jQuery selector
348
+ ```
349
+
350
+ **keyboardEnabled**
351
+ Enable keyboard navigation for visible sliders
352
+ ```
353
+ default: false
354
+ options: boolean (true / false)
355
+ ```
356
+
357
+ ###Auto
358
+
359
+ **auto**
360
+ Slides will automatically transition
361
+ ```
362
+ default: false
363
+ options: boolean (true / false)
364
+ ```
365
+ **stopAutoOnClick**
366
+ Auto will stop on interaction with controls
367
+ ```
368
+ default: false
369
+ options: boolean (true / false)
370
+ ```
371
+
372
+ **pause**
373
+ The amount of time (in ms) between each auto transition
374
+ ```
375
+ default: 4000
376
+ options: integer
377
+ ```
378
+
379
+ **autoStart**
380
+ Auto show starts playing on load. If <code>false</code>, slideshow will start when the "Start" control is clicked
381
+ ```
382
+ default: true
383
+ options: boolean (true / false)
384
+ ```
385
+
386
+ **autoDirection**
387
+ The direction of auto show slide transitions
388
+ ```
389
+ default: 'next'
390
+ options: 'next', 'prev'
391
+ ```
392
+
393
+ **autoHover**
394
+ Auto show will pause when mouse hovers over slider
395
+ ```
396
+ default: false
397
+ options: boolean (true / false)
398
+ ```
399
+
400
+ **autoDelay**
401
+ Time (in ms) auto show should wait before starting
402
+ ```
403
+ default: 0
404
+ options: integer
405
+ ```
406
+
407
+ ###Carousel
408
+
409
+ **minSlides**
410
+ The minimum number of slides to be shown. Slides will be sized down if carousel becomes smaller than the original size.
411
+ ```
412
+ default: 1
413
+ options: integer
414
+ ```
415
+
416
+ **maxSlides**
417
+ The maximum number of slides to be shown. Slides will be sized up if carousel becomes larger than the original size.
418
+ ```
419
+ default: 1
420
+ options: integer
421
+ ```
422
+
423
+ **moveSlides**
424
+ The number of slides to move on transition. This value must be <code>>= minSlides</code>, and <code><= maxSlides</code>. If zero (default), the number of fully-visible slides will be used.
425
+ ```
426
+ default: 0
427
+ options: integer
428
+ ```
429
+
430
+ **slideWidth**
431
+ The width of each slide. This setting is required for all horizontal carousels!
432
+ ```
433
+ default: 0
434
+ options: integer
435
+ ```
436
+
437
+ **shrinkItems**
438
+ The Carousel will only show whole items and shrink the images to fit the viewport based on maxSlides/MinSlides.
439
+ ```
440
+ default: false
441
+ options: boolean (true / false)
442
+ ```
443
+
444
+ ###Keyboard
445
+
446
+ **keyboardEnabled**
447
+ Allows for keyboard control of visible slider. Keypress ignored if slider not visible.
448
+ ```
449
+ default: false
450
+ options: boolean (true / false)
451
+ ```
452
+
453
+ ###Accessibility
454
+ **ariaLive**
455
+ Adds Aria Live attribute to slider.
456
+ ```
457
+ default: true
458
+ options: boolean (true / false)
459
+ ```
460
+
461
+ **ariaHidden**
462
+ Adds Aria Hidden attribute to any nonvisible slides.
463
+ ```
464
+ default: true
465
+ options: boolean (true / false)
466
+ ```
467
+
468
+ ###Callbacks
469
+
470
+ **onSliderLoad**
471
+ Executes immediately after the slider is fully loaded
472
+ ```
473
+ default: function(){}
474
+ options: function(currentIndex){ // your code here }
475
+ arguments:
476
+ currentIndex: element index of the current slide
477
+ ```
478
+
479
+ **onSliderResize**
480
+ Executes immediately after the slider is resized
481
+ ```
482
+ default: function(){}
483
+ options: function(currentIndex){ // your code here }
484
+ arguments:
485
+ currentIndex: element index of the current slide
486
+ ```
487
+
488
+ **onSlideBefore**
489
+ Executes immediately before each slide transition.
490
+ ```
491
+ default: function(){}
492
+ options: function($slideElement, oldIndex, newIndex){ // your code here }
493
+ arguments:
494
+ $slideElement: jQuery element of the destination element
495
+ oldIndex: element index of the previous slide (before the transition)
496
+ newIndex: element index of the destination slide (after the transition)
497
+ ```
498
+
499
+ **onSlideAfter**
500
+ Executes immediately after each slide transition. Function argument is the current slide element (when transition completes).
501
+ ```
502
+ default: function(){}
503
+ options: function($slideElement, oldIndex, newIndex){ // your code here }
504
+ arguments:
505
+ $slideElement: jQuery element of the destination element
506
+ oldIndex: element index of the previous slide (before the transition)
507
+ newIndex: element index of the destination slide (after the transition)
508
+ ```
509
+
510
+ **onSlideNext**
511
+ Executes immediately before each "Next" slide transition. Function argument is the target (next) slide element.
512
+ ```
513
+ default: function(){}
514
+ options: function($slideElement, oldIndex, newIndex){ // your code here }
515
+ arguments:
516
+ $slideElement: jQuery element of the destination element
517
+ oldIndex: element index of the previous slide (before the transition)
518
+ newIndex: element index of the destination slide (after the transition)
519
+ ```
520
+
521
+ **onSlidePrev**
522
+ Executes immediately before each "Prev" slide transition. Function argument is the target (prev) slide element.
523
+ ```
524
+ default: function(){}
525
+ options: function($slideElement, oldIndex, newIndex){ // your code here }
526
+ arguments:
527
+ $slideElement: jQuery element of the destination element
528
+ oldIndex: element index of the previous slide (before the transition)
529
+ newIndex: element index of the destination slide (after the transition)
530
+ ```
531
+
532
+ ###Public methods
533
+
534
+ **goToSlide**
535
+ Performs a slide transition to the supplied slide index (zero-based)
536
+ ```
537
+ example:
538
+ slider = $('.bxslider').bxSlider();
539
+ slider.goToSlide(3);
540
+ ```
541
+
542
+ **goToNextSlide**
543
+ Performs a "Next" slide transition
544
+ ```
545
+ example:
546
+ slider = $('.bxslider').bxSlider();
547
+ slider.goToNextSlide();
548
+ ```
549
+
550
+ **goToPrevSlide**
551
+ Performs a "Prev" slide transition
552
+ ```
553
+ example:
554
+ slider = $('.bxslider').bxSlider();
555
+ slider.goToPrevSlide();
556
+ ```
557
+
558
+ **startAuto**
559
+ Starts the auto show. Provide an argument <code>false</code> to prevent the auto controls from being updated.
560
+ ```
561
+ example:
562
+ slider = $('.bxslider').bxSlider();
563
+ slider.startAuto();
564
+ ```
565
+
566
+ **stopAuto**
567
+ Stops the auto show. Provide an argument <code>false</code> to prevent the auto controls from being updated.
568
+ ```
569
+ example:
570
+ slider = $('.bxslider').bxSlider();
571
+ slider.stopAuto();
572
+ ```
573
+
574
+ **getCurrentSlide**
575
+ Returns the current active slide
576
+ ```
577
+ example:
578
+ slider = $('.bxslider').bxSlider();
579
+ var current = slider.getCurrentSlide();
580
+ ```
581
+
582
+ **getSlideCount**
583
+ Returns the total number of slides in the slider
584
+ ```
585
+ example:
586
+ slider = $('.bxslider').bxSlider();
587
+ var slideQty = slider.getSlideCount();
588
+ ```
589
+
590
+ **redrawSlider**
591
+ Redraw the slider. Useful when needing to redraw a hidden slider after it is unhidden.
592
+ ```
593
+ example:
594
+ slider = $('.bxslider').bxSlider();
595
+ slider.redrawSlider();
596
+ ```
597
+
598
+ **reloadSlider**
599
+ Reload the slider. Useful when adding slides on the fly. Accepts an optional settings object. <a href="/examples/reload-slider-settings">See here for an example.</a>
600
+ ```
601
+ example:
602
+ slider = $('.bxslider').bxSlider();
603
+ slider.reloadSlider();
604
+ ```
605
+
606
+ **destroySlider**
607
+ Destroy the slider. This reverts all slider elements back to their original state (before calling the slider).
608
+ ```
609
+ example:
610
+ slider = $('.bxslider').bxSlider();
611
+ slider.destroySlider();
612
+ ```
613
+
614
+ ### Install Grunt and Bower
615
+
616
+ **Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding.
617
+
618
+ From the command line:
619
+
620
+ 1. Install `grunt-cli` and `bower` globally with `npm install -g grunt-cli bower`.
621
+ 2. Run `npm install`. npm will look at `package.json` and automatically install the necessary dependencies.
622
+ 3. Run `bower install`, which installs front-end packages defined in `bower.json`.
623
+
624
+ When completed, you'll be able to run the various Grunt commands provided from the command line.
625
+
626
+ ### Available Grunt commands
627
+
628
+ * `grunt` — Clean, Compile LESS to CSS, concatenate and validate JS, build documentation.
629
+ * `grunt dist` — Clean, Compile LESS to CSS, concatenate and validate JS for plugin only.
630
+ * `grunt docs` — Clean, build documentation only.
631
+ * `grunt watch` — loads LiveReload, connects, and watches all assets.
632
+ * `grunt zip` — Creates a zip of `/dist` and places it in `/download`.
633
+
634
+ ## Contributing
635
+
636
+ Everyone is welcome to help [contribute](CONTRIBUTING.md) and improve this project. There are several ways you can contribute:
637
+
638
+ * Reporting issues (please read [issue guidelines](https://github.com/necolas/issue-guidelines))
639
+ * Suggesting new features
640
+ * Writing or refactoring code
641
+ * Fixing [issues](https://github.com/roots/roots/issues)
642
+
643
+ ## Changelog
644
+
645
+ ### Version 4.2.5
646
+ * Fix: Vertical carousel minSlides not working #840
647
+ * Fix: slider breaks with css animations if settings.speed set to 0 #838
648
+ * Fix: Slider runs into undefined state when reloadSlider is called before initialization was finished #833
649
+
650
+ ### Version 4.2.4
651
+ NOTICE: We have switched to a Grunt based build process in order to leverage [Assemble](http://assemble.io) for local documentation building. Please review the above notes about Grunt for the commands available.
652
+
653
+ * Fix: Fixed transition from first to last slide during infinite loop #778
654
+ * Fix: Reload on multiple sliders doesn't work? #755
655
+ * Fix: bxSlider with text only #746
656
+ * Fix: bower missing main and ignore entries #738
657
+ * Fix: Tickermode transitionend event bubbling #737
658
+ * Fix: Initializing before destroyed breaks slider #748
659
+ * Enhancement: Added shrinkItems carousel setting #772
660
+ * Enhancement: Maintain auto display of slides after a manual selection #594
661
+ * Enhancement: Slider getter through jquery object #739
662
+ * Enhancement: Add aria attributes #751
663
+ * Enhancement: Slider element in every callback and a new method getSliderElement (#780)
664
+ * Enhancement: Local Documentiation and examples. I have added buildable documentation to the repo. This will expand over time and allow for community corrections as needed. Please see above Grunt notes on how to build.
665
+
666
+
667
+ ### Version 4.2.3
668
+ * Minor bug fix
669
+
670
+ ### Version 4.2.2
671
+ * Fix: Remove unused plugin variable (#733)
672
+ * Fix: `updateAfterSlideTransition` not being called (#704)
673
+ * Fix: Slider stops auto advancing (#702)
674
+ * Fix: Refresh page, slider show the last item at the first in mode: 'horizontal' (#694)
675
+ * Fix: horizintal ticker stutters on loop (#669)
676
+ * Fix: Wrong bx-wrapper bottom margin with controls=true and pager=false (#647)
677
+ * Fix: add css tickerHover. (#629)
678
+ * Fix: Slider refusing to scale down, only up (#611)
679
+ * Fix: bxSlider freezes on touch devices (#540)
680
+ * Fix: Multiple fixes and improvements for Windows Mobile Devices (#596)
681
+ * Fix: Accessing bxslider's slider object inside its “onSliderLoad” callback returns undefined (#475)
682
+ * Fix: infiniteLoop glitch when scrolling from first to last slide (#429)
683
+ * Enhancement: Cancel transitions on callbacks by returning false. (#411)
684
+ * Enhancement: Added Keyboard arrow left and right support (#239)
685
+
686
+ ### Version 4.2.1
687
+ * Fix: Merge Conflict in dist
688
+ * Fix: modified bower.json
689
+
690
+ ### Version 4.2.0
691
+ * Fix: Reverse #714, fixes #722.
692
+ * Fix: Repo Tag #729
693
+ * Fix: #720 pagerCustom issues
694
+
695
+ 4.2.0 Introduces a streamlined build process using [gulp](www.gulpjs.com). Along with this new build process the projects folder structure has been changed. You will find a `dist` folder with all assets ready to use, including both minified and unminified versions of the javascript. These assets should be ready to go. In `src` you will find the uncompiled assets, including a new less version of the css for bxslider. This is an important step for bxslider. It will help speed development up and keep work clean. It also paves the way for a big revamp we have planned in the future.
696
+
697
+ **Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding.
698
+
699
+ From the command line:
700
+
701
+ 1. Install [gulp](http://gulpjs.com) globally with `npm install -g gulp`
702
+ 2. Navigate to the project directory, then run `npm install`
703
+
704
+ You now have all the necessary dependencies to run the build process.
705
+
706
+ ### Available gulp commands
707
+
708
+ * `gulp` — Compile and optimize all files to `dist`
709
+ * `gulp styles` — Compile css assets only to `dist`
710
+ * `gulp scripts` — Compile js assets only to `dist`
711
+ * `gulp images` - Run lossless compression on all the images and copy to `dist`
712
+ * `gulp jshint` — Checks JS and JSON code for errors based on our .jshintrc settings
713
+
714
+
715
+ ### Version 4.1.3
716
+ * Fix: responsive issue for horizontal mode for issue #611, #714
717
+ * Fix: extra space on the left when using fade mode. #715
718
+ * Fix: wrongly removing custom pager in destroySlider #610
719
+ * Fix: bug with reloading slider with custom pager #545
720
+ * Fix: Issue with infinite scroll sometimes returning to 0 #481
721
+ * Fix: When "infiniteLoop" is used, true is not passed to a clone method. #346
722
+ * Fix: "pagerCustom" won't work when using reloadSlider #171
723
+ * Fix: Remove vendor prefix for translateZ(0) #565
724
+ * Fix: give styles on focus for accessibility #228
725
+ * Fix: Minified Version out of sync.
726
+ * Fix: Remove -5px left #517
727
+ * Enhancement: Invert order call of appendControls() and appendPager() #226
728
+ * Enhancement: Various Indentation and typos in docs fixed. #551, #578
729
+ * Enhancement: Update jsDelivr with update.json for autoupdate of CDN
730
+ * Enhancement: Tag Repo so it can be included in CDNJS
731
+ * Created development branch to work from. Eventually will restructure entire repo to follow best practice setup.
732
+
733
+
734
+ ### Version 4.1.2
735
+ * Added `bower.json` configuration file. Manage bxSlider as a dependency using [bower](http://bower.io/).
736
+
737
+ ### Version 4.1.1
738
+ * Removed imagesLoaded library and added iframe preloading support
739
+ * Added responsive option - setting to false will prevent $(window).resize binding
740
+
741
+ ### Version 4.1
742
+ * Carousel mode (minSlides / maxSlides) was re-written to be more intuitive.
743
+ * SlideWidth now acts as it should (slides respect the width value).
744
+ * SlideWidth now properly parsed: accepts string ("600px") or integer (600).
745
+ * Slider now only needs to load visible slides (by default) in order to initialize which results in much faster loading. A "preloadImages" setting allows for configuration.
746
+
747
+
748
+ Long live Zep.
includes/vendors/bxslider/images/bx_loader.gif ADDED
Binary file
includes/vendors/bxslider/images/controls.png ADDED
Binary file
includes/vendors/bxslider/jquery.bxslider.css ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * bxSlider v4.2.5
3
+ * Copyright 2013-2015 Steven Wanderski
4
+ * Written while drinking Belgian ales and listening to jazz
5
+
6
+ * Licensed under MIT (http://opensource.org/licenses/MIT)
7
+ */
8
+
9
+ /** VARIABLES
10
+ ===================================*/
11
+ /** RESET AND LAYOUT
12
+ ===================================*/
13
+ .bx-wrapper {
14
+ position: relative;
15
+ margin: 0 auto 60px;
16
+ padding: 0;
17
+ *zoom: 1;
18
+ -ms-touch-action: pan-y;
19
+ touch-action: pan-y;
20
+ }
21
+ .bx-wrapper img {
22
+ max-width: 100%;
23
+ display: block;
24
+ }
25
+ .bxslider {
26
+ margin: 0;
27
+ padding: 0;
28
+ }
29
+ ul.bxslider {
30
+ list-style: none;
31
+ }
32
+ .bx-viewport {
33
+ /*fix other elements on the page moving (on Chrome)*/
34
+ -webkit-transform: translatez(0);
35
+ }
36
+ /** THEME
37
+ ===================================*/
38
+ .bx-wrapper {
39
+ -moz-box-shadow: 0 0 5px #ccc;
40
+ -webkit-box-shadow: 0 0 5px #ccc;
41
+ box-shadow: 0 0 5px #ccc;
42
+ border: 5px solid #fff;
43
+ background: #fff;
44
+ }
45
+ .bx-wrapper .bx-pager,
46
+ .bx-wrapper .bx-controls-auto {
47
+ position: absolute;
48
+ bottom: -30px;
49
+ width: 100%;
50
+ }
51
+ /* LOADER */
52
+ .bx-wrapper .bx-loading {
53
+ min-height: 50px;
54
+ background: url('images/bx_loader.gif') center center no-repeat #ffffff;
55
+ height: 100%;
56
+ width: 100%;
57
+ position: absolute;
58
+ top: 0;
59
+ left: 0;
60
+ z-index: 2000;
61
+ }
62
+ /* PAGER */
63
+ .bx-wrapper .bx-pager {
64
+ text-align: center;
65
+ font-size: .85em;
66
+ font-family: Arial;
67
+ font-weight: bold;
68
+ color: #666;
69
+ padding-top: 20px;
70
+ }
71
+ .bx-wrapper .bx-pager.bx-default-pager a {
72
+ background: #666;
73
+ text-indent: -9999px;
74
+ display: block;
75
+ width: 10px;
76
+ height: 10px;
77
+ margin: 0 5px;
78
+ outline: 0;
79
+ -moz-border-radius: 5px;
80
+ -webkit-border-radius: 5px;
81
+ border-radius: 5px;
82
+ }
83
+ .bx-wrapper .bx-pager.bx-default-pager a:hover,
84
+ .bx-wrapper .bx-pager.bx-default-pager a.active,
85
+ .bx-wrapper .bx-pager.bx-default-pager a:focus {
86
+ background: #000;
87
+ }
88
+ .bx-wrapper .bx-pager-item,
89
+ .bx-wrapper .bx-controls-auto .bx-controls-auto-item {
90
+ display: inline-block;
91
+ *zoom: 1;
92
+ *display: inline;
93
+ }
94
+ .bx-wrapper .bx-pager-item {
95
+ font-size: 0;
96
+ line-height: 0;
97
+ }
98
+ /* DIRECTION CONTROLS (NEXT / PREV) */
99
+ .bx-wrapper .bx-prev {
100
+ left: 10px;
101
+ background: url('images/controls.png') no-repeat 0 -32px;
102
+ }
103
+ .bx-wrapper .bx-prev:hover,
104
+ .bx-wrapper .bx-prev:focus {
105
+ background-position: 0 0;
106
+ }
107
+ .bx-wrapper .bx-next {
108
+ right: 10px;
109
+ background: url('images/controls.png') no-repeat -43px -32px;
110
+ }
111
+ .bx-wrapper .bx-next:hover,
112
+ .bx-wrapper .bx-next:focus {
113
+ background-position: -43px 0;
114
+ }
115
+ .bx-wrapper .bx-controls-direction a {
116
+ position: absolute;
117
+ top: 50%;
118
+ margin-top: -16px;
119
+ outline: 0;
120
+ width: 32px;
121
+ height: 32px;
122
+ text-indent: -9999px;
123
+ z-index: 9999;
124
+ }
125
+ .bx-wrapper .bx-controls-direction a.disabled {
126
+ display: none;
127
+ }
128
+ /* AUTO CONTROLS (START / STOP) */
129
+ .bx-wrapper .bx-controls-auto {
130
+ text-align: center;
131
+ }
132
+ .bx-wrapper .bx-controls-auto .bx-start {
133
+ display: block;
134
+ text-indent: -9999px;
135
+ width: 10px;
136
+ height: 11px;
137
+ outline: 0;
138
+ background: url('images/controls.png') -86px -11px no-repeat;
139
+ margin: 0 3px;
140
+ }
141
+ .bx-wrapper .bx-controls-auto .bx-start:hover,
142
+ .bx-wrapper .bx-controls-auto .bx-start.active,
143
+ .bx-wrapper .bx-controls-auto .bx-start:focus {
144
+ background-position: -86px 0;
145
+ }
146
+ .bx-wrapper .bx-controls-auto .bx-stop {
147
+ display: block;
148
+ text-indent: -9999px;
149
+ width: 9px;
150
+ height: 11px;
151
+ outline: 0;
152
+ background: url('images/controls.png') -86px -44px no-repeat;
153
+ margin: 0 3px;
154
+ }
155
+ .bx-wrapper .bx-controls-auto .bx-stop:hover,
156
+ .bx-wrapper .bx-controls-auto .bx-stop.active,
157
+ .bx-wrapper .bx-controls-auto .bx-stop:focus {
158
+ background-position: -86px -33px;
159
+ }
160
+ /* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
161
+ .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
162
+ text-align: left;
163
+ width: 80%;
164
+ }
165
+ .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
166
+ right: 0;
167
+ width: 35px;
168
+ }
169
+ /* IMAGE CAPTIONS */
170
+ .bx-wrapper .bx-caption {
171
+ position: absolute;
172
+ bottom: 0;
173
+ left: 0;
174
+ background: #666;
175
+ background: rgba(80, 80, 80, 0.75);
176
+ width: 100%;
177
+ }
178
+ .bx-wrapper .bx-caption span {
179
+ color: #fff;
180
+ font-family: Arial;
181
+ display: block;
182
+ font-size: .85em;
183
+ padding: 10px;
184
+ }
includes/vendors/bxslider/jquery.bxslider.js ADDED
@@ -0,0 +1,1614 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * bxSlider v4.2.5
3
+ * Copyright 2013-2015 Steven Wanderski
4
+ * Written while drinking Belgian ales and listening to jazz
5
+
6
+ * Licensed under MIT (http://opensource.org/licenses/MIT)
7
+ */
8
+
9
+ ;(function($) {
10
+
11
+ var defaults = {
12
+
13
+ // GENERAL
14
+ mode: 'horizontal',
15
+ slideSelector: '',
16
+ infiniteLoop: true,
17
+ hideControlOnEnd: false,
18
+ speed: 500,
19
+ easing: null,
20
+ slideMargin: 0,
21
+ startSlide: 0,
22
+ randomStart: false,
23
+ captions: false,
24
+ ticker: false,
25
+ tickerHover: false,
26
+ adaptiveHeight: false,
27
+ adaptiveHeightSpeed: 500,
28
+ video: false,
29
+ useCSS: true,
30
+ preloadImages: 'visible',
31
+ responsive: true,
32
+ slideZIndex: 50,
33
+ wrapperClass: 'bx-wrapper',
34
+
35
+ // TOUCH
36
+ touchEnabled: true,
37
+ swipeThreshold: 50,
38
+ oneToOneTouch: true,
39
+ preventDefaultSwipeX: true,
40
+ preventDefaultSwipeY: false,
41
+
42
+ // ACCESSIBILITY
43
+ ariaLive: true,
44
+ ariaHidden: true,
45
+
46
+ // KEYBOARD
47
+ keyboardEnabled: false,
48
+
49
+ // PAGER
50
+ pager: true,
51
+ pagerType: 'full',
52
+ pagerShortSeparator: ' / ',
53
+ pagerSelector: null,
54
+ buildPager: null,
55
+ pagerCustom: null,
56
+
57
+ // CONTROLS
58
+ controls: true,
59
+ nextText: 'Next',
60
+ prevText: 'Prev',
61
+ nextSelector: null,
62
+ prevSelector: null,
63
+ autoControls: false,
64
+ startText: 'Start',
65
+ stopText: 'Stop',
66
+ autoControlsCombine: false,
67
+ autoControlsSelector: null,
68
+
69
+ // AUTO
70
+ auto: false,
71
+ pause: 4000,
72
+ autoStart: true,
73
+ autoDirection: 'next',
74
+ stopAutoOnClick: false,
75
+ autoHover: false,
76
+ autoDelay: 0,
77
+ autoSlideForOnePage: false,
78
+
79
+ // CAROUSEL
80
+ minSlides: 1,
81
+ maxSlides: 1,
82
+ moveSlides: 0,
83
+ slideWidth: 0,
84
+ shrinkItems: false,
85
+
86
+ // CALLBACKS
87
+ onSliderLoad: function() { return true; },
88
+ onSlideBefore: function() { return true; },
89
+ onSlideAfter: function() { return true; },
90
+ onSlideNext: function() { return true; },
91
+ onSlidePrev: function() { return true; },
92
+ onSliderResize: function() { return true; }
93
+ };
94
+
95
+ $.fn.bxSlider = function(options) {
96
+
97
+ if (this.length === 0) {
98
+ return this;
99
+ }
100
+
101
+ // support multiple elements
102
+ if (this.length > 1) {
103
+ this.each(function() {
104
+ $(this).bxSlider(options);
105
+ });
106
+ return this;
107
+ }
108
+
109
+ // create a namespace to be used throughout the plugin
110
+ var slider = {},
111
+ // set a reference to our slider element
112
+ el = this,
113
+ // get the original window dimens (thanks a lot IE)
114
+ windowWidth = $(window).width(),
115
+ windowHeight = $(window).height();
116
+
117
+ // Return if slider is already initialized
118
+ if ($(el).data('bxSlider')) { return; }
119
+
120
+ /**
121
+ * ===================================================================================
122
+ * = PRIVATE FUNCTIONS
123
+ * ===================================================================================
124
+ */
125
+
126
+ /**
127
+ * Initializes namespace settings to be used throughout plugin
128
+ */
129
+ var init = function() {
130
+ // Return if slider is already initialized
131
+ if ($(el).data('bxSlider')) { return; }
132
+ // merge user-supplied options with the defaults
133
+ slider.settings = $.extend({}, defaults, options);
134
+ // parse slideWidth setting
135
+ slider.settings.slideWidth = parseInt(slider.settings.slideWidth);
136
+ // store the original children
137
+ slider.children = el.children(slider.settings.slideSelector);
138
+ // check if actual number of slides is less than minSlides / maxSlides
139
+ if (slider.children.length < slider.settings.minSlides) { slider.settings.minSlides = slider.children.length; }
140
+ if (slider.children.length < slider.settings.maxSlides) { slider.settings.maxSlides = slider.children.length; }
141
+ // if random start, set the startSlide setting to random number
142
+ if (slider.settings.randomStart) { slider.settings.startSlide = Math.floor(Math.random() * slider.children.length); }
143
+ // store active slide information
144
+ slider.active = { index: slider.settings.startSlide };
145
+ // store if the slider is in carousel mode (displaying / moving multiple slides)
146
+ slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1 ? true : false;
147
+ // if carousel, force preloadImages = 'all'
148
+ if (slider.carousel) { slider.settings.preloadImages = 'all'; }
149
+ // calculate the min / max width thresholds based on min / max number of slides
150
+ // used to setup and update carousel slides dimensions
151
+ slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);
152
+ slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
153
+ // store the current state of the slider (if currently animating, working is true)
154
+ slider.working = false;
155
+ // initialize the controls object
156
+ slider.controls = {};
157
+ // initialize an auto interval
158
+ slider.interval = null;
159
+ // determine which property to use for transitions
160
+ slider.animProp = slider.settings.mode === 'vertical' ? 'top' : 'left';
161
+ // determine if hardware acceleration can be used
162
+ slider.usingCSS = slider.settings.useCSS && slider.settings.mode !== 'fade' && (function() {
163
+ // create our test div element
164
+ var div = document.createElement('div'),
165
+ // css transition properties
166
+ props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
167
+ // test for each property
168
+ for (var i = 0; i < props.length; i++) {
169
+ if (div.style[props[i]] !== undefined) {
170
+ slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
171
+ slider.animProp = '-' + slider.cssPrefix + '-transform';
172
+ return true;
173
+ }
174
+ }
175
+ return false;
176
+ }());
177
+ // if vertical mode always make maxSlides and minSlides equal
178
+ if (slider.settings.mode === 'vertical') { slider.settings.maxSlides = slider.settings.minSlides; }
179
+ // save original style data
180
+ el.data('origStyle', el.attr('style'));
181
+ el.children(slider.settings.slideSelector).each(function() {
182
+ $(this).data('origStyle', $(this).attr('style'));
183
+ });
184
+
185
+ // perform all DOM / CSS modifications
186
+ setup();
187
+ };
188
+
189
+ /**
190
+ * Performs all DOM and CSS modifications
191
+ */
192
+ var setup = function() {
193
+ var preloadSelector = slider.children.eq(slider.settings.startSlide); // set the default preload selector (visible)
194
+
195
+ // wrap el in a wrapper
196
+ el.wrap('<div class="' + slider.settings.wrapperClass + '"><div class="bx-viewport"></div></div>');
197
+ // store a namespace reference to .bx-viewport
198
+ slider.viewport = el.parent();
199
+
200
+ // add aria-live if the setting is enabled and ticker mode is disabled
201
+ if (slider.settings.ariaLive && !slider.settings.ticker) {
202
+ slider.viewport.attr('aria-live', 'polite');
203
+ }
204
+ // add a loading div to display while images are loading
205
+ slider.loader = $('<div class="bx-loading" />');
206
+ slider.viewport.prepend(slider.loader);
207
+ // set el to a massive width, to hold any needed slides
208
+ // also strip any margin and padding from el
209
+ el.css({
210
+ width: slider.settings.mode === 'horizontal' ? (slider.children.length * 1000 + 215) + '%' : 'auto',
211
+ position: 'relative'
212
+ });
213
+ // if using CSS, add the easing property
214
+ if (slider.usingCSS && slider.settings.easing) {
215
+ el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
216
+ // if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
217
+ } else if (!slider.settings.easing) {
218
+ slider.settings.easing = 'swing';
219
+ }
220
+ // make modifications to the viewport (.bx-viewport)
221
+ slider.viewport.css({
222
+ width: '100%',
223
+ overflow: 'hidden',
224
+ position: 'relative'
225
+ });
226
+ slider.viewport.parent().css({
227
+ maxWidth: getViewportMaxWidth()
228
+ });
229
+ // make modification to the wrapper (.bx-wrapper)
230
+ if (!slider.settings.pager && !slider.settings.controls) {
231
+ slider.viewport.parent().css({
232
+ margin: '0 auto 0px'
233
+ });
234
+ }
235
+ // apply css to all slider children
236
+ slider.children.css({
237
+ float: slider.settings.mode === 'horizontal' ? 'left' : 'none',
238
+ listStyle: 'none',
239
+ position: 'relative'
240
+ });
241
+ // apply the calculated width after the float is applied to prevent scrollbar interference
242
+ slider.children.css('width', getSlideWidth());
243
+ // if slideMargin is supplied, add the css
244
+ if (slider.settings.mode === 'horizontal' && slider.settings.slideMargin > 0) { slider.children.css('marginRight', slider.settings.slideMargin); }
245
+ if (slider.settings.mode === 'vertical' && slider.settings.slideMargin > 0) { slider.children.css('marginBottom', slider.settings.slideMargin); }
246
+ // if "fade" mode, add positioning and z-index CSS
247
+ if (slider.settings.mode === 'fade') {
248
+ slider.children.css({
249
+ position: 'absolute',
250
+ zIndex: 0,
251
+ display: 'none'
252
+ });
253
+ // prepare the z-index on the showing element
254
+ slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});
255
+ }
256
+ // create an element to contain all slider controls (pager, start / stop, etc)
257
+ slider.controls.el = $('<div class="bx-controls" />');
258
+ // if captions are requested, add them
259
+ if (slider.settings.captions) { appendCaptions(); }
260
+ // check if startSlide is last slide
261
+ slider.active.last = slider.settings.startSlide === getPagerQty() - 1;
262
+ // if video is true, set up the fitVids plugin
263
+ if (slider.settings.video) { el.fitVids(); }
264
+ if (slider.settings.preloadImages === 'all' || slider.settings.ticker) { preloadSelector = slider.children; }
265
+ // only check for control addition if not in "ticker" mode
266
+ if (!slider.settings.ticker) {
267
+ // if controls are requested, add them
268
+ if (slider.settings.controls) { appendControls(); }
269
+ // if auto is true, and auto controls are requested, add them
270
+ if (slider.settings.auto && slider.settings.autoControls) { appendControlsAuto(); }
271
+ // if pager is requested, add it
272
+ if (slider.settings.pager) { appendPager(); }
273
+ // if any control option is requested, add the controls wrapper
274
+ if (slider.settings.controls || slider.settings.autoControls || slider.settings.pager) { slider.viewport.after(slider.controls.el); }
275
+ // if ticker mode, do not allow a pager
276
+ } else {
277
+ slider.settings.pager = false;
278
+ }
279
+ loadElements(preloadSelector, start);
280
+ };
281
+
282
+ var loadElements = function(selector, callback) {
283
+ var total = selector.find('img:not([src=""]), iframe').length,
284
+ count = 0;
285
+ if (total === 0) {
286
+ callback();
287
+ return;
288
+ }
289
+ selector.find('img:not([src=""]), iframe').each(function() {
290
+ $(this).one('load error', function() {
291
+ if (++count === total) { callback(); }
292
+ }).each(function() {
293
+ if (this.complete) { $(this).load(); }
294
+ });
295
+ });
296
+ };
297
+
298
+ /**
299
+ * Start the slider
300
+ */
301
+ var start = function() {
302
+ // if infinite loop, prepare additional slides
303
+ if (slider.settings.infiniteLoop && slider.settings.mode !== 'fade' && !slider.settings.ticker) {
304
+ var slice = slider.settings.mode === 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides,
305
+ sliceAppend = slider.children.slice(0, slice).clone(true).addClass('bx-clone'),
306
+ slicePrepend = slider.children.slice(-slice).clone(true).addClass('bx-clone');
307
+ if (slider.settings.ariaHidden) {
308
+ sliceAppend.attr('aria-hidden', true);
309
+ slicePrepend.attr('aria-hidden', true);
310
+ }
311
+ el.append(sliceAppend).prepend(slicePrepend);
312
+ }
313
+ // remove the loading DOM element
314
+ slider.loader.remove();
315
+ // set the left / top position of "el"
316
+ setSlidePosition();
317
+ // if "vertical" mode, always use adaptiveHeight to prevent odd behavior
318
+ if (slider.settings.mode === 'vertical') { slider.settings.adaptiveHeight = true; }
319
+ // set the viewport height
320
+ slider.viewport.height(getViewportHeight());
321
+ // make sure everything is positioned just right (same as a window resize)
322
+ el.redrawSlider();
323
+ // onSliderLoad callback
324
+ slider.settings.onSliderLoad.call(el, slider.active.index);
325
+ // slider has been fully initialized
326
+ slider.initialized = true;
327
+ // bind the resize call to the window
328
+ if (slider.settings.responsive) { $(window).bind('resize', resizeWindow); }
329
+ // if auto is true and has more than 1 page, start the show
330
+ if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) { initAuto(); }
331
+ // if ticker is true, start the ticker
332
+ if (slider.settings.ticker) { initTicker(); }
333
+ // if pager is requested, make the appropriate pager link active
334
+ if (slider.settings.pager) { updatePagerActive(slider.settings.startSlide); }
335
+ // check for any updates to the controls (like hideControlOnEnd updates)
336
+ if (slider.settings.controls) { updateDirectionControls(); }
337
+ // if touchEnabled is true, setup the touch events
338
+ if (slider.settings.touchEnabled && !slider.settings.ticker) { initTouch(); }
339
+ // if keyboardEnabled is true, setup the keyboard events
340
+ if (slider.settings.keyboardEnabled && !slider.settings.ticker) {
341
+ $(document).keydown(keyPress);
342
+ }
343
+ };
344
+
345
+ /**
346
+ * Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value
347
+ */
348
+ var getViewportHeight = function() {
349
+ var height = 0;
350
+ // first determine which children (slides) should be used in our height calculation
351
+ var children = $();
352
+ // if mode is not "vertical" and adaptiveHeight is false, include all children
353
+ if (slider.settings.mode !== 'vertical' && !slider.settings.adaptiveHeight) {
354
+ children = slider.children;
355
+ } else {
356
+ // if not carousel, return the single active child
357
+ if (!slider.carousel) {
358
+ children = slider.children.eq(slider.active.index);
359
+ // if carousel, return a slice of children
360
+ } else {
361
+ // get the individual slide index
362
+ var currentIndex = slider.settings.moveSlides === 1 ? slider.active.index : slider.active.index * getMoveBy();
363
+ // add the current slide to the children
364
+ children = slider.children.eq(currentIndex);
365
+ // cycle through the remaining "showing" slides
366
+ for (i = 1; i <= slider.settings.maxSlides - 1; i++) {
367
+ // if looped back to the start
368
+ if (currentIndex + i >= slider.children.length) {
369
+ children = children.add(slider.children.eq(i - 1));
370
+ } else {
371
+ children = children.add(slider.children.eq(currentIndex + i));
372
+ }
373
+ }
374
+ }
375
+ }
376
+ // if "vertical" mode, calculate the sum of the heights of the children
377
+ if (slider.settings.mode === 'vertical') {
378
+ children.each(function(index) {
379
+ height += $(this).outerHeight();
380
+ });
381
+ // add user-supplied margins
382
+ if (slider.settings.slideMargin > 0) {
383
+ height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
384
+ }
385
+ // if not "vertical" mode, calculate the max height of the children
386
+ } else {
387
+ height = Math.max.apply(Math, children.map(function() {
388
+ return $(this).outerHeight(false);
389
+ }).get());
390
+ }
391
+
392
+ if (slider.viewport.css('box-sizing') === 'border-box') {
393
+ height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +
394
+ parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));
395
+ } else if (slider.viewport.css('box-sizing') === 'padding-box') {
396
+ height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));
397
+ }
398
+
399
+ return height;
400
+ };
401
+
402
+ /**
403
+ * Returns the calculated width to be used for the outer wrapper / viewport
404
+ */
405
+ var getViewportMaxWidth = function() {
406
+ var width = '100%';
407
+ if (slider.settings.slideWidth > 0) {
408
+ if (slider.settings.mode === 'horizontal') {
409
+ width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
410
+ } else {
411
+ width = slider.settings.slideWidth;
412
+ }
413
+ }
414
+ return width;
415
+ };
416
+
417
+ /**
418
+ * Returns the calculated width to be applied to each slide
419
+ */
420
+ var getSlideWidth = function() {
421
+ var newElWidth = slider.settings.slideWidth, // start with any user-supplied slide width
422
+ wrapWidth = slider.viewport.width(); // get the current viewport width
423
+ // if slide width was not supplied, or is larger than the viewport use the viewport width
424
+ if (slider.settings.slideWidth === 0 ||
425
+ (slider.settings.slideWidth > wrapWidth && !slider.carousel) ||
426
+ slider.settings.mode === 'vertical') {
427
+ newElWidth = wrapWidth;
428
+ // if carousel, use the thresholds to determine the width
429
+ } else if (slider.settings.maxSlides > 1 && slider.settings.mode === 'horizontal') {
430
+ if (wrapWidth > slider.maxThreshold) {
431
+ return newElWidth;
432
+ } else if (wrapWidth < slider.minThreshold) {
433
+ newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;
434
+ } else if (slider.settings.shrinkItems) {
435
+ newElWidth = Math.floor((wrapWidth + slider.settings.slideMargin) / (Math.ceil((wrapWidth + slider.settings.slideMargin) / (newElWidth + slider.settings.slideMargin))) - slider.settings.slideMargin);
436
+ }
437
+ }
438
+ return newElWidth;
439
+ };
440
+
441
+ /**
442
+ * Returns the number of slides currently visible in the viewport (includes partially visible slides)
443
+ */
444
+ var getNumberSlidesShowing = function() {
445
+ var slidesShowing = 1,
446
+ childWidth = null;
447
+ if (slider.settings.mode === 'horizontal' && slider.settings.slideWidth > 0) {
448
+ // if viewport is smaller than minThreshold, return minSlides
449
+ if (slider.viewport.width() < slider.minThreshold) {
450
+ slidesShowing = slider.settings.minSlides;
451
+ // if viewport is larger than maxThreshold, return maxSlides
452
+ } else if (slider.viewport.width() > slider.maxThreshold) {
453
+ slidesShowing = slider.settings.maxSlides;
454
+ // if viewport is between min / max thresholds, divide viewport width by first child width
455
+ } else {
456
+ childWidth = slider.children.first().width() + slider.settings.slideMargin;
457
+ slidesShowing = Math.floor((slider.viewport.width() +
458
+ slider.settings.slideMargin) / childWidth);
459
+ }
460
+ // if "vertical" mode, slides showing will always be minSlides
461
+ } else if (slider.settings.mode === 'vertical') {
462
+ slidesShowing = slider.settings.minSlides;
463
+ }
464
+ return slidesShowing;
465
+ };
466
+
467
+ /**
468
+ * Returns the number of pages (one full viewport of slides is one "page")
469
+ */
470
+ var getPagerQty = function() {
471
+ var pagerQty = 0,
472
+ breakPoint = 0,
473
+ counter = 0;
474
+ // if moveSlides is specified by the user
475
+ if (slider.settings.moveSlides > 0) {
476
+ if (slider.settings.infiniteLoop) {
477
+ pagerQty = Math.ceil(slider.children.length / getMoveBy());
478
+ } else {
479
+ // when breakpoint goes above children length, counter is the number of pages
480
+ while (breakPoint < slider.children.length) {
481
+ ++pagerQty;
482
+ breakPoint = counter + getNumberSlidesShowing();
483
+ counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();
484
+ }
485
+ }
486
+ // if moveSlides is 0 (auto) divide children length by sides showing, then round up
487
+ } else {
488
+ pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());
489
+ }
490
+ return pagerQty;
491
+ };
492
+
493
+ /**
494
+ * Returns the number of individual slides by which to shift the slider
495
+ */
496
+ var getMoveBy = function() {
497
+ // if moveSlides was set by the user and moveSlides is less than number of slides showing
498
+ if (slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()) {
499
+ return slider.settings.moveSlides;
500
+ }
501
+ // if moveSlides is 0 (auto)
502
+ return getNumberSlidesShowing();
503
+ };
504
+
505
+ /**
506
+ * Sets the slider's (el) left or top position
507
+ */
508
+ var setSlidePosition = function() {
509
+ var position, lastChild, lastShowingIndex;
510
+ // if last slide, not infinite loop, and number of children is larger than specified maxSlides
511
+ if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) {
512
+ if (slider.settings.mode === 'horizontal') {
513
+ // get the last child's position
514
+ lastChild = slider.children.last();
515
+ position = lastChild.position();
516
+ // set the left position
517
+ setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);
518
+ } else if (slider.settings.mode === 'vertical') {
519
+ // get the last showing index's position
520
+ lastShowingIndex = slider.children.length - slider.settings.minSlides;
521
+ position = slider.children.eq(lastShowingIndex).position();
522
+ // set the top position
523
+ setPositionProperty(-position.top, 'reset', 0);
524
+ }
525
+ // if not last slide
526
+ } else {
527
+ // get the position of the first showing slide
528
+ position = slider.children.eq(slider.active.index * getMoveBy()).position();
529
+ // check for last slide
530
+ if (slider.active.index === getPagerQty() - 1) { slider.active.last = true; }
531
+ // set the respective position
532
+ if (position !== undefined) {
533
+ if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
534
+ else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
535
+ }
536
+ }
537
+ };
538
+
539
+ /**
540
+ * Sets the el's animating property position (which in turn will sometimes animate el).
541
+ * If using CSS, sets the transform property. If not using CSS, sets the top / left property.
542
+ *
543
+ * @param value (int)
544
+ * - the animating property's value
545
+ *
546
+ * @param type (string) 'slide', 'reset', 'ticker'
547
+ * - the type of instance for which the function is being
548
+ *
549
+ * @param duration (int)
550
+ * - the amount of time (in ms) the transition should occupy
551
+ *
552
+ * @param params (array) optional
553
+ * - an optional parameter containing any variables that need to be passed in
554
+ */
555
+ var setPositionProperty = function(value, type, duration, params) {
556
+ var animateObj, propValue;
557
+ // use CSS transform
558
+ if (slider.usingCSS) {
559
+ // determine the translate3d value
560
+ propValue = slider.settings.mode === 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';
561
+ // add the CSS transition-duration
562
+ el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
563
+ if (type === 'slide') {
564
+ // set the property value
565
+ el.css(slider.animProp, propValue);
566
+ if (duration !== 0) {
567
+ // bind a callback method - executes when CSS transition completes
568
+ el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
569
+ //make sure it's the correct one
570
+ if (!$(e.target).is(el)) { return; }
571
+ // unbind the callback
572
+ el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
573
+ updateAfterSlideTransition();
574
+ });
575
+ } else { //duration = 0
576
+ updateAfterSlideTransition();
577
+ }
578
+ } else if (type === 'reset') {
579
+ el.css(slider.animProp, propValue);
580
+ } else if (type === 'ticker') {
581
+ // make the transition use 'linear'
582
+ el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');
583
+ el.css(slider.animProp, propValue);
584
+ if (duration !== 0) {
585
+ el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
586
+ //make sure it's the correct one
587
+ if (!$(e.target).is(el)) { return; }
588
+ // unbind the callback
589
+ el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
590
+ // reset the position
591
+ setPositionProperty(params.resetValue, 'reset', 0);
592
+ // start the loop again
593
+ tickerLoop();
594
+ });
595
+ } else { //duration = 0
596
+ setPositionProperty(params.resetValue, 'reset', 0);
597
+ tickerLoop();
598
+ }
599
+ }
600
+ // use JS animate
601
+ } else {
602
+ animateObj = {};
603
+ animateObj[slider.animProp] = value;
604
+ if (type === 'slide') {
605
+ el.animate(animateObj, duration, slider.settings.easing, function() {
606
+ updateAfterSlideTransition();
607
+ });
608
+ } else if (type === 'reset') {
609
+ el.css(slider.animProp, value);
610
+ } else if (type === 'ticker') {
611
+ el.animate(animateObj, duration, 'linear', function() {
612
+ setPositionProperty(params.resetValue, 'reset', 0);
613
+ // run the recursive loop after animation
614
+ tickerLoop();
615
+ });
616
+ }
617
+ }
618
+ };
619
+
620
+ /**
621
+ * Populates the pager with proper amount of pages
622
+ */
623
+ var populatePager = function() {
624
+ var pagerHtml = '',
625
+ linkContent = '',
626
+ pagerQty = getPagerQty();
627
+ // loop through each pager item
628
+ for (var i = 0; i < pagerQty; i++) {
629
+ linkContent = '';
630
+ // if a buildPager function is supplied, use it to get pager link value, else use index + 1
631
+ if (slider.settings.buildPager && $.isFunction(slider.settings.buildPager) || slider.settings.pagerCustom) {
632
+ linkContent = slider.settings.buildPager(i);
633
+ slider.pagerEl.addClass('bx-custom-pager');
634
+ } else {
635
+ linkContent = i + 1;
636
+ slider.pagerEl.addClass('bx-default-pager');
637
+ }
638
+ // var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;
639
+ // add the markup to the string
640
+ pagerHtml += '<div class="bx-pager-item"><a href="" data-slide-index="' + i + '" class="bx-pager-link">' + linkContent + '</a></div>';
641
+ }
642
+ // populate the pager element with pager links
643
+ slider.pagerEl.html(pagerHtml);
644
+ };
645
+
646
+ /**
647
+ * Appends the pager to the controls element
648
+ */
649
+ var appendPager = function() {
650
+ if (!slider.settings.pagerCustom) {
651
+ // create the pager DOM element
652
+ slider.pagerEl = $('<div class="bx-pager" />');
653
+ // if a pager selector was supplied, populate it with the pager
654
+ if (slider.settings.pagerSelector) {
655
+ $(slider.settings.pagerSelector).html(slider.pagerEl);
656
+ // if no pager selector was supplied, add it after the wrapper
657
+ } else {
658
+ slider.controls.el.addClass('bx-has-pager').append(slider.pagerEl);
659
+ }
660
+ // populate the pager
661
+ populatePager();
662
+ } else {
663
+ slider.pagerEl = $(slider.settings.pagerCustom);
664
+ }
665
+ // assign the pager click binding
666
+ slider.pagerEl.on('click touchend', 'a', clickPagerBind);
667
+ };
668
+
669
+ /**
670
+ * Appends prev / next controls to the controls element
671
+ */
672
+ var appendControls = function() {
673
+ slider.controls.next = $('<a class="bx-next" href="">' + slider.settings.nextText + '</a>');
674
+ slider.controls.prev = $('<a class="bx-prev" href="">' + slider.settings.prevText + '</a>');
675
+ // bind click actions to the controls
676
+ slider.controls.next.bind('click touchend', clickNextBind);
677
+ slider.controls.prev.bind('click touchend', clickPrevBind);
678
+ // if nextSelector was supplied, populate it
679
+ if (slider.settings.nextSelector) {
680
+ $(slider.settings.nextSelector).append(slider.controls.next);
681
+ }
682
+ // if prevSelector was supplied, populate it
683
+ if (slider.settings.prevSelector) {
684
+ $(slider.settings.prevSelector).append(slider.controls.prev);
685
+ }
686
+ // if no custom selectors were supplied
687
+ if (!slider.settings.nextSelector && !slider.settings.prevSelector) {
688
+ // add the controls to the DOM
689
+ slider.controls.directionEl = $('<div class="bx-controls-direction" />');
690
+ // add the control elements to the directionEl
691
+ slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);
692
+ // slider.viewport.append(slider.controls.directionEl);
693
+ slider.controls.el.addClass('bx-has-controls-direction').append(slider.controls.directionEl);
694
+ }
695
+ };
696
+
697
+ /**
698
+ * Appends start / stop auto controls to the controls element
699
+ */
700
+ var appendControlsAuto = function() {
701
+ slider.controls.start = $('<div class="bx-controls-auto-item"><a class="bx-start" href="">' + slider.settings.startText + '</a></div>');
702
+ slider.controls.stop = $('<div class="bx-controls-auto-item"><a class="bx-stop" href="">' + slider.settings.stopText + '</a></div>');
703
+ // add the controls to the DOM
704
+ slider.controls.autoEl = $('<div class="bx-controls-auto" />');
705
+ // bind click actions to the controls
706
+ slider.controls.autoEl.on('click', '.bx-start', clickStartBind);
707
+ slider.controls.autoEl.on('click', '.bx-stop', clickStopBind);
708
+ // if autoControlsCombine, insert only the "start" control
709
+ if (slider.settings.autoControlsCombine) {
710
+ slider.controls.autoEl.append(slider.controls.start);
711
+ // if autoControlsCombine is false, insert both controls
712
+ } else {
713
+ slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
714
+ }
715
+ // if auto controls selector was supplied, populate it with the controls
716
+ if (slider.settings.autoControlsSelector) {
717
+ $(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
718
+ // if auto controls selector was not supplied, add it after the wrapper
719
+ } else {
720
+ slider.controls.el.addClass('bx-has-controls-auto').append(slider.controls.autoEl);
721
+ }
722
+ // update the auto controls
723
+ updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');
724
+ };
725
+
726
+ /**
727
+ * Appends image captions to the DOM
728
+ */
729
+ var appendCaptions = function() {
730
+ // cycle through each child
731
+ slider.children.each(function(index) {
732
+ // get the image title attribute
733
+ var title = $(this).find('img:first').attr('title');
734
+ // append the caption
735
+ if (title !== undefined && ('' + title).length) {
736
+ $(this).append('<div class="bx-caption"><span>' + title + '</span></div>');
737
+ }
738
+ });
739
+ };
740
+
741
+ /**
742
+ * Click next binding
743
+ *
744
+ * @param e (event)
745
+ * - DOM event object
746
+ */
747
+ var clickNextBind = function(e) {
748
+ e.preventDefault();
749
+ if (slider.controls.el.hasClass('disabled')) { return; }
750
+ // if auto show is running, stop it
751
+ if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
752
+ el.goToNextSlide();
753
+ };
754
+
755
+ /**
756
+ * Click prev binding
757
+ *
758
+ * @param e (event)
759
+ * - DOM event object
760
+ */
761
+ var clickPrevBind = function(e) {
762
+ e.preventDefault();
763
+ if (slider.controls.el.hasClass('disabled')) { return; }
764
+ // if auto show is running, stop it
765
+ if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
766
+ el.goToPrevSlide();
767
+ };
768
+
769
+ /**
770
+ * Click start binding
771
+ *
772
+ * @param e (event)
773
+ * - DOM event object
774
+ */
775
+ var clickStartBind = function(e) {
776
+ el.startAuto();
777
+ e.preventDefault();
778
+ };
779
+
780
+ /**
781
+ * Click stop binding
782
+ *
783
+ * @param e (event)
784
+ * - DOM event object
785
+ */
786
+ var clickStopBind = function(e) {
787
+ el.stopAuto();
788
+ e.preventDefault();
789
+ };
790
+
791
+ /**
792
+ * Click pager binding
793
+ *
794
+ * @param e (event)
795
+ * - DOM event object
796
+ */
797
+ var clickPagerBind = function(e) {
798
+ var pagerLink, pagerIndex;
799
+ e.preventDefault();
800
+ if (slider.controls.el.hasClass('disabled')) {
801
+ return;
802
+ }
803
+ // if auto show is running, stop it
804
+ if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
805
+ pagerLink = $(e.currentTarget);
806
+ if (pagerLink.attr('data-slide-index') !== undefined) {
807
+ pagerIndex = parseInt(pagerLink.attr('data-slide-index'));
808
+ // if clicked pager link is not active, continue with the goToSlide call
809
+ if (pagerIndex !== slider.active.index) { el.goToSlide(pagerIndex); }
810
+ }
811
+ };
812
+
813
+ /**
814
+ * Updates the pager links with an active class
815
+ *
816
+ * @param slideIndex (int)
817
+ * - index of slide to make active
818
+ */
819
+ var updatePagerActive = function(slideIndex) {
820
+ // if "short" pager type
821
+ var len = slider.children.length; // nb of children
822
+ if (slider.settings.pagerType === 'short') {
823
+ if (slider.settings.maxSlides > 1) {
824
+ len = Math.ceil(slider.children.length / slider.settings.maxSlides);
825
+ }
826
+ slider.pagerEl.html((slideIndex + 1) + slider.settings.pagerShortSeparator + len);
827
+ return;
828
+ }
829
+ // remove all pager active classes
830
+ slider.pagerEl.find('a').removeClass('active');
831
+ // apply the active class for all pagers
832
+ slider.pagerEl.each(function(i, el) { $(el).find('a').eq(slideIndex).addClass('active'); });
833
+ };
834
+
835
+ /**
836
+ * Performs needed actions after a slide transition
837
+ */
838
+ var updateAfterSlideTransition = function() {
839
+ // if infinite loop is true
840
+ if (slider.settings.infiniteLoop) {
841
+ var position = '';
842
+ // first slide
843
+ if (slider.active.index === 0) {
844
+ // set the new position
845
+ position = slider.children.eq(0).position();
846
+ // carousel, last slide
847
+ } else if (slider.active.index === getPagerQty() - 1 && slider.carousel) {
848
+ position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();
849
+ // last slide
850
+ } else if (slider.active.index === slider.children.length - 1) {
851
+ position = slider.children.eq(slider.children.length - 1).position();
852
+ }
853
+ if (position) {
854
+ if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
855
+ else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
856
+ }
857
+ }
858
+ // declare that the transition is complete
859
+ slider.working = false;
860
+ // onSlideAfter callback
861
+ slider.settings.onSlideAfter.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
862
+ };
863
+
864
+ /**
865
+ * Updates the auto controls state (either active, or combined switch)
866
+ *
867
+ * @param state (string) "start", "stop"
868
+ * - the new state of the auto show
869
+ */
870
+ var updateAutoControls = function(state) {
871
+ // if autoControlsCombine is true, replace the current control with the new state
872
+ if (slider.settings.autoControlsCombine) {
873
+ slider.controls.autoEl.html(slider.controls[state]);
874
+ // if autoControlsCombine is false, apply the "active" class to the appropriate control
875
+ } else {
876
+ slider.controls.autoEl.find('a').removeClass('active');
877
+ slider.controls.autoEl.find('a:not(.bx-' + state + ')').addClass('active');
878
+ }
879
+ };
880
+
881
+ /**
882
+ * Updates the direction controls (checks if either should be hidden)
883
+ */
884
+ var updateDirectionControls = function() {
885
+ if (getPagerQty() === 1) {
886
+ slider.controls.prev.addClass('disabled');
887
+ slider.controls.next.addClass('disabled');
888
+ } else if (!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd) {
889
+ // if first slide
890
+ if (slider.active.index === 0) {
891
+ slider.controls.prev.addClass('disabled');
892
+ slider.controls.next.removeClass('disabled');
893
+ // if last slide
894
+ } else if (slider.active.index === getPagerQty() - 1) {
895
+ slider.controls.next.addClass('disabled');
896
+ slider.controls.prev.removeClass('disabled');
897
+ // if any slide in the middle
898
+ } else {
899
+ slider.controls.prev.removeClass('disabled');
900
+ slider.controls.next.removeClass('disabled');
901
+ }
902
+ }
903
+ };
904
+
905
+ /**
906
+ * Initializes the auto process
907
+ */
908
+ var initAuto = function() {
909
+ // if autoDelay was supplied, launch the auto show using a setTimeout() call
910
+ if (slider.settings.autoDelay > 0) {
911
+ var timeout = setTimeout(el.startAuto, slider.settings.autoDelay);
912
+ // if autoDelay was not supplied, start the auto show normally
913
+ } else {
914
+ el.startAuto();
915
+
916
+ //add focus and blur events to ensure its running if timeout gets paused
917
+ $(window).focus(function() {
918
+ el.startAuto();
919
+ }).blur(function() {
920
+ el.stopAuto();
921
+ });
922
+ }
923
+ // if autoHover is requested
924
+ if (slider.settings.autoHover) {
925
+ // on el hover
926
+ el.hover(function() {
927
+ // if the auto show is currently playing (has an active interval)
928
+ if (slider.interval) {
929
+ // stop the auto show and pass true argument which will prevent control update
930
+ el.stopAuto(true);
931
+ // create a new autoPaused value which will be used by the relative "mouseout" event
932
+ slider.autoPaused = true;
933
+ }
934
+ }, function() {
935
+ // if the autoPaused value was created be the prior "mouseover" event
936
+ if (slider.autoPaused) {
937
+ // start the auto show and pass true argument which will prevent control update
938
+ el.startAuto(true);
939
+ // reset the autoPaused value
940
+ slider.autoPaused = null;
941
+ }
942
+ });
943
+ }
944
+ };
945
+
946
+ /**
947
+ * Initializes the ticker process
948
+ */
949
+ var initTicker = function() {
950
+ var startPosition = 0,
951
+ position, transform, value, idx, ratio, property, newSpeed, totalDimens;
952
+ // if autoDirection is "next", append a clone of the entire slider
953
+ if (slider.settings.autoDirection === 'next') {
954
+ el.append(slider.children.clone().addClass('bx-clone'));
955
+ // if autoDirection is "prev", prepend a clone of the entire slider, and set the left position
956
+ } else {
957
+ el.prepend(slider.children.clone().addClass('bx-clone'));
958
+ position = slider.children.first().position();
959
+ startPosition = slider.settings.mode === 'horizontal' ? -position.left : -position.top;
960
+ }
961
+ setPositionProperty(startPosition, 'reset', 0);
962
+ // do not allow controls in ticker mode
963
+ slider.settings.pager = false;
964
+ slider.settings.controls = false;
965
+ slider.settings.autoControls = false;
966
+ // if autoHover is requested
967
+ if (slider.settings.tickerHover) {
968
+ if (slider.usingCSS) {
969
+ idx = slider.settings.mode === 'horizontal' ? 4 : 5;
970
+ slider.viewport.hover(function() {
971
+ transform = el.css('-' + slider.cssPrefix + '-transform');
972
+ value = parseFloat(transform.split(',')[idx]);
973
+ setPositionProperty(value, 'reset', 0);
974
+ }, function() {
975
+ totalDimens = 0;
976
+ slider.children.each(function(index) {
977
+ totalDimens += slider.settings.mode === 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
978
+ });
979
+ // calculate the speed ratio (used to determine the new speed to finish the paused animation)
980
+ ratio = slider.settings.speed / totalDimens;
981
+ // determine which property to use
982
+ property = slider.settings.mode === 'horizontal' ? 'left' : 'top';
983
+ // calculate the new speed
984
+ newSpeed = ratio * (totalDimens - (Math.abs(parseInt(value))));
985
+ tickerLoop(newSpeed);
986
+ });
987
+ } else {
988
+ // on el hover
989
+ slider.viewport.hover(function() {
990
+ el.stop();
991
+ }, function() {
992
+ // calculate the total width of children (used to calculate the speed ratio)
993
+ totalDimens = 0;
994
+ slider.children.each(function(index) {
995
+ totalDimens += slider.settings.mode === 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
996
+ });
997
+ // calculate the speed ratio (used to determine the new speed to finish the paused animation)
998
+ ratio = slider.settings.speed / totalDimens;
999
+ // determine which property to use
1000
+ property = slider.settings.mode === 'horizontal' ? 'left' : 'top';
1001
+ // calculate the new speed
1002
+ newSpeed = ratio * (totalDimens - (Math.abs(parseInt(el.css(property)))));
1003
+ tickerLoop(newSpeed);
1004
+ });
1005
+ }
1006
+ }
1007
+ // start the ticker loop
1008
+ tickerLoop();
1009
+ };
1010
+
1011
+ /**
1012
+ * Runs a continuous loop, news ticker-style
1013
+ */
1014
+ var tickerLoop = function(resumeSpeed) {
1015
+ var speed = resumeSpeed ? resumeSpeed : slider.settings.speed,
1016
+ position = {left: 0, top: 0},
1017
+ reset = {left: 0, top: 0},
1018
+ animateProperty, resetValue, params;
1019
+
1020
+ // if "next" animate left position to last child, then reset left to 0
1021
+ if (slider.settings.autoDirection === 'next') {
1022
+ position = el.find('.bx-clone').first().position();
1023
+ // if "prev" animate left position to 0, then reset left to first non-clone child
1024
+ } else {
1025
+ reset = slider.children.first().position();
1026
+ }
1027
+ animateProperty = slider.settings.mode === 'horizontal' ? -position.left : -position.top;
1028
+ resetValue = slider.settings.mode === 'horizontal' ? -reset.left : -reset.top;
1029
+ params = {resetValue: resetValue};
1030
+ setPositionProperty(animateProperty, 'ticker', speed, params);
1031
+ };
1032
+
1033
+ /**
1034
+ * Check if el is on screen
1035
+ */
1036
+ var isOnScreen = function(el) {
1037
+ var win = $(window),
1038
+ viewport = {
1039
+ top: win.scrollTop(),
1040
+ left: win.scrollLeft()
1041
+ },
1042
+ bounds = el.offset();
1043
+
1044
+ viewport.right = viewport.left + win.width();
1045
+ viewport.bottom = viewport.top + win.height();
1046
+ bounds.right = bounds.left + el.outerWidth();
1047
+ bounds.bottom = bounds.top + el.outerHeight();
1048
+
1049
+ return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom));
1050
+ };
1051
+
1052
+ /**
1053
+ * Initializes keyboard events
1054
+ */
1055
+ var keyPress = function(e) {
1056
+ var activeElementTag = document.activeElement.tagName.toLowerCase(),
1057
+ tagFilters = 'input|textarea',
1058
+ p = new RegExp(activeElementTag,['i']),
1059
+ result = p.exec(tagFilters);
1060
+
1061
+ if (result == null && isOnScreen(el)) {
1062
+ if (e.keyCode === 39) {
1063
+ clickNextBind(e);
1064
+ return false;
1065
+ } else if (e.keyCode === 37) {
1066
+ clickPrevBind(e);
1067
+ return false;
1068
+ }
1069
+ }
1070
+ };
1071
+
1072
+ /**
1073
+ * Initializes touch events
1074
+ */
1075
+ var initTouch = function() {
1076
+ // initialize object to contain all touch values
1077
+ slider.touch = {
1078
+ start: {x: 0, y: 0},
1079
+ end: {x: 0, y: 0}
1080
+ };
1081
+ slider.viewport.bind('touchstart MSPointerDown pointerdown', onTouchStart);
1082
+
1083
+ //for browsers that have implemented pointer events and fire a click after
1084
+ //every pointerup regardless of whether pointerup is on same screen location as pointerdown or not
1085
+ slider.viewport.on('click', '.bxslider a', function(e) {
1086
+ if (slider.viewport.hasClass('click-disabled')) {
1087
+ e.preventDefault();
1088
+ slider.viewport.removeClass('click-disabled');
1089
+ }
1090
+ });
1091
+ };
1092
+
1093
+ /**
1094
+ * Event handler for "touchstart"
1095
+ *
1096
+ * @param e (event)
1097
+ * - DOM event object
1098
+ */
1099
+ var onTouchStart = function(e) {
1100
+ //disable slider controls while user is interacting with slides to avoid slider freeze that happens on touch devices when a slide swipe happens immediately after interacting with slider controls
1101
+ slider.controls.el.addClass('disabled');
1102
+
1103
+ if (slider.working) {
1104
+ e.preventDefault();
1105
+ slider.controls.el.removeClass('disabled');
1106
+ } else {
1107
+ // record the original position when touch starts
1108
+ slider.touch.originalPos = el.position();
1109
+ var orig = e.originalEvent,
1110
+ touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig];
1111
+ // record the starting touch x, y coordinates
1112
+ slider.touch.start.x = touchPoints[0].pageX;
1113
+ slider.touch.start.y = touchPoints[0].pageY;
1114
+
1115
+ if (slider.viewport.get(0).setPointerCapture) {
1116
+ slider.pointerId = orig.pointerId;
1117
+ slider.viewport.get(0).setPointerCapture(slider.pointerId);
1118
+ }
1119
+ // bind a "touchmove" event to the viewport
1120
+ slider.viewport.bind('touchmove MSPointerMove pointermove', onTouchMove);
1121
+ // bind a "touchend" event to the viewport
1122
+ slider.viewport.bind('touchend MSPointerUp pointerup', onTouchEnd);
1123
+ slider.viewport.bind('MSPointerCancel pointercancel', onPointerCancel);
1124
+ }
1125
+ };
1126
+
1127
+ /**
1128
+ * Cancel Pointer for Windows Phone
1129
+ *
1130
+ * @param e (event)
1131
+ * - DOM event object
1132
+ */
1133
+ var onPointerCancel = function(e) {
1134
+ /* onPointerCancel handler is needed to deal with situations when a touchend
1135
+ doesn't fire after a touchstart (this happens on windows phones only) */
1136
+ setPositionProperty(slider.touch.originalPos.left, 'reset', 0);
1137
+
1138
+ //remove handlers
1139
+ slider.controls.el.removeClass('disabled');
1140
+ slider.viewport.unbind('MSPointerCancel pointercancel', onPointerCancel);
1141
+ slider.viewport.unbind('touchmove MSPointerMove pointermove', onTouchMove);
1142
+ slider.viewport.unbind('touchend MSPointerUp pointerup', onTouchEnd);
1143
+ if (slider.viewport.get(0).releasePointerCapture) {
1144
+ slider.viewport.get(0).releasePointerCapture(slider.pointerId);
1145
+ }
1146
+ };
1147
+
1148
+ /**
1149
+ * Event handler for "touchmove"
1150
+ *
1151
+ * @param e (event)
1152
+ * - DOM event object
1153
+ */
1154
+ var onTouchMove = function(e) {
1155
+ var orig = e.originalEvent,
1156
+ touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],
1157
+ // if scrolling on y axis, do not prevent default
1158
+ xMovement = Math.abs(touchPoints[0].pageX - slider.touch.start.x),
1159
+ yMovement = Math.abs(touchPoints[0].pageY - slider.touch.start.y),
1160
+ value = 0,
1161
+ change = 0;
1162
+
1163
+ // x axis swipe
1164
+ if ((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX) {
1165
+ e.preventDefault();
1166
+ // y axis swipe
1167
+ } else if ((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY) {
1168
+ e.preventDefault();
1169
+ }
1170
+ if (slider.settings.mode !== 'fade' && slider.settings.oneToOneTouch) {
1171
+ // if horizontal, drag along x axis
1172
+ if (slider.settings.mode === 'horizontal') {
1173
+ change = touchPoints[0].pageX - slider.touch.start.x;
1174
+ value = slider.touch.originalPos.left + change;
1175
+ // if vertical, drag along y axis
1176
+ } else {
1177
+ change = touchPoints[0].pageY - slider.touch.start.y;
1178
+ value = slider.touch.originalPos.top + change;
1179
+ }
1180
+ setPositionProperty(value, 'reset', 0);
1181
+ }
1182
+ };
1183
+
1184
+ /**
1185
+ * Event handler for "touchend"
1186
+ *
1187
+ * @param e (event)
1188
+ * - DOM event object
1189
+ */
1190
+ var onTouchEnd = function(e) {
1191
+ slider.viewport.unbind('touchmove MSPointerMove pointermove', onTouchMove);
1192
+ //enable slider controls as soon as user stops interacing with slides
1193
+ slider.controls.el.removeClass('disabled');
1194
+ var orig = e.originalEvent,
1195
+ touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],
1196
+ value = 0,
1197
+ distance = 0;
1198
+ // record end x, y positions
1199
+ slider.touch.end.x = touchPoints[0].pageX;
1200
+ slider.touch.end.y = touchPoints[0].pageY;
1201
+ // if fade mode, check if absolute x distance clears the threshold
1202
+ if (slider.settings.mode === 'fade') {
1203
+ distance = Math.abs(slider.touch.start.x - slider.touch.end.x);
1204
+ if (distance >= slider.settings.swipeThreshold) {
1205
+ if (slider.touch.start.x > slider.touch.end.x) {
1206
+ el.goToNextSlide();
1207
+ } else {
1208
+ el.goToPrevSlide();
1209
+ }
1210
+ el.stopAuto();
1211
+ }
1212
+ // not fade mode
1213
+ } else {
1214
+ // calculate distance and el's animate property
1215
+ if (slider.settings.mode === 'horizontal') {
1216
+ distance = slider.touch.end.x - slider.touch.start.x;
1217
+ value = slider.touch.originalPos.left;
1218
+ } else {
1219
+ distance = slider.touch.end.y - slider.touch.start.y;
1220
+ value = slider.touch.originalPos.top;
1221
+ }
1222
+ // if not infinite loop and first / last slide, do not attempt a slide transition
1223
+ if (!slider.settings.infiniteLoop && ((slider.active.index === 0 && distance > 0) || (slider.active.last && distance < 0))) {
1224
+ setPositionProperty(value, 'reset', 200);
1225
+ } else {
1226
+ // check if distance clears threshold
1227
+ if (Math.abs(distance) >= slider.settings.swipeThreshold) {
1228
+ if (distance < 0) {
1229
+ el.goToNextSlide();
1230
+ } else {
1231
+ el.goToPrevSlide();
1232
+ }
1233
+ el.stopAuto();
1234
+ } else {
1235
+ // el.animate(property, 200);
1236
+ setPositionProperty(value, 'reset', 200);
1237
+ }
1238
+ }
1239
+ }
1240
+ slider.viewport.unbind('touchend MSPointerUp pointerup', onTouchEnd);
1241
+ if (slider.viewport.get(0).releasePointerCapture) {
1242
+ slider.viewport.get(0).releasePointerCapture(slider.pointerId);
1243
+ }
1244
+ };
1245
+
1246
+ /**
1247
+ * Window resize event callback
1248
+ */
1249
+ var resizeWindow = function(e) {
1250
+ // don't do anything if slider isn't initialized.
1251
+ if (!slider.initialized) { return; }
1252
+ // Delay if slider working.
1253
+ if (slider.working) {
1254
+ window.setTimeout(resizeWindow, 10);
1255
+ } else {
1256
+ // get the new window dimens (again, thank you IE)
1257
+ var windowWidthNew = $(window).width(),
1258
+ windowHeightNew = $(window).height();
1259
+ // make sure that it is a true window resize
1260
+ // *we must check this because our dinosaur friend IE fires a window resize event when certain DOM elements
1261
+ // are resized. Can you just die already?*
1262
+ if (windowWidth !== windowWidthNew || windowHeight !== windowHeightNew) {
1263
+ // set the new window dimens
1264
+ windowWidth = windowWidthNew;
1265
+ windowHeight = windowHeightNew;
1266
+ // update all dynamic elements
1267
+ el.redrawSlider();
1268
+ // Call user resize handler
1269
+ slider.settings.onSliderResize.call(el, slider.active.index);
1270
+ }
1271
+ }
1272
+ };
1273
+
1274
+ /**
1275
+ * Adds an aria-hidden=true attribute to each element
1276
+ *
1277
+ * @param startVisibleIndex (int)
1278
+ * - the first visible element's index
1279
+ */
1280
+ var applyAriaHiddenAttributes = function(startVisibleIndex) {
1281
+ var numberOfSlidesShowing = getNumberSlidesShowing();
1282
+ // only apply attributes if the setting is enabled and not in ticker mode
1283
+ if (slider.settings.ariaHidden && !slider.settings.ticker) {
1284
+ // add aria-hidden=true to all elements
1285
+ slider.children.attr('aria-hidden', 'true');
1286
+ // get the visible elements and change to aria-hidden=false
1287
+ slider.children.slice(startVisibleIndex, startVisibleIndex + numberOfSlidesShowing).attr('aria-hidden', 'false');
1288
+ }
1289
+ };
1290
+
1291
+ /**
1292
+ * Returns index according to present page range
1293
+ *
1294
+ * @param slideOndex (int)
1295
+ * - the desired slide index
1296
+ */
1297
+ var setSlideIndex = function(slideIndex) {
1298
+ if (slideIndex < 0) {
1299
+ if (slider.settings.infiniteLoop) {
1300
+ return getPagerQty() - 1;
1301
+ }else {
1302
+ //we don't go to undefined slides
1303
+ return slider.active.index;
1304
+ }
1305
+ // if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)
1306
+ } else if (slideIndex >= getPagerQty()) {
1307
+ if (slider.settings.infiniteLoop) {
1308
+ return 0;
1309
+ } else {
1310
+ //we don't move to undefined pages
1311
+ return slider.active.index;
1312
+ }
1313
+ // set active index to requested slide
1314
+ } else {
1315
+ return slideIndex;
1316
+ }
1317
+ };
1318
+
1319
+ /**
1320
+ * ===================================================================================
1321
+ * = PUBLIC FUNCTIONS
1322
+ * ===================================================================================
1323
+ */
1324
+
1325
+ /**
1326
+ * Performs slide transition to the specified slide
1327
+ *
1328
+ * @param slideIndex (int)
1329
+ * - the destination slide's index (zero-based)
1330
+ *
1331
+ * @param direction (string)
1332
+ * - INTERNAL USE ONLY - the direction of travel ("prev" / "next")
1333
+ */
1334
+ el.goToSlide = function(slideIndex, direction) {
1335
+ // onSlideBefore, onSlideNext, onSlidePrev callbacks
1336
+ // Allow transition canceling based on returned value
1337
+ var performTransition = true,
1338
+ moveBy = 0,
1339
+ position = {left: 0, top: 0},
1340
+ lastChild = null,
1341
+ lastShowingIndex, eq, value, requestEl;
1342
+ // store the old index
1343
+ slider.oldIndex = slider.active.index;
1344
+ //set new index
1345
+ slider.active.index = setSlideIndex(slideIndex);
1346
+
1347
+ // if plugin is currently in motion, ignore request
1348
+ if (slider.working || slider.active.index === slider.oldIndex) { return; }
1349
+ // declare that plugin is in motion
1350
+ slider.working = true;
1351
+
1352
+ performTransition = slider.settings.onSlideBefore.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1353
+
1354
+ // If transitions canceled, reset and return
1355
+ if (typeof (performTransition) !== 'undefined' && !performTransition) {
1356
+ slider.active.index = slider.oldIndex; // restore old index
1357
+ slider.working = false; // is not in motion
1358
+ return;
1359
+ }
1360
+
1361
+ if (direction === 'next') {
1362
+ // Prevent canceling in future functions or lack there-of from negating previous commands to cancel
1363
+ if (!slider.settings.onSlideNext.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {
1364
+ performTransition = false;
1365
+ }
1366
+ } else if (direction === 'prev') {
1367
+ // Prevent canceling in future functions or lack there-of from negating previous commands to cancel
1368
+ if (!slider.settings.onSlidePrev.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {
1369
+ performTransition = false;
1370
+ }
1371
+ }
1372
+
1373
+ // check if last slide
1374
+ slider.active.last = slider.active.index >= getPagerQty() - 1;
1375
+ // update the pager with active class
1376
+ if (slider.settings.pager || slider.settings.pagerCustom) { updatePagerActive(slider.active.index); }
1377
+ // // check for direction control update
1378
+ if (slider.settings.controls) { updateDirectionControls(); }
1379
+ // if slider is set to mode: "fade"
1380
+ if (slider.settings.mode === 'fade') {
1381
+ // if adaptiveHeight is true and next height is different from current height, animate to the new height
1382
+ if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {
1383
+ slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1384
+ }
1385
+ // fade out the visible child and reset its z-index value
1386
+ slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});
1387
+ // fade in the newly requested slide
1388
+ slider.children.eq(slider.active.index).css('zIndex', slider.settings.slideZIndex + 1).fadeIn(slider.settings.speed, function() {
1389
+ $(this).css('zIndex', slider.settings.slideZIndex);
1390
+ updateAfterSlideTransition();
1391
+ });
1392
+ // slider mode is not "fade"
1393
+ } else {
1394
+ // if adaptiveHeight is true and next height is different from current height, animate to the new height
1395
+ if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {
1396
+ slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1397
+ }
1398
+ // if carousel and not infinite loop
1399
+ if (!slider.settings.infiniteLoop && slider.carousel && slider.active.last) {
1400
+ if (slider.settings.mode === 'horizontal') {
1401
+ // get the last child position
1402
+ lastChild = slider.children.eq(slider.children.length - 1);
1403
+ position = lastChild.position();
1404
+ // calculate the position of the last slide
1405
+ moveBy = slider.viewport.width() - lastChild.outerWidth();
1406
+ } else {
1407
+ // get last showing index position
1408
+ lastShowingIndex = slider.children.length - slider.settings.minSlides;
1409
+ position = slider.children.eq(lastShowingIndex).position();
1410
+ }
1411
+ // horizontal carousel, going previous while on first slide (infiniteLoop mode)
1412
+ } else if (slider.carousel && slider.active.last && direction === 'prev') {
1413
+ // get the last child position
1414
+ eq = slider.settings.moveSlides === 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);
1415
+ lastChild = el.children('.bx-clone').eq(eq);
1416
+ position = lastChild.position();
1417
+ // if infinite loop and "Next" is clicked on the last slide
1418
+ } else if (direction === 'next' && slider.active.index === 0) {
1419
+ // get the last clone position
1420
+ position = el.find('> .bx-clone').eq(slider.settings.maxSlides).position();
1421
+ slider.active.last = false;
1422
+ // normal non-zero requests
1423
+ } else if (slideIndex >= 0) {
1424
+ //parseInt is applied to allow floats for slides/page
1425
+ requestEl = slideIndex * parseInt(getMoveBy());
1426
+ position = slider.children.eq(requestEl).position();
1427
+ }
1428
+
1429
+ /* If the position doesn't exist
1430
+ * (e.g. if you destroy the slider on a next click),
1431
+ * it doesn't throw an error.
1432
+ */
1433
+ if (typeof (position) !== 'undefined') {
1434
+ value = slider.settings.mode === 'horizontal' ? -(position.left - moveBy) : -position.top;
1435
+ // plugin values to be animated
1436
+ setPositionProperty(value, 'slide', slider.settings.speed);
1437
+ } else {
1438
+ slider.working = false;
1439
+ }
1440
+ }
1441
+ if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }
1442
+ };
1443
+
1444
+ /**
1445
+ * Transitions to the next slide in the show
1446
+ */
1447
+ el.goToNextSlide = function() {
1448
+ // if infiniteLoop is false and last page is showing, disregard call
1449
+ if (!slider.settings.infiniteLoop && slider.active.last) { return; }
1450
+ var pagerIndex = parseInt(slider.active.index) + 1;
1451
+ el.goToSlide(pagerIndex, 'next');
1452
+ };
1453
+
1454
+ /**
1455
+ * Transitions to the prev slide in the show
1456
+ */
1457
+ el.goToPrevSlide = function() {
1458
+ // if infiniteLoop is false and last page is showing, disregard call
1459
+ if (!slider.settings.infiniteLoop && slider.active.index === 0) { return; }
1460
+ var pagerIndex = parseInt(slider.active.index) - 1;
1461
+ el.goToSlide(pagerIndex, 'prev');
1462
+ };
1463
+
1464
+ /**
1465
+ * Starts the auto show
1466
+ *
1467
+ * @param preventControlUpdate (boolean)
1468
+ * - if true, auto controls state will not be updated
1469
+ */
1470
+ el.startAuto = function(preventControlUpdate) {
1471
+ // if an interval already exists, disregard call
1472
+ if (slider.interval) { return; }
1473
+ // create an interval
1474
+ slider.interval = setInterval(function() {
1475
+ if (slider.settings.autoDirection === 'next') {
1476
+ el.goToNextSlide();
1477
+ } else {
1478
+ el.goToPrevSlide();
1479
+ }
1480
+ }, slider.settings.pause);
1481
+ // if auto controls are displayed and preventControlUpdate is not true
1482
+ if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('stop'); }
1483
+ };
1484
+
1485
+ /**
1486
+ * Stops the auto show
1487
+ *
1488
+ * @param preventControlUpdate (boolean)
1489
+ * - if true, auto controls state will not be updated
1490
+ */
1491
+ el.stopAuto = function(preventControlUpdate) {
1492
+ // if no interval exists, disregard call
1493
+ if (!slider.interval) { return; }
1494
+ // clear the interval
1495
+ clearInterval(slider.interval);
1496
+ slider.interval = null;
1497
+ // if auto controls are displayed and preventControlUpdate is not true
1498
+ if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('start'); }
1499
+ };
1500
+
1501
+ /**
1502
+ * Returns current slide index (zero-based)
1503
+ */
1504
+ el.getCurrentSlide = function() {
1505
+ return slider.active.index;
1506
+ };
1507
+
1508
+ /**
1509
+ * Returns current slide element
1510
+ */
1511
+ el.getCurrentSlideElement = function() {
1512
+ return slider.children.eq(slider.active.index);
1513
+ };
1514
+
1515
+ /**
1516
+ * Returns a slide element
1517
+ * @param index (int)
1518
+ * - The index (zero-based) of the element you want returned.
1519
+ */
1520
+ el.getSlideElement = function(index) {
1521
+ return slider.children.eq(index);
1522
+ };
1523
+
1524
+ /**
1525
+ * Returns number of slides in show
1526
+ */
1527
+ el.getSlideCount = function() {
1528
+ return slider.children.length;
1529
+ };
1530
+
1531
+ /**
1532
+ * Return slider.working variable
1533
+ */
1534
+ el.isWorking = function() {
1535
+ return slider.working;
1536
+ };
1537
+
1538
+ /**
1539
+ * Update all dynamic slider elements
1540
+ */
1541
+ el.redrawSlider = function() {
1542
+ // resize all children in ratio to new screen size
1543
+ slider.children.add(el.find('.bx-clone')).outerWidth(getSlideWidth());
1544
+ // adjust the height
1545
+ slider.viewport.css('height', getViewportHeight());
1546
+ // update the slide position
1547
+ if (!slider.settings.ticker) { setSlidePosition(); }
1548
+ // if active.last was true before the screen resize, we want
1549
+ // to keep it last no matter what screen size we end on
1550
+ if (slider.active.last) { slider.active.index = getPagerQty() - 1; }
1551
+ // if the active index (page) no longer exists due to the resize, simply set the index as last
1552
+ if (slider.active.index >= getPagerQty()) { slider.active.last = true; }
1553
+ // if a pager is being displayed and a custom pager is not being used, update it
1554
+ if (slider.settings.pager && !slider.settings.pagerCustom) {
1555
+ populatePager();
1556
+ updatePagerActive(slider.active.index);
1557
+ }
1558
+ if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }
1559
+ };
1560
+
1561
+ /**
1562
+ * Destroy the current instance of the slider (revert everything back to original state)
1563
+ */
1564
+ el.destroySlider = function() {
1565
+ // don't do anything if slider has already been destroyed
1566
+ if (!slider.initialized) { return; }
1567
+ slider.initialized = false;
1568
+ $('.bx-clone', this).remove();
1569
+ slider.children.each(function() {
1570
+ if ($(this).data('origStyle') !== undefined) {
1571
+ $(this).attr('style', $(this).data('origStyle'));
1572
+ } else {
1573
+ $(this).removeAttr('style');
1574
+ }
1575
+ });
1576
+ if ($(this).data('origStyle') !== undefined) {
1577
+ this.attr('style', $(this).data('origStyle'));
1578
+ } else {
1579
+ $(this).removeAttr('style');
1580
+ }
1581
+ $(this).unwrap().unwrap();
1582
+ if (slider.controls.el) { slider.controls.el.remove(); }
1583
+ if (slider.controls.next) { slider.controls.next.remove(); }
1584
+ if (slider.controls.prev) { slider.controls.prev.remove(); }
1585
+ if (slider.pagerEl && slider.settings.controls && !slider.settings.pagerCustom) { slider.pagerEl.remove(); }
1586
+ $('.bx-caption', this).remove();
1587
+ if (slider.controls.autoEl) { slider.controls.autoEl.remove(); }
1588
+ clearInterval(slider.interval);
1589
+ if (slider.settings.responsive) { $(window).unbind('resize', resizeWindow); }
1590
+ if (slider.settings.keyboardEnabled) { $(document).unbind('keydown', keyPress); }
1591
+ //remove self reference in data
1592
+ $(this).removeData('bxSlider');
1593
+ };
1594
+
1595
+ /**
1596
+ * Reload the slider (revert all DOM changes, and re-initialize)
1597
+ */
1598
+ el.reloadSlider = function(settings) {
1599
+ if (settings !== undefined) { options = settings; }
1600
+ el.destroySlider();
1601
+ init();
1602
+ //store reference to self in order to access public functions later
1603
+ $(el).data('bxSlider', this);
1604
+ };
1605
+
1606
+ init();
1607
+
1608
+ $(el).data('bxSlider', this);
1609
+
1610
+ // returns the current jQuery object
1611
+ return this;
1612
+ };
1613
+
1614
+ })(jQuery);
includes/vendors/bxslider/jquery.bxslider.min.css ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * bxSlider v4.2.5
3
+ * Copyright 2013-2015 Steven Wanderski
4
+ * Written while drinking Belgian ales and listening to jazz
5
+
6
+ * Licensed under MIT (http://opensource.org/licenses/MIT)
7
+ */
8
+
9
+
10
+ .bx-wrapper{position:relative;margin:0 auto 60px;padding:0;*zoom:1;-ms-touch-action:pan-y;touch-action:pan-y}.bx-wrapper img{max-width:100%;display:block}.bxslider{margin:0;padding:0}ul.bxslider{list-style:none}.bx-viewport{-webkit-transform:translatez(0)}.bx-wrapper{-moz-box-shadow:0 0 5px #ccc;-webkit-box-shadow:0 0 5px #ccc;box-shadow:0 0 5px #ccc;border:5px solid #fff;background:#fff}.bx-wrapper .bx-controls-auto,.bx-wrapper .bx-pager{position:absolute;bottom:-30px;width:100%}.bx-wrapper .bx-loading{min-height:50px;background:url(images/bx_loader.gif) center center no-repeat #fff;height:100%;width:100%;position:absolute;top:0;left:0;z-index:2000}.bx-wrapper .bx-pager{text-align:center;font-size:.85em;font-family:Arial;font-weight:700;color:#666;padding-top:20px}.bx-wrapper .bx-pager.bx-default-pager a{background:#666;text-indent:-9999px;display:block;width:10px;height:10px;margin:0 5px;outline:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.bx-wrapper .bx-pager.bx-default-pager a.active,.bx-wrapper .bx-pager.bx-default-pager a:focus,.bx-wrapper .bx-pager.bx-default-pager a:hover{background:#000}.bx-wrapper .bx-controls-auto .bx-controls-auto-item,.bx-wrapper .bx-pager-item{display:inline-block;*zoom:1;*display:inline}.bx-wrapper .bx-pager-item{font-size:0;line-height:0}.bx-wrapper .bx-prev{left:10px;background:url(images/controls.png) no-repeat 0 -32px}.bx-wrapper .bx-prev:focus,.bx-wrapper .bx-prev:hover{background-position:0 0}.bx-wrapper .bx-next{right:10px;background:url(images/controls.png) no-repeat -43px -32px}.bx-wrapper .bx-next:focus,.bx-wrapper .bx-next:hover{background-position:-43px 0}.bx-wrapper .bx-controls-direction a{position:absolute;top:50%;margin-top:-16px;outline:0;width:32px;height:32px;text-indent:-9999px;z-index:9999}.bx-wrapper .bx-controls-direction a.disabled{display:none}.bx-wrapper .bx-controls-auto{text-align:center}.bx-wrapper .bx-controls-auto .bx-start{display:block;text-indent:-9999px;width:10px;height:11px;outline:0;background:url(images/controls.png) -86px -11px no-repeat;margin:0 3px}.bx-wrapper .bx-controls-auto .bx-start.active,.bx-wrapper .bx-controls-auto .bx-start:focus,.bx-wrapper .bx-controls-auto .bx-start:hover{background-position:-86px 0}.bx-wrapper .bx-controls-auto .bx-stop{display:block;text-indent:-9999px;width:9px;height:11px;outline:0;background:url(images/controls.png) -86px -44px no-repeat;margin:0 3px}.bx-wrapper .bx-controls-auto .bx-stop.active,.bx-wrapper .bx-controls-auto .bx-stop:focus,.bx-wrapper .bx-controls-auto .bx-stop:hover{background-position:-86px -33px}.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager{text-align:left;width:80%}.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto{right:0;width:35px}.bx-wrapper .bx-caption{position:absolute;bottom:0;left:0;background:#666;background:rgba(80,80,80,.75);width:100%}.bx-wrapper .bx-caption span{color:#fff;font-family:Arial;display:block;font-size:.85em;padding:10px}
includes/vendors/bxslider/jquery.bxslider.min.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * bxSlider v4.2.5
3
+ * Copyright 2013-2015 Steven Wanderski
4
+ * Written while drinking Belgian ales and listening to jazz
5
+
6
+ * Licensed under MIT (http://opensource.org/licenses/MIT)
7
+ */
8
+
9
+ !function(a){var b={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,shrinkItems:!1,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0}};a.fn.bxSlider=function(c){if(0===this.length)return this;if(this.length>1)return this.each(function(){a(this).bxSlider(c)}),this;var d={},e=this,f=a(window).width(),g=a(window).height();if(!a(e).data("bxSlider")){var h=function(){a(e).data("bxSlider")||(d.settings=a.extend({},b,c),d.settings.slideWidth=parseInt(d.settings.slideWidth),d.children=e.children(d.settings.slideSelector),d.children.length<d.settings.minSlides&&(d.settings.minSlides=d.children.length),d.children.length<d.settings.maxSlides&&(d.settings.maxSlides=d.children.length),d.settings.randomStart&&(d.settings.startSlide=Math.floor(Math.random()*d.children.length)),d.active={index:d.settings.startSlide},d.carousel=d.settings.minSlides>1||d.settings.maxSlides>1?!0:!1,d.carousel&&(d.settings.preloadImages="all"),d.minThreshold=d.settings.minSlides*d.settings.slideWidth+(d.settings.minSlides-1)*d.settings.slideMargin,d.maxThreshold=d.settings.maxSlides*d.settings.slideWidth+(d.settings.maxSlides-1)*d.settings.slideMargin,d.working=!1,d.controls={},d.interval=null,d.animProp="vertical"===d.settings.mode?"top":"left",d.usingCSS=d.settings.useCSS&&"fade"!==d.settings.mode&&function(){for(var a=document.createElement("div"),b=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],c=0;c<b.length;c++)if(void 0!==a.style[b[c]])return d.cssPrefix=b[c].replace("Perspective","").toLowerCase(),d.animProp="-"+d.cssPrefix+"-transform",!0;return!1}(),"vertical"===d.settings.mode&&(d.settings.maxSlides=d.settings.minSlides),e.data("origStyle",e.attr("style")),e.children(d.settings.slideSelector).each(function(){a(this).data("origStyle",a(this).attr("style"))}),j())},j=function(){var b=d.children.eq(d.settings.startSlide);e.wrap('<div class="'+d.settings.wrapperClass+'"><div class="bx-viewport"></div></div>'),d.viewport=e.parent(),d.settings.ariaLive&&!d.settings.ticker&&d.viewport.attr("aria-live","polite"),d.loader=a('<div class="bx-loading" />'),d.viewport.prepend(d.loader),e.css({width:"horizontal"===d.settings.mode?1e3*d.children.length+215+"%":"auto",position:"relative"}),d.usingCSS&&d.settings.easing?e.css("-"+d.cssPrefix+"-transition-timing-function",d.settings.easing):d.settings.easing||(d.settings.easing="swing"),d.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),d.viewport.parent().css({maxWidth:n()}),d.settings.pager||d.settings.controls||d.viewport.parent().css({margin:"0 auto 0px"}),d.children.css({"float":"horizontal"===d.settings.mode?"left":"none",listStyle:"none",position:"relative"}),d.children.css("width",o()),"horizontal"===d.settings.mode&&d.settings.slideMargin>0&&d.children.css("marginRight",d.settings.slideMargin),"vertical"===d.settings.mode&&d.settings.slideMargin>0&&d.children.css("marginBottom",d.settings.slideMargin),"fade"===d.settings.mode&&(d.children.css({position:"absolute",zIndex:0,display:"none"}),d.children.eq(d.settings.startSlide).css({zIndex:d.settings.slideZIndex,display:"block"})),d.controls.el=a('<div class="bx-controls" />'),d.settings.captions&&y(),d.active.last=d.settings.startSlide===q()-1,d.settings.video&&e.fitVids(),("all"===d.settings.preloadImages||d.settings.ticker)&&(b=d.children),d.settings.ticker?d.settings.pager=!1:(d.settings.controls&&w(),d.settings.auto&&d.settings.autoControls&&x(),d.settings.pager&&v(),(d.settings.controls||d.settings.autoControls||d.settings.pager)&&d.viewport.after(d.controls.el)),k(b,l)},k=function(b,c){var d=b.find('img:not([src=""]), iframe').length,e=0;return 0===d?void c():void b.find('img:not([src=""]), iframe').each(function(){a(this).one("load error",function(){++e===d&&c()}).each(function(){this.complete&&a(this).load()})})},l=function(){if(d.settings.infiniteLoop&&"fade"!==d.settings.mode&&!d.settings.ticker){var b="vertical"===d.settings.mode?d.settings.minSlides:d.settings.maxSlides,c=d.children.slice(0,b).clone(!0).addClass("bx-clone"),f=d.children.slice(-b).clone(!0).addClass("bx-clone");d.settings.ariaHidden&&(c.attr("aria-hidden",!0),f.attr("aria-hidden",!0)),e.append(c).prepend(f)}d.loader.remove(),s(),"vertical"===d.settings.mode&&(d.settings.adaptiveHeight=!0),d.viewport.height(m()),e.redrawSlider(),d.settings.onSliderLoad.call(e,d.active.index),d.initialized=!0,d.settings.responsive&&a(window).bind("resize",S),d.settings.auto&&d.settings.autoStart&&(q()>1||d.settings.autoSlideForOnePage)&&I(),d.settings.ticker&&J(),d.settings.pager&&E(d.settings.startSlide),d.settings.controls&&H(),d.settings.touchEnabled&&!d.settings.ticker&&N(),d.settings.keyboardEnabled&&!d.settings.ticker&&a(document).keydown(M)},m=function(){var b=0,c=a();if("vertical"===d.settings.mode||d.settings.adaptiveHeight)if(d.carousel){var e=1===d.settings.moveSlides?d.active.index:d.active.index*r();for(c=d.children.eq(e),i=1;i<=d.settings.maxSlides-1;i++)c=e+i>=d.children.length?c.add(d.children.eq(i-1)):c.add(d.children.eq(e+i))}else c=d.children.eq(d.active.index);else c=d.children;return"vertical"===d.settings.mode?(c.each(function(c){b+=a(this).outerHeight()}),d.settings.slideMargin>0&&(b+=d.settings.slideMargin*(d.settings.minSlides-1))):b=Math.max.apply(Math,c.map(function(){return a(this).outerHeight(!1)}).get()),"border-box"===d.viewport.css("box-sizing")?b+=parseFloat(d.viewport.css("padding-top"))+parseFloat(d.viewport.css("padding-bottom"))+parseFloat(d.viewport.css("border-top-width"))+parseFloat(d.viewport.css("border-bottom-width")):"padding-box"===d.viewport.css("box-sizing")&&(b+=parseFloat(d.viewport.css("padding-top"))+parseFloat(d.viewport.css("padding-bottom"))),b},n=function(){var a="100%";return d.settings.slideWidth>0&&(a="horizontal"===d.settings.mode?d.settings.maxSlides*d.settings.slideWidth+(d.settings.maxSlides-1)*d.settings.slideMargin:d.settings.slideWidth),a},o=function(){var a=d.settings.slideWidth,b=d.viewport.width();if(0===d.settings.slideWidth||d.settings.slideWidth>b&&!d.carousel||"vertical"===d.settings.mode)a=b;else if(d.settings.maxSlides>1&&"horizontal"===d.settings.mode){if(b>d.maxThreshold)return a;b<d.minThreshold?a=(b-d.settings.slideMargin*(d.settings.minSlides-1))/d.settings.minSlides:d.settings.shrinkItems&&(a=Math.floor((b+d.settings.slideMargin)/Math.ceil((b+d.settings.slideMargin)/(a+d.settings.slideMargin))-d.settings.slideMargin))}return a},p=function(){var a=1,b=null;return"horizontal"===d.settings.mode&&d.settings.slideWidth>0?d.viewport.width()<d.minThreshold?a=d.settings.minSlides:d.viewport.width()>d.maxThreshold?a=d.settings.maxSlides:(b=d.children.first().width()+d.settings.slideMargin,a=Math.floor((d.viewport.width()+d.settings.slideMargin)/b)):"vertical"===d.settings.mode&&(a=d.settings.minSlides),a},q=function(){var a=0,b=0,c=0;if(d.settings.moveSlides>0)if(d.settings.infiniteLoop)a=Math.ceil(d.children.length/r());else for(;b<d.children.length;)++a,b=c+p(),c+=d.settings.moveSlides<=p()?d.settings.moveSlides:p();else a=Math.ceil(d.children.length/p());return a},r=function(){return d.settings.moveSlides>0&&d.settings.moveSlides<=p()?d.settings.moveSlides:p()},s=function(){var a,b,c;d.children.length>d.settings.maxSlides&&d.active.last&&!d.settings.infiniteLoop?"horizontal"===d.settings.mode?(b=d.children.last(),a=b.position(),t(-(a.left-(d.viewport.width()-b.outerWidth())),"reset",0)):"vertical"===d.settings.mode&&(c=d.children.length-d.settings.minSlides,a=d.children.eq(c).position(),t(-a.top,"reset",0)):(a=d.children.eq(d.active.index*r()).position(),d.active.index===q()-1&&(d.active.last=!0),void 0!==a&&("horizontal"===d.settings.mode?t(-a.left,"reset",0):"vertical"===d.settings.mode&&t(-a.top,"reset",0)))},t=function(b,c,f,g){var h,i;d.usingCSS?(i="vertical"===d.settings.mode?"translate3d(0, "+b+"px, 0)":"translate3d("+b+"px, 0, 0)",e.css("-"+d.cssPrefix+"-transition-duration",f/1e3+"s"),"slide"===c?(e.css(d.animProp,i),0!==f?e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(b){a(b.target).is(e)&&(e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),F())}):F()):"reset"===c?e.css(d.animProp,i):"ticker"===c&&(e.css("-"+d.cssPrefix+"-transition-timing-function","linear"),e.css(d.animProp,i),0!==f?e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(b){a(b.target).is(e)&&(e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),t(g.resetValue,"reset",0),K())}):(t(g.resetValue,"reset",0),K()))):(h={},h[d.animProp]=b,"slide"===c?e.animate(h,f,d.settings.easing,function(){F()}):"reset"===c?e.css(d.animProp,b):"ticker"===c&&e.animate(h,f,"linear",function(){t(g.resetValue,"reset",0),K()}))},u=function(){for(var b="",c="",e=q(),f=0;e>f;f++)c="",d.settings.buildPager&&a.isFunction(d.settings.buildPager)||d.settings.pagerCustom?(c=d.settings.buildPager(f),d.pagerEl.addClass("bx-custom-pager")):(c=f+1,d.pagerEl.addClass("bx-default-pager")),b+='<div class="bx-pager-item"><a href="" data-slide-index="'+f+'" class="bx-pager-link">'+c+"</a></div>";d.pagerEl.html(b)},v=function(){d.settings.pagerCustom?d.pagerEl=a(d.settings.pagerCustom):(d.pagerEl=a('<div class="bx-pager" />'),d.settings.pagerSelector?a(d.settings.pagerSelector).html(d.pagerEl):d.controls.el.addClass("bx-has-pager").append(d.pagerEl),u()),d.pagerEl.on("click touchend","a",D)},w=function(){d.controls.next=a('<a class="bx-next" href="">'+d.settings.nextText+"</a>"),d.controls.prev=a('<a class="bx-prev" href="">'+d.settings.prevText+"</a>"),d.controls.next.bind("click touchend",z),d.controls.prev.bind("click touchend",A),d.settings.nextSelector&&a(d.settings.nextSelector).append(d.controls.next),d.settings.prevSelector&&a(d.settings.prevSelector).append(d.controls.prev),d.settings.nextSelector||d.settings.prevSelector||(d.controls.directionEl=a('<div class="bx-controls-direction" />'),d.controls.directionEl.append(d.controls.prev).append(d.controls.next),d.controls.el.addClass("bx-has-controls-direction").append(d.controls.directionEl))},x=function(){d.controls.start=a('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+d.settings.startText+"</a></div>"),d.controls.stop=a('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+d.settings.stopText+"</a></div>"),d.controls.autoEl=a('<div class="bx-controls-auto" />'),d.controls.autoEl.on("click",".bx-start",B),d.controls.autoEl.on("click",".bx-stop",C),d.settings.autoControlsCombine?d.controls.autoEl.append(d.controls.start):d.controls.autoEl.append(d.controls.start).append(d.controls.stop),d.settings.autoControlsSelector?a(d.settings.autoControlsSelector).html(d.controls.autoEl):d.controls.el.addClass("bx-has-controls-auto").append(d.controls.autoEl),G(d.settings.autoStart?"stop":"start")},y=function(){d.children.each(function(b){var c=a(this).find("img:first").attr("title");void 0!==c&&(""+c).length&&a(this).append('<div class="bx-caption"><span>'+c+"</span></div>")})},z=function(a){a.preventDefault(),d.controls.el.hasClass("disabled")||(d.settings.auto&&d.settings.stopAutoOnClick&&e.stopAuto(),e.goToNextSlide())},A=function(a){a.preventDefault(),d.controls.el.hasClass("disabled")||(d.settings.auto&&d.settings.stopAutoOnClick&&e.stopAuto(),e.goToPrevSlide())},B=function(a){e.startAuto(),a.preventDefault()},C=function(a){e.stopAuto(),a.preventDefault()},D=function(b){var c,f;b.preventDefault(),d.controls.el.hasClass("disabled")||(d.settings.auto&&d.settings.stopAutoOnClick&&e.stopAuto(),c=a(b.currentTarget),void 0!==c.attr("data-slide-index")&&(f=parseInt(c.attr("data-slide-index")),f!==d.active.index&&e.goToSlide(f)))},E=function(b){var c=d.children.length;return"short"===d.settings.pagerType?(d.settings.maxSlides>1&&(c=Math.ceil(d.children.length/d.settings.maxSlides)),void d.pagerEl.html(b+1+d.settings.pagerShortSeparator+c)):(d.pagerEl.find("a").removeClass("active"),void d.pagerEl.each(function(c,d){a(d).find("a").eq(b).addClass("active")}))},F=function(){if(d.settings.infiniteLoop){var a="";0===d.active.index?a=d.children.eq(0).position():d.active.index===q()-1&&d.carousel?a=d.children.eq((q()-1)*r()).position():d.active.index===d.children.length-1&&(a=d.children.eq(d.children.length-1).position()),a&&("horizontal"===d.settings.mode?t(-a.left,"reset",0):"vertical"===d.settings.mode&&t(-a.top,"reset",0))}d.working=!1,d.settings.onSlideAfter.call(e,d.children.eq(d.active.index),d.oldIndex,d.active.index)},G=function(a){d.settings.autoControlsCombine?d.controls.autoEl.html(d.controls[a]):(d.controls.autoEl.find("a").removeClass("active"),d.controls.autoEl.find("a:not(.bx-"+a+")").addClass("active"))},H=function(){1===q()?(d.controls.prev.addClass("disabled"),d.controls.next.addClass("disabled")):!d.settings.infiniteLoop&&d.settings.hideControlOnEnd&&(0===d.active.index?(d.controls.prev.addClass("disabled"),d.controls.next.removeClass("disabled")):d.active.index===q()-1?(d.controls.next.addClass("disabled"),d.controls.prev.removeClass("disabled")):(d.controls.prev.removeClass("disabled"),d.controls.next.removeClass("disabled")))},I=function(){if(d.settings.autoDelay>0){setTimeout(e.startAuto,d.settings.autoDelay)}else e.startAuto(),a(window).focus(function(){e.startAuto()}).blur(function(){e.stopAuto()});d.settings.autoHover&&e.hover(function(){d.interval&&(e.stopAuto(!0),d.autoPaused=!0)},function(){d.autoPaused&&(e.startAuto(!0),d.autoPaused=null)})},J=function(){var b,c,f,g,h,i,j,k,l=0;"next"===d.settings.autoDirection?e.append(d.children.clone().addClass("bx-clone")):(e.prepend(d.children.clone().addClass("bx-clone")),b=d.children.first().position(),l="horizontal"===d.settings.mode?-b.left:-b.top),t(l,"reset",0),d.settings.pager=!1,d.settings.controls=!1,d.settings.autoControls=!1,d.settings.tickerHover&&(d.usingCSS?(g="horizontal"===d.settings.mode?4:5,d.viewport.hover(function(){c=e.css("-"+d.cssPrefix+"-transform"),f=parseFloat(c.split(",")[g]),t(f,"reset",0)},function(){k=0,d.children.each(function(b){k+="horizontal"===d.settings.mode?a(this).outerWidth(!0):a(this).outerHeight(!0)}),h=d.settings.speed/k,i="horizontal"===d.settings.mode?"left":"top",j=h*(k-Math.abs(parseInt(f))),K(j)})):d.viewport.hover(function(){e.stop()},function(){k=0,d.children.each(function(b){k+="horizontal"===d.settings.mode?a(this).outerWidth(!0):a(this).outerHeight(!0)}),h=d.settings.speed/k,i="horizontal"===d.settings.mode?"left":"top",j=h*(k-Math.abs(parseInt(e.css(i)))),K(j)})),K()},K=function(a){var b,c,f,g=a?a:d.settings.speed,h={left:0,top:0},i={left:0,top:0};"next"===d.settings.autoDirection?h=e.find(".bx-clone").first().position():i=d.children.first().position(),b="horizontal"===d.settings.mode?-h.left:-h.top,c="horizontal"===d.settings.mode?-i.left:-i.top,f={resetValue:c},t(b,"ticker",g,f)},L=function(b){var c=a(window),d={top:c.scrollTop(),left:c.scrollLeft()},e=b.offset();return d.right=d.left+c.width(),d.bottom=d.top+c.height(),e.right=e.left+b.outerWidth(),e.bottom=e.top+b.outerHeight(),!(d.right<e.left||d.left>e.right||d.bottom<e.top||d.top>e.bottom)},M=function(a){var b=document.activeElement.tagName.toLowerCase(),c="input|textarea",d=new RegExp(b,["i"]),f=d.exec(c);if(null==f&&L(e)){if(39===a.keyCode)return z(a),!1;if(37===a.keyCode)return A(a),!1}},N=function(){d.touch={start:{x:0,y:0},end:{x:0,y:0}},d.viewport.bind("touchstart MSPointerDown pointerdown",O),d.viewport.on("click",".bxslider a",function(a){d.viewport.hasClass("click-disabled")&&(a.preventDefault(),d.viewport.removeClass("click-disabled"))})},O=function(a){if(d.controls.el.addClass("disabled"),d.working)a.preventDefault(),d.controls.el.removeClass("disabled");else{d.touch.originalPos=e.position();var b=a.originalEvent,c="undefined"!=typeof b.changedTouches?b.changedTouches:[b];d.touch.start.x=c[0].pageX,d.touch.start.y=c[0].pageY,d.viewport.get(0).setPointerCapture&&(d.pointerId=b.pointerId,d.viewport.get(0).setPointerCapture(d.pointerId)),d.viewport.bind("touchmove MSPointerMove pointermove",Q),d.viewport.bind("touchend MSPointerUp pointerup",R),d.viewport.bind("MSPointerCancel pointercancel",P)}},P=function(a){t(d.touch.originalPos.left,"reset",0),d.controls.el.removeClass("disabled"),d.viewport.unbind("MSPointerCancel pointercancel",P),d.viewport.unbind("touchmove MSPointerMove pointermove",Q),d.viewport.unbind("touchend MSPointerUp pointerup",R),d.viewport.get(0).releasePointerCapture&&d.viewport.get(0).releasePointerCapture(d.pointerId)},Q=function(a){var b=a.originalEvent,c="undefined"!=typeof b.changedTouches?b.changedTouches:[b],e=Math.abs(c[0].pageX-d.touch.start.x),f=Math.abs(c[0].pageY-d.touch.start.y),g=0,h=0;3*e>f&&d.settings.preventDefaultSwipeX?a.preventDefault():3*f>e&&d.settings.preventDefaultSwipeY&&a.preventDefault(),"fade"!==d.settings.mode&&d.settings.oneToOneTouch&&("horizontal"===d.settings.mode?(h=c[0].pageX-d.touch.start.x,g=d.touch.originalPos.left+h):(h=c[0].pageY-d.touch.start.y,g=d.touch.originalPos.top+h),t(g,"reset",0))},R=function(a){d.viewport.unbind("touchmove MSPointerMove pointermove",Q),d.controls.el.removeClass("disabled");var b=a.originalEvent,c="undefined"!=typeof b.changedTouches?b.changedTouches:[b],f=0,g=0;d.touch.end.x=c[0].pageX,d.touch.end.y=c[0].pageY,"fade"===d.settings.mode?(g=Math.abs(d.touch.start.x-d.touch.end.x),g>=d.settings.swipeThreshold&&(d.touch.start.x>d.touch.end.x?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto())):("horizontal"===d.settings.mode?(g=d.touch.end.x-d.touch.start.x,f=d.touch.originalPos.left):(g=d.touch.end.y-d.touch.start.y,f=d.touch.originalPos.top),!d.settings.infiniteLoop&&(0===d.active.index&&g>0||d.active.last&&0>g)?t(f,"reset",200):Math.abs(g)>=d.settings.swipeThreshold?(0>g?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto()):t(f,"reset",200)),d.viewport.unbind("touchend MSPointerUp pointerup",R),d.viewport.get(0).releasePointerCapture&&d.viewport.get(0).releasePointerCapture(d.pointerId)},S=function(b){if(d.initialized)if(d.working)window.setTimeout(S,10);else{var c=a(window).width(),h=a(window).height();(f!==c||g!==h)&&(f=c,g=h,e.redrawSlider(),d.settings.onSliderResize.call(e,d.active.index))}},T=function(a){var b=p();d.settings.ariaHidden&&!d.settings.ticker&&(d.children.attr("aria-hidden","true"),d.children.slice(a,a+b).attr("aria-hidden","false"))},U=function(a){return 0>a?d.settings.infiniteLoop?q()-1:d.active.index:a>=q()?d.settings.infiniteLoop?0:d.active.index:a};return e.goToSlide=function(b,c){var f,g,h,i,j=!0,k=0,l={left:0,top:0},n=null;if(d.oldIndex=d.active.index,d.active.index=U(b),!d.working&&d.active.index!==d.oldIndex){if(d.working=!0,j=d.settings.onSlideBefore.call(e,d.children.eq(d.active.index),d.oldIndex,d.active.index),"undefined"!=typeof j&&!j)return d.active.index=d.oldIndex,void(d.working=!1);"next"===c?d.settings.onSlideNext.call(e,d.children.eq(d.active.index),d.oldIndex,d.active.index)||(j=!1):"prev"===c&&(d.settings.onSlidePrev.call(e,d.children.eq(d.active.index),d.oldIndex,d.active.index)||(j=!1)),d.active.last=d.active.index>=q()-1,(d.settings.pager||d.settings.pagerCustom)&&E(d.active.index),d.settings.controls&&H(),"fade"===d.settings.mode?(d.settings.adaptiveHeight&&d.viewport.height()!==m()&&d.viewport.animate({height:m()},d.settings.adaptiveHeightSpeed),d.children.filter(":visible").fadeOut(d.settings.speed).css({zIndex:0}),d.children.eq(d.active.index).css("zIndex",d.settings.slideZIndex+1).fadeIn(d.settings.speed,function(){a(this).css("zIndex",d.settings.slideZIndex),F()})):(d.settings.adaptiveHeight&&d.viewport.height()!==m()&&d.viewport.animate({height:m()},d.settings.adaptiveHeightSpeed),!d.settings.infiniteLoop&&d.carousel&&d.active.last?"horizontal"===d.settings.mode?(n=d.children.eq(d.children.length-1),l=n.position(),k=d.viewport.width()-n.outerWidth()):(f=d.children.length-d.settings.minSlides,l=d.children.eq(f).position()):d.carousel&&d.active.last&&"prev"===c?(g=1===d.settings.moveSlides?d.settings.maxSlides-r():(q()-1)*r()-(d.children.length-d.settings.maxSlides),n=e.children(".bx-clone").eq(g),l=n.position()):"next"===c&&0===d.active.index?(l=e.find("> .bx-clone").eq(d.settings.maxSlides).position(),d.active.last=!1):b>=0&&(i=b*parseInt(r()),l=d.children.eq(i).position()),"undefined"!=typeof l?(h="horizontal"===d.settings.mode?-(l.left-k):-l.top,t(h,"slide",d.settings.speed)):d.working=!1),d.settings.ariaHidden&&T(d.active.index*r())}},e.goToNextSlide=function(){if(d.settings.infiniteLoop||!d.active.last){var a=parseInt(d.active.index)+1;e.goToSlide(a,"next")}},e.goToPrevSlide=function(){if(d.settings.infiniteLoop||0!==d.active.index){var a=parseInt(d.active.index)-1;e.goToSlide(a,"prev")}},e.startAuto=function(a){d.interval||(d.interval=setInterval(function(){"next"===d.settings.autoDirection?e.goToNextSlide():e.goToPrevSlide()},d.settings.pause),d.settings.autoControls&&a!==!0&&G("stop"))},e.stopAuto=function(a){d.interval&&(clearInterval(d.interval),d.interval=null,d.settings.autoControls&&a!==!0&&G("start"))},e.getCurrentSlide=function(){return d.active.index},e.getCurrentSlideElement=function(){return d.children.eq(d.active.index)},e.getSlideElement=function(a){return d.children.eq(a)},e.getSlideCount=function(){return d.children.length},e.isWorking=function(){return d.working},e.redrawSlider=function(){d.children.add(e.find(".bx-clone")).outerWidth(o()),d.viewport.css("height",m()),d.settings.ticker||s(),d.active.last&&(d.active.index=q()-1),d.active.index>=q()&&(d.active.last=!0),d.settings.pager&&!d.settings.pagerCustom&&(u(),E(d.active.index)),d.settings.ariaHidden&&T(d.active.index*r())},e.destroySlider=function(){d.initialized&&(d.initialized=!1,a(".bx-clone",this).remove(),d.children.each(function(){void 0!==a(this).data("origStyle")?a(this).attr("style",a(this).data("origStyle")):a(this).removeAttr("style")}),void 0!==a(this).data("origStyle")?this.attr("style",a(this).data("origStyle")):a(this).removeAttr("style"),a(this).unwrap().unwrap(),d.controls.el&&d.controls.el.remove(),d.controls.next&&d.controls.next.remove(),d.controls.prev&&d.controls.prev.remove(),d.pagerEl&&d.settings.controls&&!d.settings.pagerCustom&&d.pagerEl.remove(),a(".bx-caption",this).remove(),d.controls.autoEl&&d.controls.autoEl.remove(),clearInterval(d.interval),d.settings.responsive&&a(window).unbind("resize",S),d.settings.keyboardEnabled&&a(document).unbind("keydown",M),a(this).removeData("bxSlider"))},e.reloadSlider=function(b){void 0!==b&&(c=b),e.destroySlider(),h(),a(e).data("bxSlider",this)},h(),a(e).data("bxSlider",this),this}}}(jQuery);
includes/vendors/bxslider/vendor/jquery.easing.1.3.js ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3
+ *
4
+ * Uses the built in easing capabilities added In jQuery 1.1
5
+ * to offer multiple easing options
6
+ *
7
+ * TERMS OF USE - jQuery Easing
8
+ *
9
+ * Open source under the BSD License.
10
+ *
11
+ * Copyright © 2008 George McGinley Smith
12
+ * All rights reserved.
13
+ *
14
+ * Redistribution and use in source and binary forms, with or without modification,
15
+ * are permitted provided that the following conditions are met:
16
+ *
17
+ * Redistributions of source code must retain the above copyright notice, this list of
18
+ * conditions and the following disclaimer.
19
+ * Redistributions in binary form must reproduce the above copyright notice, this list
20
+ * of conditions and the following disclaimer in the documentation and/or other materials
21
+ * provided with the distribution.
22
+ *
23
+ * Neither the name of the author nor the names of contributors may be used to endorse
24
+ * or promote products derived from this software without specific prior written permission.
25
+ *
26
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
27
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ *
36
+ */
37
+
38
+ // t: current time, b: begInnIng value, c: change In value, d: duration
39
+ jQuery.easing['jswing'] = jQuery.easing['swing'];
40
+
41
+ jQuery.extend( jQuery.easing,
42
+ {
43
+ def: 'easeOutQuad',
44
+ swing: function (x, t, b, c, d) {
45
+ //alert(jQuery.easing.default);
46
+ return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
47
+ },
48
+ easeInQuad: function (x, t, b, c, d) {
49
+ return c*(t/=d)*t + b;
50
+ },
51
+ easeOutQuad: function (x, t, b, c, d) {
52
+ return -c *(t/=d)*(t-2) + b;
53
+ },
54
+ easeInOutQuad: function (x, t, b, c, d) {
55
+ if ((t/=d/2) < 1) return c/2*t*t + b;
56
+ return -c/2 * ((--t)*(t-2) - 1) + b;
57
+ },
58
+ easeInCubic: function (x, t, b, c, d) {
59
+ return c*(t/=d)*t*t + b;
60
+ },
61
+ easeOutCubic: function (x, t, b, c, d) {
62
+ return c*((t=t/d-1)*t*t + 1) + b;
63
+ },
64
+ easeInOutCubic: function (x, t, b, c, d) {
65
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
66
+ return c/2*((t-=2)*t*t + 2) + b;
67
+ },
68
+ easeInQuart: function (x, t, b, c, d) {
69
+ return c*(t/=d)*t*t*t + b;
70
+ },
71
+ easeOutQuart: function (x, t, b, c, d) {
72
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
73
+ },
74
+ easeInOutQuart: function (x, t, b, c, d) {
75
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
76
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
77
+ },
78
+ easeInQuint: function (x, t, b, c, d) {
79
+ return c*(t/=d)*t*t*t*t + b;
80
+ },
81
+ easeOutQuint: function (x, t, b, c, d) {
82
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
83
+ },
84
+ easeInOutQuint: function (x, t, b, c, d) {
85
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
86
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
87
+ },
88
+ easeInSine: function (x, t, b, c, d) {
89
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
90
+ },
91
+ easeOutSine: function (x, t, b, c, d) {
92
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
93
+ },
94
+ easeInOutSine: function (x, t, b, c, d) {
95
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
96
+ },
97
+ easeInExpo: function (x, t, b, c, d) {
98
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
99
+ },
100
+ easeOutExpo: function (x, t, b, c, d) {
101
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
102
+ },
103
+ easeInOutExpo: function (x, t, b, c, d) {
104
+ if (t==0) return b;
105
+ if (t==d) return b+c;
106
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
107
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
108
+ },
109
+ easeInCirc: function (x, t, b, c, d) {
110
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
111
+ },
112
+ easeOutCirc: function (x, t, b, c, d) {
113
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
114
+ },
115
+ easeInOutCirc: function (x, t, b, c, d) {
116
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
117
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
118
+ },
119
+ easeInElastic: function (x, t, b, c, d) {
120
+ var s=1.70158;var p=0;var a=c;
121
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
122
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
123
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
124
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
125
+ },
126
+ easeOutElastic: function (x, t, b, c, d) {
127
+ var s=1.70158;var p=0;var a=c;
128
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
129
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
130
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
131
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
132
+ },
133
+ easeInOutElastic: function (x, t, b, c, d) {
134
+ var s=1.70158;var p=0;var a=c;
135
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
136
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
137
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
138
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
139
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
140
+ },
141
+ easeInBack: function (x, t, b, c, d, s) {
142
+ if (s == undefined) s = 1.70158;
143
+ return c*(t/=d)*t*((s+1)*t - s) + b;
144
+ },
145
+ easeOutBack: function (x, t, b, c, d, s) {
146
+ if (s == undefined) s = 1.70158;
147
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
148
+ },
149
+ easeInOutBack: function (x, t, b, c, d, s) {
150
+ if (s == undefined) s = 1.70158;
151
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
152
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
153
+ },
154
+ easeInBounce: function (x, t, b, c, d) {
155
+ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
156
+ },
157
+ easeOutBounce: function (x, t, b, c, d) {
158
+ if ((t/=d) < (1/2.75)) {
159
+ return c*(7.5625*t*t) + b;
160
+ } else if (t < (2/2.75)) {
161
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
162
+ } else if (t < (2.5/2.75)) {
163
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
164
+ } else {
165
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
166
+ }
167
+ },
168
+ easeInOutBounce: function (x, t, b, c, d) {
169
+ if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
170
+ return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
171
+ }
172
+ });
173
+
174
+ /*
175
+ *
176
+ * TERMS OF USE - EASING EQUATIONS
177
+ *
178
+ * Open source under the BSD License.
179
+ *
180
+ * Copyright © 2001 Robert Penner
181
+ * All rights reserved.
182
+ *
183
+ * Redistribution and use in source and binary forms, with or without modification,
184
+ * are permitted provided that the following conditions are met:
185
+ *
186
+ * Redistributions of source code must retain the above copyright notice, this list of
187
+ * conditions and the following disclaimer.
188
+ * Redistributions in binary form must reproduce the above copyright notice, this list
189
+ * of conditions and the following disclaimer in the documentation and/or other materials
190
+ * provided with the distribution.
191
+ *
192
+ * Neither the name of the author nor the names of contributors may be used to endorse
193
+ * or promote products derived from this software without specific prior written permission.
194
+ *
195
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
196
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
197
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
198
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
199
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
200
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
201
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
202
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
203
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
204
+ *
205
+ */
includes/vendors/bxslider/vendor/jquery.fitvids.js ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global jQuery */
2
+ /*jshint multistr:true browser:true */
3
+ /*!
4
+ * FitVids 1.0
5
+ *
6
+ * Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
7
+ * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
8
+ * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
9
+ *
10
+ * Date: Thu Sept 01 18:00:00 2011 -0500
11
+ */
12
+
13
+ (function( $ ){
14
+
15
+ "use strict";
16
+
17
+ $.fn.fitVids = function( options ) {
18
+ var settings = {
19
+ customSelector: null
20
+ };
21
+
22
+ var div = document.createElement('div'),
23
+ ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0];
24
+
25
+ div.className = 'fit-vids-style';
26
+ div.innerHTML = '&shy;<style> \
27
+ .fluid-width-video-wrapper { \
28
+ width: 100%; \
29
+ position: relative; \
30
+ padding: 0; \
31
+ } \
32
+ \
33
+ .fluid-width-video-wrapper iframe, \
34
+ .fluid-width-video-wrapper object, \
35
+ .fluid-width-video-wrapper embed { \
36
+ position: absolute; \
37
+ top: 0; \
38
+ left: 0; \
39
+ width: 100%; \
40
+ height: 100%; \
41
+ } \
42
+ </style>';
43
+
44
+ ref.parentNode.insertBefore(div,ref);
45
+
46
+ if ( options ) {
47
+ $.extend( settings, options );
48
+ }
49
+
50
+ return this.each(function(){
51
+ var selectors = [
52
+ "iframe[src*='player.vimeo.com']",
53
+ "iframe[src*='www.youtube.com']",
54
+ "iframe[src*='www.kickstarter.com']",
55
+ "object",
56
+ "embed"
57
+ ];
58
+
59
+ if (settings.customSelector) {
60
+ selectors.push(settings.customSelector);
61
+ }
62
+
63
+ var $allVideos = $(this).find(selectors.join(','));
64
+
65
+ $allVideos.each(function(){
66
+ var $this = $(this);
67
+ if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
68
+ var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
69
+ width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
70
+ aspectRatio = height / width;
71
+ if(!$this.attr('id')){
72
+ var videoID = 'fitvid' + Math.floor(Math.random()*999999);
73
+ $this.attr('id', videoID);
74
+ }
75
+ $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
76
+ $this.removeAttr('height').removeAttr('width');
77
+ });
78
+ });
79
+ };
80
+ })( jQuery );
readme.txt CHANGED
@@ -88,6 +88,12 @@ Use the shortcode manager in the TinyMCE text editor
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
 
91
  = Version 1.93 =
92
 
93
  * added ability for themes to disable share buttons filter
88
 
89
  == Changelog ==
90
 
91
+ = Version 1.94 =
92
+
93
+ * Added post_slider shortcode
94
+ * Added text selection to shortcode inserts
95
+ * Fixed bug with width of social icon square
96
+
97
  = Version 1.93 =
98
 
99
  * added ability for themes to disable share buttons filter
wc-shortcodes.php CHANGED
@@ -5,11 +5,11 @@ Plugin URI: http://webplantmedia.com/starter-themes/wordpresscanvas/features/sho
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
- Version: 1.93
9
  License: GPLv2 or later
10
  */
11
 
12
- define( 'WC_SHORTCODES_VERSION', '1.93' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
+ Version: 1.94
9
  License: GPLv2 or later
10
  */
11
 
12
+ define( 'WC_SHORTCODES_VERSION', '1.94' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );