camera.min.js 100 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225
  1. // Camera slideshow v1.4.0 - a jQuery slideshow with many effects, transitions, easy to customize, using canvas and mobile ready, based on jQuery 1.4+
  2. // Copyright (c) 2012 by Manuel Masia - www.pixedelic.com
  3. // Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
  4. (function (a) {
  5. a.fn.camera = function (b, c) {
  6. function e() {
  7. if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) {
  8. return true
  9. }
  10. }
  11. function H() {
  12. var b = a(s).width();
  13. a("li", s).removeClass("camera_visThumb");
  14. a("li", s).each(function () {
  15. var c = a(this).position(),
  16. d = a("ul", s).outerWidth(),
  17. e = a("ul", s).offset().left,
  18. f = a("> div", s).offset().left,
  19. g = f - e;
  20. if (g > 0) {
  21. a(".camera_prevThumbs", V).removeClass("hideNav")
  22. } else {
  23. a(".camera_prevThumbs", V).addClass("hideNav")
  24. }
  25. if (d - g > b) {
  26. a(".camera_nextThumbs", V).removeClass("hideNav")
  27. } else {
  28. a(".camera_nextThumbs", V).addClass("hideNav")
  29. }
  30. var h = c.left,
  31. i = c.left + a(this).width();
  32. if (i - g <= b && h - g >= 0) {
  33. a(this).addClass("camera_visThumb")
  34. }
  35. })
  36. }
  37. function K() {
  38. function d() {
  39. t = f.width();
  40. if (b.height.indexOf("%") != -1) {
  41. var c = Math.round(t / (100 / parseFloat(b.height)));
  42. if (b.minHeight != "" && c < parseFloat(b.minHeight)) {
  43. u = parseFloat(b.minHeight)
  44. } else {
  45. u = c
  46. }
  47. f.css({
  48. height: u
  49. })
  50. } else if (b.height == "auto") {
  51. u = f.height()
  52. } else {
  53. u = parseFloat(b.height);
  54. f.css({
  55. height: u
  56. })
  57. }
  58. a(".camerarelative", k).css({
  59. width: t,
  60. height: u
  61. });
  62. a(".imgLoaded", k).each(function () {
  63. var c = a(this),
  64. d = c.attr("width"),
  65. e = c.attr("height"),
  66. f = c.index(),
  67. g, h, i = c.attr("data-alignment"),
  68. j = c.attr("data-portrait");
  69. if (typeof i === "undefined" || i === false || i === "") {
  70. i = b.alignment
  71. }
  72. if (typeof j === "undefined" || j === false || j === "") {
  73. j = b.portrait
  74. }
  75. if (j == false || j == "false") {
  76. if (d / e < t / u) {
  77. var k = t / d;
  78. var l = Math.abs(u - e * k) * .5;
  79. switch (i) {
  80. case "topLeft":
  81. g = 0;
  82. break;
  83. case "topCenter":
  84. g = 0;
  85. break;
  86. case "topRight":
  87. g = 0;
  88. break;
  89. case "centerLeft":
  90. g = "-" + l + "px";
  91. break;
  92. case "center":
  93. g = "-" + l + "px";
  94. break;
  95. case "centerRight":
  96. g = "-" + l + "px";
  97. break;
  98. case "bottomLeft":
  99. g = "-" + l * 2 + "px";
  100. break;
  101. case "bottomCenter":
  102. g = "-" + l * 2 + "px";
  103. break;
  104. case "bottomRight":
  105. g = "-" + l * 2 + "px";
  106. break
  107. }
  108. c.css({
  109. height: e * k,
  110. "margin-left": 0,
  111. "margin-top": g,
  112. position: "absolute",
  113. visibility: "visible",
  114. width: t
  115. })
  116. } else {
  117. var k = u / e;
  118. var l = Math.abs(t - d * k) * .5;
  119. switch (i) {
  120. case "topLeft":
  121. h = 0;
  122. break;
  123. case "topCenter":
  124. h = "-" + l + "px";
  125. break;
  126. case "topRight":
  127. h = "-" + l * 2 + "px";
  128. break;
  129. case "centerLeft":
  130. h = 0;
  131. break;
  132. case "center":
  133. h = "-" + l + "px";
  134. break;
  135. case "centerRight":
  136. h = "-" + l * 2 + "px";
  137. break;
  138. case "bottomLeft":
  139. h = 0;
  140. break;
  141. case "bottomCenter":
  142. h = "-" + l + "px";
  143. break;
  144. case "bottomRight":
  145. h = "-" + l * 2 + "px";
  146. break
  147. }
  148. c.css({
  149. height: u,
  150. "margin-left": h,
  151. "margin-top": 0,
  152. position: "absolute",
  153. visibility: "visible",
  154. width: d * k
  155. })
  156. }
  157. } else {
  158. if (d / e < t / u) {
  159. var k = u / e;
  160. var l = Math.abs(t - d * k) * .5;
  161. switch (i) {
  162. case "topLeft":
  163. h = 0;
  164. break;
  165. case "topCenter":
  166. h = l + "px";
  167. break;
  168. case "topRight":
  169. h = l * 2 + "px";
  170. break;
  171. case "centerLeft":
  172. h = 0;
  173. break;
  174. case "center":
  175. h = l + "px";
  176. break;
  177. case "centerRight":
  178. h = l * 2 + "px";
  179. break;
  180. case "bottomLeft":
  181. h = 0;
  182. break;
  183. case "bottomCenter":
  184. h = l + "px";
  185. break;
  186. case "bottomRight":
  187. h = l * 2 + "px";
  188. break
  189. }
  190. c.css({
  191. height: u,
  192. "margin-left": h,
  193. "margin-top": 0,
  194. position: "absolute",
  195. visibility: "visible",
  196. width: d * k
  197. })
  198. } else {
  199. var k = t / d;
  200. var l = Math.abs(u - e * k) * .5;
  201. switch (i) {
  202. case "topLeft":
  203. g = 0;
  204. break;
  205. case "topCenter":
  206. g = 0;
  207. break;
  208. case "topRight":
  209. g = 0;
  210. break;
  211. case "centerLeft":
  212. g = l + "px";
  213. break;
  214. case "center":
  215. g = l + "px";
  216. break;
  217. case "centerRight":
  218. g = l + "px";
  219. break;
  220. case "bottomLeft":
  221. g = l * 2 + "px";
  222. break;
  223. case "bottomCenter":
  224. g = l * 2 + "px";
  225. break;
  226. case "bottomRight":
  227. g = l * 2 + "px";
  228. break
  229. }
  230. c.css({
  231. height: e * k,
  232. "margin-left": 0,
  233. "margin-top": g,
  234. position: "absolute",
  235. visibility: "visible",
  236. width: t
  237. })
  238. }
  239. }
  240. })
  241. }
  242. var c;
  243. if (I == true) {
  244. clearTimeout(c);
  245. c = setTimeout(d, 200)
  246. } else {
  247. d()
  248. }
  249. I = true
  250. }
  251. function X(a) {
  252. for (var b, c, d = a.length; d; b = parseInt(Math.random() * d), c = a[--d], a[d] = a[b], a[b] = c);
  253. return a
  254. }
  255. function Y(a) {
  256. return Math.ceil(a) == Math.floor(a)
  257. }
  258. function hb() {
  259. if (a(s).length && !a(r).length) {
  260. var b = a(s).outerWidth(),
  261. c = a("ul > li", s).outerWidth(),
  262. d = a("li.cameracurrent", s).length ? a("li.cameracurrent", s).position() : "",
  263. e = a("ul > li", s).length * a("ul > li", s).outerWidth(),
  264. g = a("ul", s).offset().left,
  265. h = a("> div", s).offset().left,
  266. i;
  267. if (g < 0) {
  268. i = "-" + (h - g)
  269. } else {
  270. i = h - g
  271. }
  272. if (gb == true) {
  273. a("ul", s).width(a("ul > li", s).length * a("ul > li", s).outerWidth());
  274. if (a(s).length && !a(r).lenght) {
  275. f.css({
  276. marginBottom: a(s).outerHeight()
  277. })
  278. }
  279. H();
  280. a("ul", s).width(a("ul > li", s).length * a("ul > li", s).outerWidth());
  281. if (a(s).length && !a(r).lenght) {
  282. f.css({
  283. marginBottom: a(s).outerHeight()
  284. })
  285. }
  286. }
  287. gb = false;
  288. var j = a("li.cameracurrent", s).length ? d.left : "",
  289. k = a("li.cameracurrent", s).length ? d.left + a("li.cameracurrent", s).outerWidth() : "";
  290. if (j < a("li.cameracurrent", s).outerWidth()) {
  291. j = 0
  292. }
  293. if (k - i > b) {
  294. if (j + b < e) {
  295. a("ul", s).animate({
  296. "margin-left": "-" + j + "px"
  297. }, 500, H)
  298. } else {
  299. a("ul", s).animate({
  300. "margin-left": "-" + (a("ul", s).outerWidth() - b) + "px"
  301. }, 500, H)
  302. }
  303. } else if (j - i < 0) {
  304. a("ul", s).animate({
  305. "margin-left": "-" + j + "px"
  306. }, 500, H)
  307. } else {
  308. a("ul", s).css({
  309. "margin-left": "auto",
  310. "margin-right": "auto"
  311. });
  312. setTimeout(H, 100)
  313. }
  314. }
  315. }
  316. function ib() {
  317. bb = 0;
  318. var c = a(".camera_bar_cont", V).width(),
  319. d = a(".camera_bar_cont", V).height();
  320. if (h != "pie") {
  321. switch (U) {
  322. case "leftToRight":
  323. a("#" + i).css({
  324. right: c
  325. });
  326. break;
  327. case "rightToLeft":
  328. a("#" + i).css({
  329. left: c
  330. });
  331. break;
  332. case "topToBottom":
  333. a("#" + i).css({
  334. bottom: d
  335. });
  336. break;
  337. case "bottomToTop":
  338. a("#" + i).css({
  339. top: d
  340. });
  341. break
  342. }
  343. } else {
  344. db.clearRect(0, 0, b.pieDiameter, b.pieDiameter)
  345. }
  346. }
  347. function jb(c) {
  348. j.addClass("camerasliding");
  349. R = false;
  350. var d = parseFloat(a("div.cameraSlide.cameracurrent", k).index());
  351. if (c > 0) {
  352. var l = c - 1
  353. } else if (d == B - 1) {
  354. var l = 0
  355. } else {
  356. var l = d + 1
  357. }
  358. var m = a(".cameraSlide:eq(" + l + ")", k);
  359. var n = a(".cameraSlide:eq(" + (l + 1) + ")", k).addClass("cameranext");
  360. if (d != l + 1) {
  361. n.hide()
  362. }
  363. a(".cameraContent", g).fadeOut(600);
  364. a(".camera_caption", g).show();
  365. a(".camerarelative", m).append(a("> div ", j).eq(l).find("> div.camera_effected"));
  366. a(".camera_target_content .cameraContent:eq(" + l + ")", f).append(a("> div ", j).eq(l).find("> div"));
  367. if (!a(".imgLoaded", m).length) {
  368. var o = v[l];
  369. var p = new Image;
  370. p.src = o + "?" + (new Date).getTime();
  371. m.css("visibility", "hidden");
  372. m.prepend(a(p).attr("class", "imgLoaded").css("visibility", "hidden"));
  373. var q, w;
  374. if (!a(p).get(0).complete || q == "0" || w == "0" || typeof q === "undefined" || q === false || typeof w === "undefined" || w === false) {
  375. a(".camera_loader", f).delay(500).fadeIn(400);
  376. p.onload = function () {
  377. q = p.naturalWidth;
  378. w = p.naturalHeight;
  379. a(p).attr("data-alignment", z[l]).attr("data-portrait", y[l]);
  380. a(p).attr("width", q);
  381. a(p).attr("height", w);
  382. k.find(".cameraSlide_" + l).hide().css("visibility", "visible");
  383. K();
  384. jb(l + 1)
  385. }
  386. }
  387. } else {
  388. if (v.length > l + 1 && !a(".imgLoaded", n).length) {
  389. var x = v[l + 1];
  390. var A = new Image;
  391. A.src = x + "?" + (new Date).getTime();
  392. n.prepend(a(A).attr("class", "imgLoaded").css("visibility", "hidden"));
  393. A.onload = function () {
  394. q = A.naturalWidth;
  395. w = A.naturalHeight;
  396. a(A).attr("data-alignment", z[l + 1]).attr("data-portrait", y[l + 1]);
  397. a(A).attr("width", q);
  398. a(A).attr("height", w);
  399. K()
  400. }
  401. }
  402. b.onLoaded.call(this);
  403. if (a(".camera_loader", f).is(":visible")) {
  404. a(".camera_loader", f).fadeOut(400)
  405. } else {
  406. a(".camera_loader", f).css({
  407. visibility: "hidden"
  408. });
  409. a(".camera_loader", f).fadeOut(400, function () {
  410. a(".camera_loader", f).css({
  411. visibility: "visible"
  412. })
  413. })
  414. }
  415. var C = b.rows,
  416. D = b.cols,
  417. F = 1,
  418. G = 0,
  419. H, I, J, N, O, P = new Array("simpleFade", "curtainTopLeft", "curtainTopRight", "curtainBottomLeft", "curtainBottomRight", "curtainSliceLeft", "curtainSliceRight", "blindCurtainTopLeft", "blindCurtainTopRight", "blindCurtainBottomLeft", "blindCurtainBottomRight", "blindCurtainSliceBottom", "blindCurtainSliceTop", "stampede", "mosaic", "mosaicReverse", "mosaicRandom", "mosaicSpiral", "mosaicSpiralReverse", "topLeftBottomRight", "bottomRightTopLeft", "bottomLeftTopRight", "topRightBottomLeft", "scrollLeft", "scrollRight", "scrollTop", "scrollBottom", "scrollHorz");
  420. marginLeft = 0,
  421. marginTop = 0,
  422. opacityOnGrid = 0;
  423. if (b.opacityOnGrid == true) {
  424. opacityOnGrid = 0
  425. } else {
  426. opacityOnGrid = 1
  427. }
  428. var Q = a(" > div", j).eq(l).attr("data-fx");
  429. if (e() && b.mobileFx != "" && b.mobileFx != "default") {
  430. N = b.mobileFx
  431. } else {
  432. if (typeof Q !== "undefined" && Q !== false && Q !== "default") {
  433. N = Q
  434. } else {
  435. N = b.fx
  436. }
  437. }
  438. if (N == "random") {
  439. N = X(P);
  440. N = N[0]
  441. } else {
  442. N = N;
  443. if (N.indexOf(",") > 0) {
  444. N = N.replace(/ /g, "");
  445. N = N.split(",");
  446. N = X(N);
  447. N = N[0]
  448. }
  449. }
  450. dataEasing = a(" > div", j).eq(l).attr("data-easing");
  451. mobileEasing = a(" > div", j).eq(l).attr("data-mobileEasing");
  452. if (e() && b.mobileEasing != "" && b.mobileEasing != "default") {
  453. if (typeof mobileEasing !== "undefined" && mobileEasing !== false && mobileEasing !== "default") {
  454. O = mobileEasing
  455. } else {
  456. O = b.mobileEasing
  457. }
  458. } else {
  459. if (typeof dataEasing !== "undefined" && dataEasing !== false && dataEasing !== "default") {
  460. O = dataEasing
  461. } else {
  462. O = b.easing
  463. }
  464. }
  465. H = a(" > div", j).eq(l).attr("data-slideOn");
  466. if (typeof H !== "undefined" && H !== false) {
  467. T = H
  468. } else {
  469. if (b.slideOn == "random") {
  470. var T = new Array("next", "prev");
  471. T = X(T);
  472. T = T[0]
  473. } else {
  474. T = b.slideOn
  475. }
  476. }
  477. var Y = a(" > div", j).eq(l).attr("data-time");
  478. if (typeof Y !== "undefined" && Y !== false && Y !== "") {
  479. I = parseFloat(Y)
  480. } else {
  481. I = b.time
  482. }
  483. var Z = a(" > div", j).eq(l).attr("data-transPeriod");
  484. if (typeof Z !== "undefined" && Z !== false && Z !== "") {
  485. J = parseFloat(Z)
  486. } else {
  487. J = b.transPeriod
  488. }
  489. if (!a(j).hasClass("camerastarted")) {
  490. N = "simpleFade";
  491. T = "next";
  492. O = "";
  493. J = 400;
  494. a(j).addClass("camerastarted")
  495. }
  496. switch (N) {
  497. case "simpleFade":
  498. D = 1;
  499. C = 1;
  500. break;
  501. case "curtainTopLeft":
  502. if (b.slicedCols == 0) {
  503. D = b.cols
  504. } else {
  505. D = b.slicedCols
  506. }
  507. C = 1;
  508. break;
  509. case "curtainTopRight":
  510. if (b.slicedCols == 0) {
  511. D = b.cols
  512. } else {
  513. D = b.slicedCols
  514. }
  515. C = 1;
  516. break;
  517. case "curtainBottomLeft":
  518. if (b.slicedCols == 0) {
  519. D = b.cols
  520. } else {
  521. D = b.slicedCols
  522. }
  523. C = 1;
  524. break;
  525. case "curtainBottomRight":
  526. if (b.slicedCols == 0) {
  527. D = b.cols
  528. } else {
  529. D = b.slicedCols
  530. }
  531. C = 1;
  532. break;
  533. case "curtainSliceLeft":
  534. if (b.slicedCols == 0) {
  535. D = b.cols
  536. } else {
  537. D = b.slicedCols
  538. }
  539. C = 1;
  540. break;
  541. case "curtainSliceRight":
  542. if (b.slicedCols == 0) {
  543. D = b.cols
  544. } else {
  545. D = b.slicedCols
  546. }
  547. C = 1;
  548. break;
  549. case "blindCurtainTopLeft":
  550. if (b.slicedRows == 0) {
  551. C = b.rows
  552. } else {
  553. C = b.slicedRows
  554. }
  555. D = 1;
  556. break;
  557. case "blindCurtainTopRight":
  558. if (b.slicedRows == 0) {
  559. C = b.rows
  560. } else {
  561. C = b.slicedRows
  562. }
  563. D = 1;
  564. break;
  565. case "blindCurtainBottomLeft":
  566. if (b.slicedRows == 0) {
  567. C = b.rows
  568. } else {
  569. C = b.slicedRows
  570. }
  571. D = 1;
  572. break;
  573. case "blindCurtainBottomRight":
  574. if (b.slicedRows == 0) {
  575. C = b.rows
  576. } else {
  577. C = b.slicedRows
  578. }
  579. D = 1;
  580. break;
  581. case "blindCurtainSliceTop":
  582. if (b.slicedRows == 0) {
  583. C = b.rows
  584. } else {
  585. C = b.slicedRows
  586. }
  587. D = 1;
  588. break;
  589. case "blindCurtainSliceBottom":
  590. if (b.slicedRows == 0) {
  591. C = b.rows
  592. } else {
  593. C = b.slicedRows
  594. }
  595. D = 1;
  596. break;
  597. case "stampede":
  598. G = "-" + J;
  599. break;
  600. case "mosaic":
  601. G = b.gridDifference;
  602. break;
  603. case "mosaicReverse":
  604. G = b.gridDifference;
  605. break;
  606. case "mosaicRandom":
  607. break;
  608. case "mosaicSpiral":
  609. G = b.gridDifference;
  610. F = 1.7;
  611. break;
  612. case "mosaicSpiralReverse":
  613. G = b.gridDifference;
  614. F = 1.7;
  615. break;
  616. case "topLeftBottomRight":
  617. G = b.gridDifference;
  618. F = 6;
  619. break;
  620. case "bottomRightTopLeft":
  621. G = b.gridDifference;
  622. F = 6;
  623. break;
  624. case "bottomLeftTopRight":
  625. G = b.gridDifference;
  626. F = 6;
  627. break;
  628. case "topRightBottomLeft":
  629. G = b.gridDifference;
  630. F = 6;
  631. break;
  632. case "scrollLeft":
  633. D = 1;
  634. C = 1;
  635. break;
  636. case "scrollRight":
  637. D = 1;
  638. C = 1;
  639. break;
  640. case "scrollTop":
  641. D = 1;
  642. C = 1;
  643. break;
  644. case "scrollBottom":
  645. D = 1;
  646. C = 1;
  647. break;
  648. case "scrollHorz":
  649. D = 1;
  650. C = 1;
  651. break
  652. }
  653. var _ = 0;
  654. var ab = C * D;
  655. var eb = t - Math.floor(t / D) * D;
  656. var fb = u - Math.floor(u / C) * C;
  657. var gb;
  658. var kb;
  659. var lb = 0;
  660. var mb = 0;
  661. var nb = new Array;
  662. var ob = new Array;
  663. var pb = new Array;
  664. while (_ < ab) {
  665. nb.push(_);
  666. ob.push(_);
  667. E.append('<div class="cameraappended" style="display:none; overflow:hidden; position:absolute; z-index:1000" />');
  668. var qb = a(".cameraappended:eq(" + _ + ")", k);
  669. if (N == "scrollLeft" || N == "scrollRight" || N == "scrollTop" || N == "scrollBottom" || N == "scrollHorz") {
  670. S.eq(l).clone().show().appendTo(qb)
  671. } else {
  672. if (T == "next") {
  673. S.eq(l).clone().show().appendTo(qb)
  674. } else {
  675. S.eq(d).clone().show().appendTo(qb)
  676. }
  677. }
  678. if (_ % D < eb) {
  679. gb = 1
  680. } else {
  681. gb = 0
  682. }
  683. if (_ % D == 0) {
  684. lb = 0
  685. }
  686. if (Math.floor(_ / D) < fb) {
  687. kb = 1
  688. } else {
  689. kb = 0
  690. }
  691. qb.css({
  692. height: Math.floor(u / C + kb + 1),
  693. left: lb,
  694. top: mb,
  695. width: Math.floor(t / D + gb + 1)
  696. });
  697. a("> .cameraSlide", qb).css({
  698. height: u,
  699. "margin-left": "-" + lb + "px",
  700. "margin-top": "-" + mb + "px",
  701. width: t
  702. });
  703. lb = lb + qb.width() - 1;
  704. if (_ % D == D - 1) {
  705. mb = mb + qb.height() - 1
  706. }
  707. _++
  708. }
  709. switch (N) {
  710. case "curtainTopLeft":
  711. break;
  712. case "curtainBottomLeft":
  713. break;
  714. case "curtainSliceLeft":
  715. break;
  716. case "curtainTopRight":
  717. nb = nb.reverse();
  718. break;
  719. case "curtainBottomRight":
  720. nb = nb.reverse();
  721. break;
  722. case "curtainSliceRight":
  723. nb = nb.reverse();
  724. break;
  725. case "blindCurtainTopLeft":
  726. break;
  727. case "blindCurtainBottomLeft":
  728. nb = nb.reverse();
  729. break;
  730. case "blindCurtainSliceTop":
  731. break;
  732. case "blindCurtainTopRight":
  733. break;
  734. case "blindCurtainBottomRight":
  735. nb = nb.reverse();
  736. break;
  737. case "blindCurtainSliceBottom":
  738. nb = nb.reverse();
  739. break;
  740. case "stampede":
  741. nb = X(nb);
  742. break;
  743. case "mosaic":
  744. break;
  745. case "mosaicReverse":
  746. nb = nb.reverse();
  747. break;
  748. case "mosaicRandom":
  749. nb = X(nb);
  750. break;
  751. case "mosaicSpiral":
  752. var rb = C / 2,
  753. sb, tb, ub, vb = 0;
  754. for (ub = 0; ub < rb; ub++) {
  755. tb = ub;
  756. for (sb = ub; sb < D - ub - 1; sb++) {
  757. pb[vb++] = tb * D + sb
  758. }
  759. sb = D - ub - 1;
  760. for (tb = ub; tb < C - ub - 1; tb++) {
  761. pb[vb++] = tb * D + sb
  762. }
  763. tb = C - ub - 1;
  764. for (sb = D - ub - 1; sb > ub; sb--) {
  765. pb[vb++] = tb * D + sb
  766. }
  767. sb = ub;
  768. for (tb = C - ub - 1; tb > ub; tb--) {
  769. pb[vb++] = tb * D + sb
  770. }
  771. }
  772. nb = pb;
  773. break;
  774. case "mosaicSpiralReverse":
  775. var rb = C / 2,
  776. sb, tb, ub, vb = ab - 1;
  777. for (ub = 0; ub < rb; ub++) {
  778. tb = ub;
  779. for (sb = ub; sb < D - ub - 1; sb++) {
  780. pb[vb--] = tb * D + sb
  781. }
  782. sb = D - ub - 1;
  783. for (tb = ub; tb < C - ub - 1; tb++) {
  784. pb[vb--] = tb * D + sb
  785. }
  786. tb = C - ub - 1;
  787. for (sb = D - ub - 1; sb > ub; sb--) {
  788. pb[vb--] = tb * D + sb
  789. }
  790. sb = ub;
  791. for (tb = C - ub - 1; tb > ub; tb--) {
  792. pb[vb--] = tb * D + sb
  793. }
  794. }
  795. nb = pb;
  796. break;
  797. case "topLeftBottomRight":
  798. for (var tb = 0; tb < C; tb++) for (var sb = 0; sb < D; sb++) {
  799. pb.push(sb + tb)
  800. }
  801. ob = pb;
  802. break;
  803. case "bottomRightTopLeft":
  804. for (var tb = 0; tb < C; tb++) for (var sb = 0; sb < D; sb++) {
  805. pb.push(sb + tb)
  806. }
  807. ob = pb.reverse();
  808. break;
  809. case "bottomLeftTopRight":
  810. for (var tb = C; tb > 0; tb--) for (var sb = 0; sb < D; sb++) {
  811. pb.push(sb + tb)
  812. }
  813. ob = pb;
  814. break;
  815. case "topRightBottomLeft":
  816. for (var tb = 0; tb < C; tb++) for (var sb = D; sb > 0; sb--) {
  817. pb.push(sb + tb)
  818. }
  819. ob = pb;
  820. break
  821. }
  822. a.each(nb, function (c, e) {
  823. function o() {
  824. a(this).addClass("cameraeased");
  825. if (a(".cameraeased", k).length >= 0) {
  826. a(s).css({
  827. visibility: "visible"
  828. })
  829. }
  830. if (a(".cameraeased", k).length == ab) {
  831. hb();
  832. a(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom", g).each(function () {
  833. a(this).css("visibility", "hidden")
  834. });
  835. S.eq(l).show().css("z-index", "999").removeClass("cameranext").addClass("cameracurrent");
  836. S.eq(d).css("z-index", "1").removeClass("cameracurrent");
  837. a(".cameraContent", g).eq(l).addClass("cameracurrent");
  838. if (d >= 0) {
  839. a(".cameraContent", g).eq(d).removeClass("cameracurrent")
  840. }
  841. b.onEndTransition.call(this);
  842. if (a("> div", j).eq(l).attr("data-video") != "hide" && a(".cameraContent.cameracurrent .imgFake", g).length) {
  843. a(".cameraContent.cameracurrent .imgFake", g).click()
  844. }
  845. var c = S.eq(l).find(".fadeIn").length;
  846. var e = a(".cameraContent", g).eq(l).find(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom").length;
  847. if (c != 0) {
  848. a(".cameraSlide.cameracurrent .fadeIn", g).each(function () {
  849. if (a(this).attr("data-easing") != "") {
  850. var b = a(this).attr("data-easing")
  851. } else {
  852. var b = O
  853. }
  854. var d = a(this);
  855. if (typeof d.attr("data-outerWidth") === "undefined" || d.attr("data-outerWidth") === false || d.attr("data-outerWidth") === "") {
  856. var e = d.outerWidth();
  857. d.attr("data-outerWidth", e)
  858. } else {
  859. var e = d.attr("data-outerWidth")
  860. }
  861. if (typeof d.attr("data-outerHeight") === "undefined" || d.attr("data-outerHeight") === false || d.attr("data-outerHeight") === "") {
  862. var f = d.outerHeight();
  863. d.attr("data-outerHeight", f)
  864. } else {
  865. var f = d.attr("data-outerHeight")
  866. }
  867. var g = d.position();
  868. var h = g.left;
  869. var i = g.top;
  870. var j = d.attr("class");
  871. var k = d.index();
  872. var l = d.parents(".camerarelative").outerHeight();
  873. var m = d.parents(".camerarelative").outerWidth();
  874. if (j.indexOf("fadeIn") != -1) {
  875. d.animate({
  876. opacity: 0
  877. }, 0).css("visibility", "visible").delay(I / c * .1 * (k - 1)).animate({
  878. opacity: 1
  879. }, I / c * .15, b)
  880. } else {
  881. d.css("visibility", "visible")
  882. }
  883. })
  884. }
  885. a(".cameraContent.cameracurrent", g).show();
  886. if (e != 0) {
  887. a(".cameraContent.cameracurrent .moveFromLeft, .cameraContent.cameracurrent .moveFromRight, .cameraContent.cameracurrent .moveFromTop, .cameraContent.cameracurrent .moveFromBottom, .cameraContent.cameracurrent .fadeIn, .cameraContent.cameracurrent .fadeFromLeft, .cameraContent.cameracurrent .fadeFromRight, .cameraContent.cameracurrent .fadeFromTop, .cameraContent.cameracurrent .fadeFromBottom", g).each(function () {
  888. if (a(this).attr("data-easing") != "") {
  889. var b = a(this).attr("data-easing")
  890. } else {
  891. var b = O
  892. }
  893. var c = a(this);
  894. var d = c.position();
  895. var f = d.left;
  896. var g = d.top;
  897. var h = c.attr("class");
  898. var i = c.index();
  899. var j = c.outerHeight();
  900. if (h.indexOf("moveFromLeft") != -1) {
  901. c.css({
  902. left: "-" + t + "px",
  903. right: "auto"
  904. });
  905. c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  906. left: d.left
  907. }, I / e * .15, b)
  908. } else if (h.indexOf("moveFromRight") != -1) {
  909. c.css({
  910. left: t + "px",
  911. right: "auto"
  912. });
  913. c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  914. left: d.left
  915. }, I / e * .15, b)
  916. } else if (h.indexOf("moveFromTop") != -1) {
  917. c.css({
  918. top: "-" + u + "px",
  919. bottom: "auto"
  920. });
  921. c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  922. top: d.top
  923. }, I / e * .15, b, function () {
  924. c.css({
  925. top: "auto",
  926. bottom: 0
  927. })
  928. })
  929. } else if (h.indexOf("moveFromBottom") != -1) {
  930. c.css({
  931. top: u + "px",
  932. bottom: "auto"
  933. });
  934. c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  935. top: d.top
  936. }, I / e * .15, b)
  937. } else if (h.indexOf("fadeFromLeft") != -1) {
  938. c.animate({
  939. opacity: 0
  940. }, 0).css({
  941. left: "-" + t + "px",
  942. right: "auto"
  943. });
  944. c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  945. left: d.left,
  946. opacity: 1
  947. }, I / e * .15, b)
  948. } else if (h.indexOf("fadeFromRight") != -1) {
  949. c.animate({
  950. opacity: 0
  951. }, 0).css({
  952. left: t + "px",
  953. right: "auto"
  954. });
  955. c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  956. left: d.left,
  957. opacity: 1
  958. }, I / e * .15, b)
  959. } else if (h.indexOf("fadeFromTop") != -1) {
  960. c.animate({
  961. opacity: 0
  962. }, 0).css({
  963. top: "-" + u + "px",
  964. bottom: "auto"
  965. });
  966. c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  967. top: d.top,
  968. opacity: 1
  969. }, I / e * .15, b, function () {
  970. c.css({
  971. top: "auto",
  972. bottom: 0
  973. })
  974. })
  975. } else if (h.indexOf("fadeFromBottom") != -1) {
  976. c.animate({
  977. opacity: 0
  978. }, 0).css({
  979. bottom: "-" + j + "px"
  980. });
  981. c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  982. bottom: "0",
  983. opacity: 1
  984. }, I / e * .15, b)
  985. } else if (h.indexOf("fadeIn") != -1) {
  986. c.animate({
  987. opacity: 0
  988. }, 0).css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({
  989. opacity: 1
  990. }, I / e * .15, b)
  991. } else {
  992. c.css("visibility", "visible")
  993. }
  994. })
  995. }
  996. a(".cameraappended", k).remove();
  997. j.removeClass("camerasliding");
  998. S.eq(d).hide();
  999. var f = a(".camera_bar_cont", V).width(),
  1000. m = a(".camera_bar_cont", V).height(),
  1001. o;
  1002. if (h != "pie") {
  1003. o = .05
  1004. } else {
  1005. o = .005
  1006. }
  1007. a("#" + i).animate({
  1008. opacity: b.loaderOpacity
  1009. }, 200);
  1010. L = setInterval(function () {
  1011. if (j.hasClass("stopped")) {
  1012. clearInterval(L)
  1013. }
  1014. if (h != "pie") {
  1015. if (bb <= 1.002 && !j.hasClass("stopped") && !j.hasClass("paused") && !j.hasClass("hovered")) {
  1016. bb = bb + o
  1017. } else if (bb <= 1 && (j.hasClass("stopped") || j.hasClass("paused") || j.hasClass("stopped") || j.hasClass("hovered"))) {
  1018. bb = bb
  1019. } else {
  1020. if (!j.hasClass("stopped") && !j.hasClass("paused") && !j.hasClass("hovered")) {
  1021. clearInterval(L);
  1022. W();
  1023. a("#" + i).animate({
  1024. opacity: 0
  1025. }, 200, function () {
  1026. clearTimeout(M);
  1027. M = setTimeout(ib, n);
  1028. jb();
  1029. b.onStartLoading.call(this)
  1030. })
  1031. }
  1032. }
  1033. switch (U) {
  1034. case "leftToRight":
  1035. a("#" + i).animate({
  1036. right: f - f * bb
  1037. }, I * o, "linear");
  1038. break;
  1039. case "rightToLeft":
  1040. a("#" + i).animate({
  1041. left: f - f * bb
  1042. }, I * o, "linear");
  1043. break;
  1044. case "topToBottom":
  1045. a("#" + i).animate({
  1046. bottom: m - m * bb
  1047. }, I * o, "linear");
  1048. break;
  1049. case "bottomToTop":
  1050. a("#" + i).animate({
  1051. bottom: m - m * bb
  1052. }, I * o, "linear");
  1053. break
  1054. }
  1055. } else {
  1056. cb = bb;
  1057. db.clearRect(0, 0, b.pieDiameter, b.pieDiameter);
  1058. db.globalCompositeOperation = "destination-over";
  1059. db.beginPath();
  1060. db.arc(b.pieDiameter / 2, b.pieDiameter / 2, b.pieDiameter / 2 - b.loaderStroke, 0, Math.PI * 2, false);
  1061. db.lineWidth = b.loaderStroke;
  1062. db.strokeStyle = b.loaderBgColor;
  1063. db.stroke();
  1064. db.closePath();
  1065. db.globalCompositeOperation = "source-over";
  1066. db.beginPath();
  1067. db.arc(b.pieDiameter / 2, b.pieDiameter / 2, b.pieDiameter / 2 - b.loaderStroke, 0, Math.PI * 2 * cb, false);
  1068. db.lineWidth = b.loaderStroke - b.loaderPadding * 2;
  1069. db.strokeStyle = b.loaderColor;
  1070. db.stroke();
  1071. db.closePath();
  1072. if (bb <= 1.002 && !j.hasClass("stopped") && !j.hasClass("paused") && !j.hasClass("hovered")) {
  1073. bb = bb + o
  1074. } else if (bb <= 1 && (j.hasClass("stopped") || j.hasClass("paused") || j.hasClass("hovered"))) {
  1075. bb = bb
  1076. } else {
  1077. if (!j.hasClass("stopped") && !j.hasClass("paused") && !j.hasClass("hovered")) {
  1078. clearInterval(L);
  1079. W();
  1080. a("#" + i + ", .camera_canvas_wrap", V).animate({
  1081. opacity: 0
  1082. }, 200, function () {
  1083. clearTimeout(M);
  1084. M = setTimeout(ib, n);
  1085. jb();
  1086. b.onStartLoading.call(this)
  1087. })
  1088. }
  1089. }
  1090. }
  1091. }, I * o)
  1092. }
  1093. }
  1094. if (e % D < eb) {
  1095. gb = 1
  1096. } else {
  1097. gb = 0
  1098. }
  1099. if (e % D == 0) {
  1100. lb = 0
  1101. }
  1102. if (Math.floor(e / D) < fb) {
  1103. kb = 1
  1104. } else {
  1105. kb = 0
  1106. }
  1107. switch (N) {
  1108. case "simpleFade":
  1109. height = u;
  1110. width = t;
  1111. opacityOnGrid = 0;
  1112. break;
  1113. case "curtainTopLeft":
  1114. height = 0,
  1115. width = Math.floor(t / D + gb + 1),
  1116. marginTop = "-" + Math.floor(u / C + kb + 1) + "px";
  1117. break;
  1118. case "curtainTopRight":
  1119. height = 0,
  1120. width = Math.floor(t / D + gb + 1),
  1121. marginTop = "-" + Math.floor(u / C + kb + 1) + "px";
  1122. break;
  1123. case "curtainBottomLeft":
  1124. height = 0,
  1125. width = Math.floor(t / D + gb + 1),
  1126. marginTop = Math.floor(u / C + kb + 1) + "px";
  1127. break;
  1128. case "curtainBottomRight":
  1129. height = 0,
  1130. width = Math.floor(t / D + gb + 1),
  1131. marginTop = Math.floor(u / C + kb + 1) + "px";
  1132. break;
  1133. case "curtainSliceLeft":
  1134. height = 0,
  1135. width = Math.floor(t / D + gb + 1);
  1136. if (e % 2 == 0) {
  1137. marginTop = Math.floor(u / C + kb + 1) + "px"
  1138. } else {
  1139. marginTop = "-" + Math.floor(u / C + kb + 1) + "px"
  1140. }
  1141. break;
  1142. case "curtainSliceRight":
  1143. height = 0,
  1144. width = Math.floor(t / D + gb + 1);
  1145. if (e % 2 == 0) {
  1146. marginTop = Math.floor(u / C + kb + 1) + "px"
  1147. } else {
  1148. marginTop = "-" + Math.floor(u / C + kb + 1) + "px"
  1149. }
  1150. break;
  1151. case "blindCurtainTopLeft":
  1152. height = Math.floor(u / C + kb + 1),
  1153. width = 0,
  1154. marginLeft = "-" + Math.floor(t / D + gb + 1) + "px";
  1155. break;
  1156. case "blindCurtainTopRight":
  1157. height = Math.floor(u / C + kb + 1),
  1158. width = 0,
  1159. marginLeft = Math.floor(t / D + gb + 1) + "px";
  1160. break;
  1161. case "blindCurtainBottomLeft":
  1162. height = Math.floor(u / C + kb + 1),
  1163. width = 0,
  1164. marginLeft = "-" + Math.floor(t / D + gb + 1) + "px";
  1165. break;
  1166. case "blindCurtainBottomRight":
  1167. height = Math.floor(u / C + kb + 1),
  1168. width = 0,
  1169. marginLeft = Math.floor(t / D + gb + 1) + "px";
  1170. break;
  1171. case "blindCurtainSliceBottom":
  1172. height = Math.floor(u / C + kb + 1),
  1173. width = 0;
  1174. if (e % 2 == 0) {
  1175. marginLeft = "-" + Math.floor(t / D + gb + 1) + "px"
  1176. } else {
  1177. marginLeft = Math.floor(t / D + gb + 1) + "px"
  1178. }
  1179. break;
  1180. case "blindCurtainSliceTop":
  1181. height = Math.floor(u / C + kb + 1),
  1182. width = 0;
  1183. if (e % 2 == 0) {
  1184. marginLeft = "-" + Math.floor(t / D + gb + 1) + "px"
  1185. } else {
  1186. marginLeft = Math.floor(t / D + gb + 1) + "px"
  1187. }
  1188. break;
  1189. case "stampede":
  1190. height = 0;
  1191. width = 0;
  1192. marginLeft = t * .2 * (c % D - (D - Math.floor(D / 2))) + "px";
  1193. marginTop = u * .2 * (Math.floor(c / D) + 1 - (C - Math.floor(C / 2))) + "px";
  1194. break;
  1195. case "mosaic":
  1196. height = 0;
  1197. width = 0;
  1198. break;
  1199. case "mosaicReverse":
  1200. height = 0;
  1201. width = 0;
  1202. marginLeft = Math.floor(t / D + gb + 1) + "px";
  1203. marginTop = Math.floor(u / C + kb + 1) + "px";
  1204. break;
  1205. case "mosaicRandom":
  1206. height = 0;
  1207. width = 0;
  1208. marginLeft = Math.floor(t / D + gb + 1) * .5 + "px";
  1209. marginTop = Math.floor(u / C + kb + 1) * .5 + "px";
  1210. break;
  1211. case "mosaicSpiral":
  1212. height = 0;
  1213. width = 0;
  1214. marginLeft = Math.floor(t / D + gb + 1) * .5 + "px";
  1215. marginTop = Math.floor(u / C + kb + 1) * .5 + "px";
  1216. break;
  1217. case "mosaicSpiralReverse":
  1218. height = 0;
  1219. width = 0;
  1220. marginLeft = Math.floor(t / D + gb + 1) * .5 + "px";
  1221. marginTop = Math.floor(u / C + kb + 1) * .5 + "px";
  1222. break;
  1223. case "topLeftBottomRight":
  1224. height = 0;
  1225. width = 0;
  1226. break;
  1227. case "bottomRightTopLeft":
  1228. height = 0;
  1229. width = 0;
  1230. marginLeft = Math.floor(t / D + gb + 1) + "px";
  1231. marginTop = Math.floor(u / C + kb + 1) + "px";
  1232. break;
  1233. case "bottomLeftTopRight":
  1234. height = 0;
  1235. width = 0;
  1236. marginLeft = 0;
  1237. marginTop = Math.floor(u / C + kb + 1) + "px";
  1238. break;
  1239. case "topRightBottomLeft":
  1240. height = 0;
  1241. width = 0;
  1242. marginLeft = Math.floor(t / D + gb + 1) + "px";
  1243. marginTop = 0;
  1244. break;
  1245. case "scrollRight":
  1246. height = u;
  1247. width = t;
  1248. marginLeft = -t;
  1249. break;
  1250. case "scrollLeft":
  1251. height = u;
  1252. width = t;
  1253. marginLeft = t;
  1254. break;
  1255. case "scrollTop":
  1256. height = u;
  1257. width = t;
  1258. marginTop = u;
  1259. break;
  1260. case "scrollBottom":
  1261. height = u;
  1262. width = t;
  1263. marginTop = -u;
  1264. break;
  1265. case "scrollHorz":
  1266. height = u;
  1267. width = t;
  1268. if (d == 0 && l == B - 1) {
  1269. marginLeft = -t
  1270. } else if (d < l || d == B - 1 && l == 0) {
  1271. marginLeft = t
  1272. } else {
  1273. marginLeft = -t
  1274. }
  1275. break
  1276. }
  1277. var m = a(".cameraappended:eq(" + e + ")", k);
  1278. if (typeof L !== "undefined") {
  1279. clearInterval(L);
  1280. clearTimeout(M);
  1281. M = setTimeout(ib, J + G)
  1282. }
  1283. if (a(r).length) {
  1284. a(".camera_pag li", f).removeClass("cameracurrent");
  1285. a(".camera_pag li", f).eq(l).addClass("cameracurrent")
  1286. }
  1287. if (a(s).length) {
  1288. a("li", s).removeClass("cameracurrent");
  1289. a("li", s).eq(l).addClass("cameracurrent");
  1290. a("li", s).not(".cameracurrent").find("img").animate({
  1291. opacity: .5
  1292. }, 0);
  1293. a("li.cameracurrent img", s).animate({
  1294. opacity: 1
  1295. }, 0);
  1296. a("li", s).hover(function () {
  1297. a("img", this).stop(true, false).animate({
  1298. opacity: 1
  1299. }, 150)
  1300. }, function () {
  1301. if (!a(this).hasClass("cameracurrent")) {
  1302. a("img", this).stop(true, false).animate({
  1303. opacity: .5
  1304. }, 150)
  1305. }
  1306. })
  1307. }
  1308. var n = parseFloat(J) + parseFloat(G);
  1309. if (N == "scrollLeft" || N == "scrollRight" || N == "scrollTop" || N == "scrollBottom" || N == "scrollHorz") {
  1310. b.onStartTransition.call(this);
  1311. n = 0;
  1312. m.delay((J + G) / ab * ob[c] * F * .5).css({
  1313. display: "block",
  1314. height: height,
  1315. "margin-left": marginLeft,
  1316. "margin-top": marginTop,
  1317. width: width
  1318. }).animate({
  1319. height: Math.floor(u / C + kb + 1),
  1320. "margin-top": 0,
  1321. "margin-left": 0,
  1322. width: Math.floor(t / D + gb + 1)
  1323. }, J - G, O, o);
  1324. S.eq(d).delay((J + G) / ab * ob[c] * F * .5).animate({
  1325. "margin-left": marginLeft * -1,
  1326. "margin-top": marginTop * -1
  1327. }, J - G, O, function () {
  1328. a(this).css({
  1329. "margin-top": 0,
  1330. "margin-left": 0
  1331. })
  1332. })
  1333. } else {
  1334. b.onStartTransition.call(this);
  1335. n = parseFloat(J) + parseFloat(G);
  1336. if (T == "next") {
  1337. m.delay((J + G) / ab * ob[c] * F * .5).css({
  1338. display: "block",
  1339. height: height,
  1340. "margin-left": marginLeft,
  1341. "margin-top": marginTop,
  1342. width: width,
  1343. opacity: opacityOnGrid
  1344. }).animate({
  1345. height: Math.floor(u / C + kb + 1),
  1346. "margin-top": 0,
  1347. "margin-left": 0,
  1348. opacity: 1,
  1349. width: Math.floor(t / D + gb + 1)
  1350. }, J - G, O, o)
  1351. } else {
  1352. S.eq(l).show().css("z-index", "999").addClass("cameracurrent");
  1353. S.eq(d).css("z-index", "1").removeClass("cameracurrent");
  1354. a(".cameraContent", g).eq(l).addClass("cameracurrent");
  1355. a(".cameraContent", g).eq(d).removeClass("cameracurrent");
  1356. m.delay((J + G) / ab * ob[c] * F * .5).css({
  1357. display: "block",
  1358. height: Math.floor(u / C + kb + 1),
  1359. "margin-top": 0,
  1360. "margin-left": 0,
  1361. opacity: 1,
  1362. width: Math.floor(t / D + gb + 1)
  1363. }).animate({
  1364. height: height,
  1365. "margin-left": marginLeft,
  1366. "margin-top": marginTop,
  1367. width: width,
  1368. opacity: opacityOnGrid
  1369. }, J - G, O, o)
  1370. }
  1371. }
  1372. })
  1373. }
  1374. }
  1375. var d = {
  1376. alignment: "center",
  1377. autoAdvance: true,
  1378. mobileAutoAdvance: true,
  1379. barDirection: "leftToRight",
  1380. barPosition: "bottom",
  1381. cols: 6,
  1382. easing: "easeInOutExpo",
  1383. mobileEasing: "",
  1384. fx: "random",
  1385. mobileFx: "",
  1386. gridDifference: 250,
  1387. height: "50%",
  1388. imagePath: "images/",
  1389. hover: true,
  1390. loader: "pie",
  1391. loaderColor: "#eeeeee",
  1392. loaderBgColor: "#222222",
  1393. loaderOpacity: .8,
  1394. loaderPadding: 2,
  1395. loaderStroke: 7,
  1396. minHeight: "200px",
  1397. navigation: true,
  1398. navigationHover: true,
  1399. mobileNavHover: true,
  1400. opacityOnGrid: false,
  1401. overlayer: true,
  1402. pagination: true,
  1403. playPause: true,
  1404. pauseOnClick: true,
  1405. pieDiameter: 38,
  1406. piePosition: "rightTop",
  1407. portrait: false,
  1408. rows: 4,
  1409. slicedCols: 12,
  1410. slicedRows: 8,
  1411. slideOn: "random",
  1412. thumbnails: false,
  1413. time: 7e3,
  1414. transPeriod: 1500,
  1415. onEndTransition: function () {},
  1416. onLoaded: function () {},
  1417. onStartLoading: function () {},
  1418. onStartTransition: function () {}
  1419. };
  1420. var b = a.extend({}, d, b);
  1421. var f = a(this).addClass("camera_wrap");
  1422. f.wrapInner('<div class="camera_src" />').wrapInner('<div class="camera_fakehover" />');
  1423. var g = a(".camera_fakehover", f);
  1424. g.append('<div class="camera_target"></div>');
  1425. if (b.overlayer == true) {
  1426. g.append('<div class="camera_overlayer"></div>')
  1427. }
  1428. g.append('<div class="camera_target_content"></div>');
  1429. var h;
  1430. if (b.loader == "pie" && a.browser.msie && a.browser.version < 9) {
  1431. h = "bar"
  1432. } else {
  1433. h = b.loader
  1434. }
  1435. if (h == "pie") {
  1436. g.append('<div class="camera_pie"></div>')
  1437. } else if (h == "bar") {
  1438. g.append('<div class="camera_bar"></div>')
  1439. } else {
  1440. g.append('<div class="camera_bar" style="display:none"></div>')
  1441. }
  1442. if (b.playPause == true) {
  1443. g.append('<div class="camera_commands"></div>')
  1444. }
  1445. if (b.navigation == true) {
  1446. g.append('<div class="camera_prev"><span></span></div>').append('<div class="camera_next"><span></span></div>')
  1447. }
  1448. if (b.thumbnails == true) {
  1449. f.append('<div class="camera_thumbs_cont" />')
  1450. }
  1451. if (b.thumbnails == true && b.pagination != true) {
  1452. a(".camera_thumbs_cont", f).wrap("<div />").wrap('<div class="camera_thumbs" />').wrap("<div />").wrap('<div class="camera_command_wrap" />')
  1453. }
  1454. if (b.pagination == true) {
  1455. f.append('<div class="camera_pag"></div>')
  1456. }
  1457. f.append('<div class="camera_loader"></div>');
  1458. a(".camera_caption", f).each(function () {
  1459. a(this).wrapInner("<div />")
  1460. });
  1461. var i = "pie_" + f.index(),
  1462. j = a(".camera_src", f),
  1463. k = a(".camera_target", f),
  1464. l = a(".camera_target_content", f),
  1465. m = a(".camera_pie", f),
  1466. n = a(".camera_bar", f),
  1467. o = a(".camera_prev", f),
  1468. p = a(".camera_next", f),
  1469. q = a(".camera_commands", f),
  1470. r = a(".camera_pag", f),
  1471. s = a(".camera_thumbs_cont", f);
  1472. var t, u;
  1473. var v = new Array;
  1474. a("> div", j).each(function () {
  1475. v.push(a(this).attr("data-src"))
  1476. });
  1477. var w = new Array;
  1478. a("> div", j).each(function () {
  1479. if (a(this).attr("data-link")) {
  1480. w.push(a(this).attr("data-link"))
  1481. } else {
  1482. w.push("")
  1483. }
  1484. });
  1485. var x = new Array;
  1486. a("> div", j).each(function () {
  1487. if (a(this).attr("data-target")) {
  1488. x.push(a(this).attr("data-target"))
  1489. } else {
  1490. x.push("")
  1491. }
  1492. });
  1493. var y = new Array;
  1494. a("> div", j).each(function () {
  1495. if (a(this).attr("data-portrait")) {
  1496. y.push(a(this).attr("data-portrait"))
  1497. } else {
  1498. y.push("")
  1499. }
  1500. });
  1501. var z = new Array;
  1502. a("> div", j).each(function () {
  1503. if (a(this).attr("data-alignment")) {
  1504. z.push(a(this).attr("data-alignment"))
  1505. } else {
  1506. z.push("")
  1507. }
  1508. });
  1509. var A = new Array;
  1510. a("> div", j).each(function () {
  1511. if (a(this).attr("data-thumb")) {
  1512. A.push(a(this).attr("data-thumb"))
  1513. } else {
  1514. A.push("")
  1515. }
  1516. });
  1517. var B = v.length;
  1518. a(l).append('<div class="cameraContents" />');
  1519. var C;
  1520. for (C = 0; C < B; C++) {
  1521. a(".cameraContents", l).append('<div class="cameraContent" />');
  1522. if (w[C] != "") {
  1523. var D = a("> div ", j).eq(C).attr("data-box");
  1524. if (typeof D !== "undefined" && D !== false && D != "") {
  1525. D = 'data-box="' + a("> div ", j).eq(C).attr("data-box") + '"'
  1526. } else {
  1527. D = ""
  1528. }
  1529. a(".camera_target_content .cameraContent:eq(" + C + ")", f).append('<a class="camera_link" href="' + w[C] + '" ' + D + ' target="' + x[C] + '"></a>')
  1530. }
  1531. }
  1532. a(".camera_caption", f).each(function () {
  1533. var b = a(this).parent().index(),
  1534. c = f.find(".cameraContent").eq(b);
  1535. a(this).appendTo(c)
  1536. });
  1537. k.append('<div class="cameraCont" />');
  1538. var E = a(".cameraCont", f);
  1539. var F;
  1540. for (F = 0; F < B; F++) {
  1541. E.append('<div class="cameraSlide cameraSlide_' + F + '" />');
  1542. var G = a("> div:eq(" + F + ")", j);
  1543. k.find(".cameraSlide_" + F).clone(G)
  1544. }
  1545. a(window).bind("load resize pageshow", function () {
  1546. hb();
  1547. H()
  1548. });
  1549. E.append('<div class="cameraSlide cameraSlide_' + F + '" />');
  1550. var I;
  1551. f.show();
  1552. var t = k.width();
  1553. var u = k.height();
  1554. var J;
  1555. a(window).bind("resize pageshow", function () {
  1556. if (I == true) {
  1557. K()
  1558. }
  1559. a("ul", s).animate({
  1560. "margin-top": 0
  1561. }, 0, hb);
  1562. if (!j.hasClass("paused")) {
  1563. j.addClass("paused");
  1564. if (a(".camera_stop", V).length) {
  1565. a(".camera_stop", V).hide();
  1566. a(".camera_play", V).show();
  1567. if (h != "none") {
  1568. a("#" + i).hide()
  1569. }
  1570. } else {
  1571. if (h != "none") {
  1572. a("#" + i).hide()
  1573. }
  1574. }
  1575. clearTimeout(J);
  1576. J = setTimeout(function () {
  1577. j.removeClass("paused");
  1578. if (a(".camera_play", V).length) {
  1579. a(".camera_play", V).hide();
  1580. a(".camera_stop", V).show();
  1581. if (h != "none") {
  1582. a("#" + i).fadeIn()
  1583. }
  1584. } else {
  1585. if (h != "none") {
  1586. a("#" + i).fadeIn()
  1587. }
  1588. }
  1589. }, 1500)
  1590. }
  1591. });
  1592. var L, M;
  1593. var N, O, P, q, r;
  1594. var Q, R;
  1595. if (e() && b.mobileAutoAdvance != "") {
  1596. O = b.mobileAutoAdvance
  1597. } else {
  1598. O = b.autoAdvance
  1599. }
  1600. if (O == false) {
  1601. j.addClass("paused")
  1602. }
  1603. if (e() && b.mobileNavHover != "") {
  1604. P = b.mobileNavHover
  1605. } else {
  1606. P = b.navigationHover
  1607. }
  1608. if (j.length != 0) {
  1609. var S = a(".cameraSlide", k);
  1610. S.wrapInner('<div class="camerarelative" />');
  1611. var T;
  1612. var U = b.barDirection;
  1613. var V = f;
  1614. a("iframe", g).each(function () {
  1615. var b = a(this);
  1616. var c = b.attr("src");
  1617. b.attr("data-src", c);
  1618. var d = b.parent().index(".camera_src > div");
  1619. a(".camera_target_content .cameraContent:eq(" + d + ")", f).append(b)
  1620. });
  1621. function W() {
  1622. a("iframe", g).each(function () {
  1623. a(".camera_caption", g).show();
  1624. var c = a(this);
  1625. var d = c.attr("data-src");
  1626. c.attr("src", d);
  1627. var e = b.imagePath + "blank.gif";
  1628. var h = new Image;
  1629. h.src = e;
  1630. if (b.height.indexOf("%") != -1) {
  1631. var i = Math.round(t / (100 / parseFloat(b.height)));
  1632. if (b.minHeight != "" && i < parseFloat(b.minHeight)) {
  1633. u = parseFloat(b.minHeight)
  1634. } else {
  1635. u = i
  1636. }
  1637. } else if (b.height == "auto") {
  1638. u = f.height()
  1639. } else {
  1640. u = parseFloat(b.height)
  1641. }
  1642. c.after(a(h).attr({
  1643. "class": "imgFake",
  1644. width: t,
  1645. height: u
  1646. }));
  1647. var j = c.clone();
  1648. c.remove();
  1649. a(h).bind("click", function () {
  1650. if (a(this).css("position") == "absolute") {
  1651. a(this).remove();
  1652. if (d.indexOf("vimeo") != -1 || d.indexOf("youtube") != -1) {
  1653. if (d.indexOf("?") != -1) {
  1654. autoplay = "&autoplay=1"
  1655. } else {
  1656. autoplay = "?autoplay=1"
  1657. }
  1658. } else if (d.indexOf("dailymotion") != -1) {
  1659. if (d.indexOf("?") != -1) {
  1660. autoplay = "&autoPlay=1"
  1661. } else {
  1662. autoplay = "?autoPlay=1"
  1663. }
  1664. }
  1665. j.attr("src", d + autoplay);
  1666. R = true
  1667. } else {
  1668. a(this).css({
  1669. position: "absolute",
  1670. top: 0,
  1671. left: 0,
  1672. zIndex: 10
  1673. }).after(j);
  1674. j.css({
  1675. position: "absolute",
  1676. top: 0,
  1677. left: 0,
  1678. zIndex: 9
  1679. })
  1680. }
  1681. })
  1682. })
  1683. }
  1684. W();
  1685. if (b.hover == true) {
  1686. if (!e()) {
  1687. g.hover(function () {
  1688. j.addClass("hovered")
  1689. }, function () {
  1690. j.removeClass("hovered")
  1691. })
  1692. }
  1693. }
  1694. if (P == true) {
  1695. a(o, f).animate({
  1696. opacity: 0
  1697. }, 0);
  1698. a(p, f).animate({
  1699. opacity: 0
  1700. }, 0);
  1701. a(q, f).animate({
  1702. opacity: 0
  1703. }, 0);
  1704. if (e()) {
  1705. g.live("vmouseover", function () {
  1706. a(o, f).animate({
  1707. opacity: 1
  1708. }, 200);
  1709. a(p, f).animate({
  1710. opacity: 1
  1711. }, 200);
  1712. a(q, f).animate({
  1713. opacity: 1
  1714. }, 200)
  1715. });
  1716. g.live("vmouseout", function () {
  1717. a(o, f).delay(500).animate({
  1718. opacity: 0
  1719. }, 200);
  1720. a(p, f).delay(500).animate({
  1721. opacity: 0
  1722. }, 200);
  1723. a(q, f).delay(500).animate({
  1724. opacity: 0
  1725. }, 200)
  1726. })
  1727. } else {
  1728. g.hover(function () {
  1729. a(o, f).animate({
  1730. opacity: 1
  1731. }, 200);
  1732. a(p, f).animate({
  1733. opacity: 1
  1734. }, 200);
  1735. a(q, f).animate({
  1736. opacity: 1
  1737. }, 200)
  1738. }, function () {
  1739. a(o, f).animate({
  1740. opacity: 0
  1741. }, 200);
  1742. a(p, f).animate({
  1743. opacity: 0
  1744. }, 200);
  1745. a(q, f).animate({
  1746. opacity: 0
  1747. }, 200)
  1748. })
  1749. }
  1750. }
  1751. a(".camera_stop", V).live("click", function () {
  1752. O = false;
  1753. j.addClass("paused");
  1754. if (a(".camera_stop", V).length) {
  1755. a(".camera_stop", V).hide();
  1756. a(".camera_play", V).show();
  1757. if (h != "none") {
  1758. a("#" + i).hide()
  1759. }
  1760. } else {
  1761. if (h != "none") {
  1762. a("#" + i).hide()
  1763. }
  1764. }
  1765. });
  1766. a(".camera_play", V).live("click", function () {
  1767. O = true;
  1768. j.removeClass("paused");
  1769. if (a(".camera_play", V).length) {
  1770. a(".camera_play", V).hide();
  1771. a(".camera_stop", V).show();
  1772. if (h != "none") {
  1773. a("#" + i).show()
  1774. }
  1775. } else {
  1776. if (h != "none") {
  1777. a("#" + i).show()
  1778. }
  1779. }
  1780. });
  1781. if (b.pauseOnClick == true) {
  1782. a(".camera_target_content", g).mouseup(function () {
  1783. O = false;
  1784. j.addClass("paused");
  1785. a(".camera_stop", V).hide();
  1786. a(".camera_play", V).show();
  1787. a("#" + i).hide()
  1788. })
  1789. }
  1790. a(".cameraContent, .imgFake", g).hover(function () {
  1791. Q = true
  1792. }, function () {
  1793. Q = false
  1794. });
  1795. a(".cameraContent, .imgFake", g).bind("click", function () {
  1796. if (R == true && Q == true) {
  1797. O = false;
  1798. a(".camera_caption", g).hide();
  1799. j.addClass("paused");
  1800. a(".camera_stop", V).hide();
  1801. a(".camera_play", V).show();
  1802. a("#" + i).hide()
  1803. }
  1804. })
  1805. }
  1806. if (h != "pie") {
  1807. n.append('<span class="camera_bar_cont" />');
  1808. a(".camera_bar_cont", n).animate({
  1809. opacity: b.loaderOpacity
  1810. }, 0).css({
  1811. position: "absolute",
  1812. left: 0,
  1813. right: 0,
  1814. top: 0,
  1815. bottom: 0,
  1816. "background-color": b.loaderBgColor
  1817. }).append('<span id="' + i + '" />');
  1818. a("#" + i).animate({
  1819. opacity: 0
  1820. }, 0);
  1821. var Z = a("#" + i);
  1822. Z.css({
  1823. position: "absolute",
  1824. "background-color": b.loaderColor
  1825. });
  1826. switch (b.barPosition) {
  1827. case "left":
  1828. n.css({
  1829. right: "auto",
  1830. width: b.loaderStroke
  1831. });
  1832. break;
  1833. case "right":
  1834. n.css({
  1835. left: "auto",
  1836. width: b.loaderStroke
  1837. });
  1838. break;
  1839. case "top":
  1840. n.css({
  1841. bottom: "auto",
  1842. height: b.loaderStroke
  1843. });
  1844. break;
  1845. case "bottom":
  1846. n.css({
  1847. top: "auto",
  1848. height: b.loaderStroke
  1849. });
  1850. break
  1851. }
  1852. switch (U) {
  1853. case "leftToRight":
  1854. Z.css({
  1855. left: 0,
  1856. right: 0,
  1857. top: b.loaderPadding,
  1858. bottom: b.loaderPadding
  1859. });
  1860. break;
  1861. case "rightToLeft":
  1862. Z.css({
  1863. left: 0,
  1864. right: 0,
  1865. top: b.loaderPadding,
  1866. bottom: b.loaderPadding
  1867. });
  1868. break;
  1869. case "topToBottom":
  1870. Z.css({
  1871. left: b.loaderPadding,
  1872. right: b.loaderPadding,
  1873. top: 0,
  1874. bottom: 0
  1875. });
  1876. break;
  1877. case "bottomToTop":
  1878. Z.css({
  1879. left: b.loaderPadding,
  1880. right: b.loaderPadding,
  1881. top: 0,
  1882. bottom: 0
  1883. });
  1884. break
  1885. }
  1886. } else {
  1887. m.append('<canvas id="' + i + '"></canvas>');
  1888. var _;
  1889. var Z = document.getElementById(i);
  1890. Z.setAttribute("width", b.pieDiameter);
  1891. Z.setAttribute("height", b.pieDiameter);
  1892. var ab;
  1893. switch (b.piePosition) {
  1894. case "leftTop":
  1895. ab = "left:0; top:0;";
  1896. break;
  1897. case "rightTop":
  1898. ab = "right:0; top:0;";
  1899. break;
  1900. case "leftBottom":
  1901. ab = "left:0; bottom:0;";
  1902. break;
  1903. case "rightBottom":
  1904. ab = "right:0; bottom:0;";
  1905. break
  1906. }
  1907. Z.setAttribute("style", "position:absolute; z-index:1002; " + ab);
  1908. var bb;
  1909. var cb;
  1910. if (Z && Z.getContext) {
  1911. var db = Z.getContext("2d");
  1912. db.rotate(Math.PI * (3 / 2));
  1913. db.translate(-b.pieDiameter, 0)
  1914. }
  1915. }
  1916. if (h == "none" || O == false) {
  1917. a("#" + i).hide();
  1918. a(".camera_canvas_wrap", V).hide()
  1919. }
  1920. if (a(r).length) {
  1921. a(r).append('<ul class="camera_pag_ul" />');
  1922. var eb;
  1923. for (eb = 0; eb < B; eb++) {
  1924. a(".camera_pag_ul", f).append('<li class="pag_nav_' + eb + '" style="position:relative; z-index:1002"><span><span>' + eb + "</span></span></li>")
  1925. }
  1926. a(".camera_pag_ul li", f).hover(function () {
  1927. a(this).addClass("camera_hover");
  1928. if (a(".camera_thumb", this).length) {
  1929. var b = a(".camera_thumb", this).outerWidth(),
  1930. c = a(".camera_thumb", this).outerHeight(),
  1931. d = a(this).outerWidth();
  1932. a(".camera_thumb", this).show().css({
  1933. top: "-" + c + "px",
  1934. left: "-" + (b - d) / 2 + "px"
  1935. }).animate({
  1936. opacity: 1,
  1937. "margin-top": "-3px"
  1938. }, 200);
  1939. a(".thumb_arrow", this).show().animate({
  1940. opacity: 1,
  1941. "margin-top": "-3px"
  1942. }, 200)
  1943. }
  1944. }, function () {
  1945. a(this).removeClass("camera_hover");
  1946. a(".camera_thumb", this).animate({
  1947. "margin-top": "-20px",
  1948. opacity: 0
  1949. }, 200, function () {
  1950. a(this).css({
  1951. marginTop: "5px"
  1952. }).hide()
  1953. });
  1954. a(".thumb_arrow", this).animate({
  1955. "margin-top": "-20px",
  1956. opacity: 0
  1957. }, 200, function () {
  1958. a(this).css({
  1959. marginTop: "5px"
  1960. }).hide()
  1961. })
  1962. })
  1963. }
  1964. if (a(s).length) {
  1965. var fb;
  1966. if (!a(r).length) {
  1967. a(s).append("<div />");
  1968. a(s).before('<div class="camera_prevThumbs hideNav"><div></div></div>').before('<div class="camera_nextThumbs hideNav"><div></div></div>');
  1969. a("> div", s).append("<ul />");
  1970. a.each(A, function (b, c) {
  1971. if (a("> div", j).eq(b).attr("data-thumb") != "") {
  1972. var d = a("> div", j).eq(b).attr("data-thumb"),
  1973. e = new Image;
  1974. e.src = d;
  1975. a("ul", s).append('<li class="pix_thumb pix_thumb_' + b + '" />');
  1976. a("li.pix_thumb_" + b, s).append(a(e).attr("class", "camera_thumb"))
  1977. }
  1978. })
  1979. } else {
  1980. a.each(A, function (b, c) {
  1981. if (a("> div", j).eq(b).attr("data-thumb") != "") {
  1982. var d = a("> div", j).eq(b).attr("data-thumb"),
  1983. e = new Image;
  1984. e.src = d;
  1985. a("li.pag_nav_" + b, r).append(a(e).attr("class", "camera_thumb").css({
  1986. position: "absolute"
  1987. }).animate({
  1988. opacity: 0
  1989. }, 0));
  1990. a("li.pag_nav_" + b + " > img", r).after('<div class="thumb_arrow" />');
  1991. a("li.pag_nav_" + b + " > .thumb_arrow", r).animate({
  1992. opacity: 0
  1993. }, 0)
  1994. }
  1995. });
  1996. f.css({
  1997. marginBottom: a(r).outerHeight()
  1998. })
  1999. }
  2000. } else if (!a(s).length && a(r).length) {
  2001. f.css({
  2002. marginBottom: a(r).outerHeight()
  2003. })
  2004. }
  2005. var gb = true;
  2006. if (a(q).length) {
  2007. a(q).append('<div class="camera_play"></div>').append('<div class="camera_stop"></div>');
  2008. if (O == true) {
  2009. a(".camera_play", V).hide();
  2010. a(".camera_stop", V).show()
  2011. } else {
  2012. a(".camera_stop", V).hide();
  2013. a(".camera_play", V).show()
  2014. }
  2015. }
  2016. ib();
  2017. a(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom", g).each(function () {
  2018. a(this).css("visibility", "hidden")
  2019. });
  2020. b.onStartLoading.call(this);
  2021. jb();
  2022. if (a(o).length) {
  2023. a(o).click(function () {
  2024. if (!j.hasClass("camerasliding")) {
  2025. var c = parseFloat(a(".cameraSlide.cameracurrent", k).index());
  2026. clearInterval(L);
  2027. W();
  2028. a("#" + i + ", .camera_canvas_wrap", f).animate({
  2029. opacity: 0
  2030. }, 0);
  2031. ib();
  2032. if (c != 0) {
  2033. jb(c)
  2034. } else {
  2035. jb(B)
  2036. }
  2037. b.onStartLoading.call(this)
  2038. }
  2039. })
  2040. }
  2041. if (a(p).length) {
  2042. a(p).click(function () {
  2043. if (!j.hasClass("camerasliding")) {
  2044. var c = parseFloat(a(".cameraSlide.cameracurrent", k).index());
  2045. clearInterval(L);
  2046. W();
  2047. a("#" + i + ", .camera_canvas_wrap", V).animate({
  2048. opacity: 0
  2049. }, 0);
  2050. ib();
  2051. if (c == B - 1) {
  2052. jb(1)
  2053. } else {
  2054. jb(c + 2)
  2055. }
  2056. b.onStartLoading.call(this)
  2057. }
  2058. })
  2059. }
  2060. if (e()) {
  2061. g.bind("swipeleft", function (c) {
  2062. if (!j.hasClass("camerasliding")) {
  2063. var d = parseFloat(a(".cameraSlide.cameracurrent", k).index());
  2064. clearInterval(L);
  2065. W();
  2066. a("#" + i + ", .camera_canvas_wrap", V).animate({
  2067. opacity: 0
  2068. }, 0);
  2069. ib();
  2070. if (d == B - 1) {
  2071. jb(1)
  2072. } else {
  2073. jb(d + 2)
  2074. }
  2075. b.onStartLoading.call(this)
  2076. }
  2077. });
  2078. g.bind("swiperight", function (c) {
  2079. if (!j.hasClass("camerasliding")) {
  2080. var d = parseFloat(a(".cameraSlide.cameracurrent", k).index());
  2081. clearInterval(L);
  2082. W();
  2083. a("#" + i + ", .camera_canvas_wrap", V).animate({
  2084. opacity: 0
  2085. }, 0);
  2086. ib();
  2087. if (d != 0) {
  2088. jb(d)
  2089. } else {
  2090. jb(B)
  2091. }
  2092. b.onStartLoading.call(this)
  2093. }
  2094. })
  2095. }
  2096. if (a(r).length) {
  2097. a(".camera_pag li", f).click(function () {
  2098. if (!j.hasClass("camerasliding")) {
  2099. var c = parseFloat(a(this).index());
  2100. var d = parseFloat(a(".cameraSlide.cameracurrent", k).index());
  2101. if (c != d) {
  2102. clearInterval(L);
  2103. W();
  2104. a("#" + i + ", .camera_canvas_wrap", V).animate({
  2105. opacity: 0
  2106. }, 0);
  2107. ib();
  2108. jb(c + 1);
  2109. b.onStartLoading.call(this)
  2110. }
  2111. }
  2112. })
  2113. }
  2114. if (a(s).length) {
  2115. a(".pix_thumb img", s).click(function () {
  2116. if (!j.hasClass("camerasliding")) {
  2117. var c = parseFloat(a(this).parents("li").index());
  2118. var d = parseFloat(a(".cameracurrent", k).index());
  2119. if (c != d) {
  2120. clearInterval(L);
  2121. W();
  2122. a("#" + i + ", .camera_canvas_wrap", V).animate({
  2123. opacity: 0
  2124. }, 0);
  2125. a(".pix_thumb", s).removeClass("cameracurrent");
  2126. a(this).parents("li").addClass("cameracurrent");
  2127. ib();
  2128. jb(c + 1);
  2129. hb();
  2130. b.onStartLoading.call(this)
  2131. }
  2132. }
  2133. });
  2134. a(".camera_thumbs_cont .camera_prevThumbs", V).hover(function () {
  2135. a(this).stop(true, false).animate({
  2136. opacity: 1
  2137. }, 250)
  2138. }, function () {
  2139. a(this).stop(true, false).animate({
  2140. opacity: .7
  2141. }, 250)
  2142. });
  2143. a(".camera_prevThumbs", V).click(function () {
  2144. var b = 0,
  2145. c = a(s).outerWidth(),
  2146. d = a("ul", s).offset().left,
  2147. e = a("> div", s).offset().left,
  2148. f = e - d;
  2149. a(".camera_visThumb", s).each(function () {
  2150. var c = a(this).outerWidth();
  2151. b = b + c
  2152. });
  2153. if (f - b > 0) {
  2154. a("ul", s).animate({
  2155. "margin-left": "-" + (f - b) + "px"
  2156. }, 500, H)
  2157. } else {
  2158. a("ul", s).animate({
  2159. "margin-left": 0
  2160. }, 500, H)
  2161. }
  2162. });
  2163. a(".camera_thumbs_cont .camera_nextThumbs", V).hover(function () {
  2164. a(this).stop(true, false).animate({
  2165. opacity: 1
  2166. }, 250)
  2167. }, function () {
  2168. a(this).stop(true, false).animate({
  2169. opacity: .7
  2170. }, 250)
  2171. });
  2172. a(".camera_nextThumbs", V).click(function () {
  2173. var b = 0,
  2174. c = a(s).outerWidth(),
  2175. d = a("ul", s).outerWidth(),
  2176. e = a("ul", s).offset().left,
  2177. f = a("> div", s).offset().left,
  2178. g = f - e;
  2179. a(".camera_visThumb", s).each(function () {
  2180. var c = a(this).outerWidth();
  2181. b = b + c
  2182. });
  2183. if (g + b + b < d) {
  2184. a("ul", s).animate({
  2185. "margin-left": "-" + (g + b) + "px"
  2186. }, 500, H)
  2187. } else {
  2188. a("ul", s).animate({
  2189. "margin-left": "-" + (d - c) + "px"
  2190. }, 500, H)
  2191. }
  2192. })
  2193. }
  2194. }
  2195. })(jQuery);
  2196. (function (a) {
  2197. a.fn.cameraStop = function () {
  2198. var b = a(this),
  2199. c = a(".camera_src", b),
  2200. d = "pie_" + b.index();
  2201. c.addClass("stopped");
  2202. if (a(".camera_showcommands").length) {
  2203. var e = a(".camera_thumbs_wrap", b)
  2204. } else {
  2205. var e = b
  2206. }
  2207. }
  2208. })(jQuery);
  2209. (function (a) {
  2210. a.fn.cameraPause = function () {
  2211. var b = a(this);
  2212. var c = a(".camera_src", b);
  2213. c.addClass("paused")
  2214. }
  2215. })(jQuery);
  2216. (function (a) {
  2217. a.fn.cameraResume = function () {
  2218. var b = a(this);
  2219. var c = a(".camera_src", b);
  2220. if (typeof autoAdv === "undefined" || autoAdv !== true) {
  2221. c.removeClass("paused")
  2222. }
  2223. }
  2224. })(jQuery);