smartcost.js 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112
  1. (function(d){function k(a){var b=["Moz","Webkit","O","ms"],c=a.charAt(0).toUpperCase()+a.substr(1);if(a in i.style)return a;for(a=0;a<b.length;++a){var d=b[a]+c;if(d in i.style)return d}}function j(a){"string"===typeof a&&this.parse(a);return this}function p(a,b,c){!0===b?a.queue(c):b?a.queue(b,c):c()}function m(a){var b=[];d.each(a,function(a){a=d.camelCase(a);a=d.transit.propertyMap[a]||a;a=r(a);-1===d.inArray(a,b)&&b.push(a)});return b}function q(a,b,c,e){a=m(a);d.cssEase[c]&&(c=d.cssEase[c]);
  2. var h=""+n(b)+" "+c;0<parseInt(e,10)&&(h+=" "+n(e));var f=[];d.each(a,function(a,b){f.push(b+" "+h)});return f.join(", ")}function f(a,b){b||(d.cssNumber[a]=!0);d.transit.propertyMap[a]=e.transform;d.cssHooks[a]={get:function(b){return(d(b).css("transform")||new j).get(a)},set:function(b,e){var h=d(b).css("transform")||new j;h.setFromString(a,e);d(b).css({transform:h})}}}function r(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function g(a,b){return"string"===typeof a&&!a.match(/^[\-0-9\.]+$/)?
  3. a:""+a+b}function n(a){d.fx.speeds[a]&&(a=d.fx.speeds[a]);return g(a,"ms")}d.transit={version:"0.1.3",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:!0,useTransitionEnd:!1};var i=document.createElement("div"),e={},s=-1<navigator.userAgent.toLowerCase().indexOf("chrome");e.transition=k("transition");e.transitionDelay=k("transitionDelay");e.transform=k("transform");
  4. e.transformOrigin=k("transformOrigin");i.style[e.transform]="";i.style[e.transform]="rotateY(90deg)";e.transform3d=""!==i.style[e.transform];d.extend(d.support,e);var o=e.transitionEnd={MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"}[e.transition]||null,i=null;d.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)"};d.cssHooks.transform={get:function(a){return d(a).data("transform")},
  5. set:function(a,b){var c=b;c instanceof j||(c=new j(c));a.style[e.transform]="WebkitTransform"===e.transform&&!s?c.toString(!0):c.toString();d(a).data("transform",c)}};d.cssHooks.transformOrigin={get:function(a){return a.style[e.transformOrigin]},set:function(a,b){a.style[e.transformOrigin]=b}};f("scale");f("translate");f("rotate");f("rotateX");f("rotateY");f("rotate3d");f("perspective");f("skewX");f("skewY");f("x",!0);f("y",!0);j.prototype={setFromString:function(a,b){var c="string"===typeof b?b.split(","):
  6. b.constructor===Array?b:[b];c.unshift(a);j.prototype.set.apply(this,c)},set:function(a){var b=Array.prototype.slice.apply(arguments,[1]);this.setter[a]?this.setter[a].apply(this,b):this[a]=b.join(",")},get:function(a){return this.getter[a]?this.getter[a].apply(this):this[a]||0},setter:{rotate:function(a){this.rotate=g(a,"deg")},rotateX:function(a){this.rotateX=g(a,"deg")},rotateY:function(a){this.rotateY=g(a,"deg")},scale:function(a,b){void 0===b&&(b=a);this.scale=a+","+b},skewX:function(a){this.skewX=
  7. g(a,"deg")},skewY:function(a){this.skewY=g(a,"deg")},perspective:function(a){this.perspective=g(a,"px")},x:function(a){this.set("translate",a,null)},y:function(a){this.set("translate",null,a)},translate:function(a,b){void 0===this._translateX&&(this._translateX=0);void 0===this._translateY&&(this._translateY=0);null!==a&&(this._translateX=g(a,"px"));null!==b&&(this._translateY=g(b,"px"));this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||
  8. 0},scale:function(){var a=(this.scale||"1,1").split(",");a[0]&&(a[0]=parseFloat(a[0]));a[1]&&(a[1]=parseFloat(a[1]));return a[0]===a[1]?a[0]:a},rotate3d:function(){for(var a=(this.rotate3d||"0,0,0,0deg").split(","),b=0;3>=b;++b)a[b]&&(a[b]=parseFloat(a[b]));a[3]&&(a[3]=g(a[3],"deg"));return a}},parse:function(a){var b=this;a.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(a,d,e){b.setFromString(d,e)})},toString:function(a){var b=[],c;for(c in this)if(this.hasOwnProperty(c)&&(e.transform3d||!("rotateX"===
  9. c||"rotateY"===c||"perspective"===c||"transformOrigin"===c)))"_"!==c[0]&&(a&&"scale"===c?b.push(c+"3d("+this[c]+",1)"):a&&"translate"===c?b.push(c+"3d("+this[c]+",0)"):b.push(c+"("+this[c]+")"));return b.join(" ")}};d.fn.transition=d.fn.transit=function(a,b,c,f){var h=this,g=0,i=!0;"function"===typeof b&&(f=b,b=void 0);"function"===typeof c&&(f=c,c=void 0);"undefined"!==typeof a.easing&&(c=a.easing,delete a.easing);"undefined"!==typeof a.duration&&(b=a.duration,delete a.duration);"undefined"!==typeof a.complete&&
  10. (f=a.complete,delete a.complete);"undefined"!==typeof a.queue&&(i=a.queue,delete a.queue);"undefined"!==typeof a.delay&&(g=a.delay,delete a.delay);"undefined"===typeof b&&(b=d.fx.speeds._default);"undefined"===typeof c&&(c=d.cssEase._default);var b=n(b),j=q(a,b,c,g),l=d.transit.enabled&&e.transition?parseInt(b,10)+parseInt(g,10):0;if(0===l)return p(h,i,function(b){h.css(a);f&&f();b()}),h;var k={},m=function(b){var c=!1,g=function(){c&&h.unbind(o,g);0<l&&h.each(function(){this.style[e.transition]=
  11. k[this]||null});"function"===typeof f&&f.apply(h);"function"===typeof b&&b()};0<l&&o&&d.transit.useTransitionEnd?(c=!0,h.bind(o,g)):window.setTimeout(g,l);h.each(function(){0<l&&(this.style[e.transition]=j);d(this).css(a)})};p(h,i,function(a){var b=0;"MozTransition"===e.transition&&25>b&&(b=25);window.setTimeout(function(){m(a)},b)});return this};d.transit.getTransitionValue=q})(jQuery);
  12. /**
  13. * jquery.gridrotator.js v1.0.0
  14. * http://www.codrops.com
  15. *
  16. * Licensed under the MIT license.
  17. * http://www.opensource.org/licenses/mit-license.php
  18. *
  19. * Copyright 2012, Codrops
  20. * http://www.codrops.com
  21. */
  22. ;( function( $, window, undefined ) {
  23. 'use strict';
  24. // http://www.hardcode.nl/subcategory_1/article_317-array-shuffle-function
  25. Array.prototype.shuffle = function() {
  26. var i=this.length,p,t;
  27. while (i--) {
  28. p = Math.floor(Math.random()*i);
  29. t = this[i];
  30. this[i]=this[p];
  31. this[p]=t;
  32. }
  33. return this;
  34. };
  35. /*
  36. * debouncedresize: special jQuery event that happens once after a window resize
  37. *
  38. * latest version and complete README available on Github:
  39. * https://github.com/louisremi/jquery-smartresize/blob/master/jquery.debouncedresize.js
  40. *
  41. * Copyright 2011 @louis_remi
  42. * Licensed under the MIT license.
  43. */
  44. var $event = $.event,
  45. $special,
  46. resizeTimeout;
  47. $special = $event.special.debouncedresize = {
  48. setup: function() {
  49. $( this ).on( "resize", $special.handler );
  50. },
  51. teardown: function() {
  52. $( this ).off( "resize", $special.handler );
  53. },
  54. handler: function( event, execAsap ) {
  55. // Save the context
  56. var context = this,
  57. args = arguments,
  58. dispatch = function() {
  59. // set correct event type
  60. event.type = "debouncedresize";
  61. $event.dispatch.apply( context, args );
  62. };
  63. if ( resizeTimeout ) {
  64. clearTimeout( resizeTimeout );
  65. }
  66. execAsap ?
  67. dispatch() :
  68. resizeTimeout = setTimeout( dispatch, $special.threshold );
  69. },
  70. threshold: 50
  71. };
  72. // global
  73. var $window = $( window ),
  74. Modernizr = window.Modernizr;
  75. $.GridRotator = function( options, element ) {
  76. this.$el = $( element );
  77. if( Modernizr.backgroundsize ) {
  78. var _self = this;
  79. this.$el.addClass( 'ri-grid-loading' );
  80. $( '<img/>' ).load( function() {
  81. _self._init( options );
  82. } ).attr( 'src', 'images/loading.gif' );
  83. }
  84. };
  85. $.GridRotator.defaults = {
  86. // number of rows
  87. rows : 4,
  88. // number of columns
  89. columns : 10,
  90. w1024 : {
  91. rows : 3,
  92. columns : 8
  93. },
  94. w768 : {
  95. rows : 3,
  96. columns : 7
  97. },
  98. w480 : {
  99. rows : 3,
  100. columns : 5
  101. },
  102. w320 : {
  103. rows : 2,
  104. columns : 4
  105. },
  106. w240 : {
  107. rows : 2,
  108. columns : 3
  109. },
  110. // step: number of items that are replaced at the same time
  111. // random || [some number]
  112. // note: for performance issues, the number "can't" be > options.maxStep
  113. step : 'random',
  114. maxStep : 3,
  115. // prevent user to click the items
  116. preventClick : true,
  117. // animation type
  118. // showHide || fadeInOut || slideLeft ||
  119. // slideRight || slideTop || slideBottom ||
  120. // rotateLeft || rotateRight || rotateTop ||
  121. // rotateBottom || scale || rotate3d ||
  122. // rotateLeftScale || rotateRightScale ||
  123. // rotateTopScale || rotateBottomScale || random
  124. animType : 'random',
  125. // animation speed
  126. animSpeed : 500,
  127. // animation easings
  128. animEasingOut : 'linear',
  129. animEasingIn : 'linear',
  130. // the item(s) will be replaced every 3 seconds
  131. // note: for performance issues, the time "can't" be < 300 ms
  132. interval : 3000
  133. };
  134. $.GridRotator.prototype = {
  135. _init : function( options ) {
  136. var _self = this;
  137. // options
  138. this.options = $.extend( true, {}, $.GridRotator.defaults, options );
  139. // all types of animations
  140. this.animTypesAll = [ 'fadeInOut', 'slideLeft', 'slideRight', 'slideTop', 'slideBottom', 'rotateLeft', 'rotateRight', 'rotateTop', 'rotateBottom', 'scale', 'rotate3d', 'rotateLeftScale', 'rotateRightScale', 'rotateTopScale', 'rotateBottomScale' ];
  141. // types of animations for "older" browsers
  142. this.animTypesCond = [ 'fadeInOut', 'slideLeft', 'slideRight', 'slideTop', 'slideBottom' ];
  143. // array containing the animation types to choose from when the options.animType is set to 'random'
  144. this.animTypes = this.animTypesCond;
  145. if( Modernizr.csstransforms3d ) {
  146. this.animTypes = this.animTypesAll;
  147. }
  148. this.animType = this.options.animType;
  149. if( this.animType !== 'random' ) {
  150. if( !Modernizr.csstransforms3d && $.inArray( this.animType, this.animTypesCond ) === -1 && this.animType !== 'showHide' ) {
  151. // fallback to 'fadeInOut' if user sets a type which is not supported
  152. this.animType = 'fadeInOut';
  153. }
  154. }
  155. this.animTypesTotal = this.animTypes.length;
  156. // the <ul> where the items are placed
  157. this.$list = this.$el.children( 'ul' );
  158. // remove img's and add background-image to anchors
  159. // preload the images before
  160. var loaded = 0,
  161. $imgs = this.$list.find( 'img' ),
  162. count = $imgs.length;
  163. $imgs.each( function() {
  164. var $img = $( this ),
  165. src = $img.attr( 'src' );
  166. $( '<img/>' ).load( function() {
  167. ++loaded;
  168. $img.parent().css( 'background-image', 'url(' + src + ')' );
  169. if( loaded === count ) {
  170. $imgs.remove();
  171. _self.$el.removeClass( 'ri-grid-loading' );
  172. // the items
  173. _self.$items = _self.$list.children( 'li' );
  174. // make a copy of the items
  175. _self.$itemsCache = _self.$items.clone();
  176. // total number of items
  177. _self.itemsTotal = _self.$items.length;
  178. // the items that will be out of the grid
  179. // actually the item's child (anchor element)
  180. _self.outItems = [];
  181. _self._layout();
  182. _self._initEvents();
  183. // replace "options.step" items after "options.interval" time
  184. // the items that go out are randomly chosen, while the ones that get in
  185. // respect the order (first in first out)
  186. _self._start();
  187. }
  188. } ).attr( 'src', src )
  189. } );
  190. },
  191. _layout : function( callback ) {
  192. var _self = this;
  193. // sets the grid dimentions based on the container's width
  194. this._setGridDim();
  195. // reset
  196. this.$list.empty();
  197. this.$items = this.$itemsCache.clone().appendTo( this.$list );
  198. var $outItems = this.$items.filter( ':gt(' + ( this.showTotal - 1 ) + ')' ),
  199. $outAItems = $outItems.children( 'a' );
  200. this.outItems.length = 0;
  201. $outAItems.each( function( i ) {
  202. _self.outItems.push( $( this ) );
  203. } );
  204. $outItems.remove();
  205. // container's width
  206. var containerWidth = ( document.defaultView ) ? parseInt( document.defaultView.getComputedStyle( this.$el.get( 0 ), null ).width ) : this.$el.width(),
  207. // item's width
  208. itemWidth = Math.floor( containerWidth / this.columns ),
  209. // calculate gap
  210. gapWidth = containerWidth - ( this.columns * Math.floor( itemWidth ) );
  211. for( var i = 0; i < this.rows; ++i ) {
  212. for( var j = 0; j < this.columns; ++j ) {
  213. var $item = this.$items.eq( this.columns * i + j ),
  214. h = itemWidth,
  215. w = ( j < Math.floor( gapWidth ) ) ? itemWidth + 1 : itemWidth;
  216. $item.css( {
  217. width : w,
  218. height : h
  219. } );
  220. /*
  221. if( gapWidth % 1 !== 0 && j === this.columns - 1 ) {
  222. $item.children( 'a' ).css( {
  223. width : '+=1'//,
  224. height : '+=1'
  225. } );
  226. }
  227. */
  228. }
  229. }
  230. if( this.options.preventClick ) {
  231. this.$items.children().css( 'cursor', 'default' ).on( 'click.gridrotator', false );
  232. }
  233. if( callback ) {
  234. callback.call();
  235. }
  236. },
  237. // set the grid rows and columns
  238. _setGridDim : function() {
  239. // container's width
  240. var c_w = this.$el.width();
  241. // we will choose the number of rows/columns according to the container's width and the values set on the plugin options
  242. switch( true ) {
  243. case ( c_w < 240 ) : this.rows = this.options.w240.rows; this.columns = this.options.w240.columns; break;
  244. case ( c_w < 320 ) : this.rows = this.options.w320.rows; this.columns = this.options.w320.columns; break;
  245. case ( c_w < 480 ) : this.rows = this.options.w480.rows; this.columns = this.options.w480.columns; break;
  246. case ( c_w < 768 ) : this.rows = this.options.w768.rows; this.columns = this.options.w768.columns; break;
  247. case ( c_w < 1024 ) : this.rows = this.options.w1024.rows; this.columns = this.options.w1024.columns; break;
  248. default : this.rows = this.options.rows; this.columns = this.options.columns; break;
  249. }
  250. this.showTotal = this.rows * this.columns;
  251. },
  252. // init window resize event
  253. _initEvents : function() {
  254. var _self = this;
  255. $window.on( 'debouncedresize.gridrotator', function( event ) {
  256. clearTimeout( _self.playtimeout );
  257. _self._layout( function() {
  258. _self._start();
  259. } );
  260. } );
  261. },
  262. // start rotating elements
  263. _start : function() {
  264. if( this.showTotal < this.itemsTotal ) {
  265. this._showNext();
  266. }
  267. },
  268. // get which type of animation
  269. _getAnimType : function() {
  270. if( this.animType === 'random' ) {
  271. return this.animTypes[ Math.floor( Math.random() * this.animTypesTotal ) ];
  272. }
  273. else {
  274. return this.animType;
  275. }
  276. },
  277. // get css properties for the transition effect
  278. _getAnimProperties : function( $in, $out ) {
  279. var startInProp = {},
  280. startOutProp = {},
  281. endInProp = {},
  282. endOutProp = {},
  283. animType = this._getAnimType(),
  284. speed;
  285. switch( animType ) {
  286. case 'showHide' :
  287. speed = 0;
  288. endOutProp.opacity = 0;
  289. break;
  290. case 'fadeInOut' :
  291. endOutProp.opacity = 0;
  292. break;
  293. case 'slideLeft' :
  294. startInProp.left = $out.width();
  295. endInProp.left = 0;
  296. endOutProp.left = -$out.width();
  297. break;
  298. case 'slideRight' :
  299. startInProp.left = -$out.width();
  300. endInProp.left = 0;
  301. endOutProp.left = $out.width();
  302. break;
  303. case 'slideTop' :
  304. startInProp.top = $out.height();
  305. endInProp.top = 0;
  306. endOutProp.top = -$out.height();
  307. break;
  308. case 'slideBottom' :
  309. startInProp.top = -$out.height();
  310. endInProp.top = 0;
  311. endOutProp.top = $out.height();
  312. break;
  313. case 'rotateLeft' :
  314. speed = this.options.animSpeed / 2;
  315. startInProp.rotateY = '90deg';
  316. endInProp.rotateY = '0deg';
  317. endInProp.delay = speed;
  318. endOutProp.rotateY = '-90deg';
  319. break;
  320. case 'rotateRight' :
  321. speed = this.options.animSpeed / 2;
  322. startInProp.rotateY = '-90deg';
  323. endInProp.rotateY = '0deg';
  324. endInProp.delay = speed;
  325. endOutProp.rotateY = '90deg';
  326. break;
  327. case 'rotateTop' :
  328. speed = this.options.animSpeed / 2;
  329. startInProp.rotateX = '90deg';
  330. endInProp.rotateX = '0deg';
  331. endInProp.delay = speed;
  332. endOutProp.rotateX = '-90deg';
  333. break;
  334. case 'rotateBottom' :
  335. speed = this.options.animSpeed / 2;
  336. startInProp.rotateX = '-90deg';
  337. endInProp.rotateX = '0deg';
  338. endInProp.delay = speed;
  339. endOutProp.rotateX = '90deg';
  340. break;
  341. case 'scale' :
  342. speed = this.options.animSpeed / 2;
  343. startInProp.scale = '0';
  344. startOutProp.scale = '1';
  345. endInProp.scale = '1';
  346. endInProp.delay = speed;
  347. endOutProp.scale = '0';
  348. break;
  349. case 'rotateLeftScale' :
  350. startInProp.scale = '0.3';
  351. startOutProp.scale = '1';
  352. endInProp.scale = '1';
  353. endOutProp.scale = '0.3';
  354. speed = this.options.animSpeed / 2;
  355. startInProp.rotateY = '90deg';
  356. endInProp.rotateY = '0deg';
  357. endInProp.delay = speed;
  358. endOutProp.rotateY = '-90deg';
  359. break;
  360. case 'rotateRightScale' :
  361. startInProp.scale = '0.3';
  362. startOutProp.scale = '1';
  363. endInProp.scale = '1';
  364. endOutProp.scale = '0.3';
  365. speed = this.options.animSpeed / 2;
  366. startInProp.rotateY = '-90deg';
  367. endInProp.rotateY = '0deg';
  368. endInProp.delay = speed;
  369. endOutProp.rotateY = '90deg';
  370. break;
  371. case 'rotateTopScale' :
  372. startInProp.scale = '0.3';
  373. startOutProp.scale = '1';
  374. endInProp.scale = '1';
  375. endOutProp.scale = '0.3';
  376. speed = this.options.animSpeed / 2;
  377. startInProp.rotateX = '90deg';
  378. endInProp.rotateX = '0deg';
  379. endInProp.delay = speed;
  380. endOutProp.rotateX = '-90deg';
  381. break;
  382. case 'rotateBottomScale' :
  383. startInProp.scale = '0.3';
  384. startOutProp.scale = '1';
  385. endInProp.scale = '1';
  386. endOutProp.scale = '0.3';
  387. speed = this.options.animSpeed / 2;
  388. startInProp.rotateX = '-90deg';
  389. endInProp.rotateX = '0deg';
  390. endInProp.delay = speed;
  391. endOutProp.rotateX = '90deg';
  392. break;
  393. case 'rotate3d' :
  394. speed = this.options.animSpeed / 2;
  395. startInProp.rotate3d = '1, 1, 0, 90deg';
  396. endInProp.rotate3d = '1, 1, 0, 0deg';
  397. endInProp.delay = speed;
  398. endOutProp.rotate3d = '1, 1, 0, -90deg';
  399. break;
  400. }
  401. var animSpeed = ( speed != undefined ) ? speed : this.options.animSpeed;
  402. return {
  403. startInProp : startInProp,
  404. startOutProp : startOutProp,
  405. endInProp : endInProp,
  406. endOutProp : endOutProp,
  407. animSpeed : animSpeed
  408. };
  409. },
  410. // show next "option.step" elements
  411. _showNext : function( t ) {
  412. var _self = this;
  413. clearTimeout( this.playtimeout );
  414. this.playtimeout = setTimeout( function() {
  415. var step = _self.options.step,
  416. max = _self.options.maxStep,
  417. min = 1;
  418. if( max > _self.showTotal ) {
  419. max = _self.showTotal;
  420. }
  421. var $items = _self.$items,
  422. outs = [],
  423. // number of items to swith at this point of time
  424. nmbOut = ( step === 'random' ) ? Math.floor( Math.random() * max + min ) : Math.min( Math.abs( step ) , max ) ,
  425. // array with random indexes. These will be the indexes of the items we will replace
  426. randArr = _self._getRandom( nmbOut, _self.showTotal );
  427. for( var i = 0; i < nmbOut; ++i ) {
  428. // element to go out
  429. var $out = $items.eq( randArr[ i ] );
  430. // if element is active, which means it is currently animating,
  431. // then we need to get different positions..
  432. if( $out.data( 'active' ) ) {
  433. // one of the items is active, call again..
  434. _self._showNext( 1 );
  435. return false;
  436. }
  437. // add it to outs array
  438. outs.push( $out );
  439. }
  440. for( var i = 0; i < nmbOut; ++i ) {
  441. var $out = outs[ i ],
  442. $outA = $out.children( 'a:last' ),
  443. newElProp = {
  444. width : $outA.width(),
  445. height : $outA.height()
  446. };
  447. // element stays active
  448. $out.data( 'active', true );
  449. // get the element (anchor) that will go in (first one inserted in _self.outItems)
  450. var $inA = _self.outItems.shift();
  451. // save element that went out
  452. _self.outItems.push( $outA.clone() );
  453. // prepend in element
  454. $inA.css( newElProp ).prependTo( $out );
  455. var animProp = _self._getAnimProperties( $inA, $outA );
  456. if( Modernizr.csstransitions ) {
  457. $inA.css( animProp.startInProp ).transition( animProp.endInProp, animProp.animSpeed, _self.options.animEasingIn );
  458. $outA.css( animProp.startOutProp ).transition( animProp.endOutProp, animProp.animSpeed, _self.options.animEasingOut, function() {
  459. $( this ).parent().data( 'active', false ).end().remove();
  460. } );
  461. }
  462. // fallback to jQuery animate
  463. else {
  464. $inA.css( animProp.startInProp ).stop().animate( animProp.endInProp, animProp.animSpeed );
  465. $outA.css( animProp.startOutProp ).stop().animate( animProp.endOutProp, animProp.animSpeed, function() {
  466. $( this ).parent().data( 'active', false ).end().remove();
  467. } )
  468. }
  469. }
  470. // again and again..
  471. _self._showNext();
  472. }, t || Math.max( Math.abs( this.options.interval ) , 300 ) );
  473. },
  474. _getRandom : function( cnt, limit ) {
  475. var randArray = [];
  476. for( var i = 0; i < limit; ++i ) {
  477. randArray.push( i )
  478. }
  479. return randArray.shuffle().slice(0,cnt);
  480. }
  481. };
  482. var logError = function( message ) {
  483. if ( window.console ) {
  484. window.console.error( message );
  485. }
  486. };
  487. $.fn.gridrotator = function( options ) {
  488. if ( typeof options === 'string' ) {
  489. var args = Array.prototype.slice.call( arguments, 1 );
  490. this.each(function() {
  491. var instance = $.data( this, 'gridrotator' );
  492. if ( !instance ) {
  493. logError( "cannot call methods on gridrotator prior to initialization; " +
  494. "attempted to call method '" + options + "'" );
  495. return;
  496. }
  497. if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
  498. logError( "no such method '" + options + "' for gridrotator instance" );
  499. return;
  500. }
  501. instance[ options ].apply( instance, args );
  502. });
  503. }
  504. else {
  505. this.each(function() {
  506. var instance = $.data( this, 'gridrotator' );
  507. if ( instance ) {
  508. instance._init();
  509. }
  510. else {
  511. $.data( this, 'gridrotator', new $.GridRotator( options, this ) );
  512. }
  513. });
  514. }
  515. return this;
  516. };
  517. } )( jQuery, window );
  518. (function($){
  519. var settings = {
  520. speed: 350 //animation duration
  521. , easing: "linear" //use easing plugin for more options
  522. , padding: 10
  523. , constrain: false
  524. }
  525. , $window = $(window)
  526. , stickyboxes = []
  527. , methods = {
  528. init:function(opts){
  529. settings = $.extend(settings,opts);
  530. return this.each(function () {
  531. var $this = $(this);
  532. setPosition($this);
  533. stickyboxes[stickyboxes.length] = $this;
  534. moveIntoView();
  535. });
  536. }
  537. , remove:function(){
  538. return this.each(function () {
  539. var sticky = this;
  540. $.each(stickyboxes, function (i, $sb) {
  541. if($sb.get(0) === sticky){
  542. reset(null, $sb);
  543. stickyboxes.splice(i, 1);
  544. return false;
  545. }
  546. });
  547. });
  548. }
  549. , destroy: function () {
  550. $.each(stickyboxes, function (i, $sb) {
  551. reset(null, $sb);
  552. });
  553. stickyboxes=[];
  554. $window.unbind("scroll", moveIntoView);
  555. $window.unbind("resize", reset);
  556. return this;
  557. }
  558. };
  559. var moveIntoView = function () {
  560. $.each(stickyboxes, function (i, $sb) {
  561. var $this = $sb
  562. , data = $this.data("stickySB");
  563. if (data) {
  564. var sTop = $window.scrollTop() - data.offs.top
  565. , currOffs = $this.offset()
  566. , origTop = data.orig.offset.top - data.offs.top
  567. , animTo = origTop;
  568. //scrolled down out of view
  569. if (origTop < sTop) {
  570. //make sure to stop inside parent
  571. if ((sTop + settings.padding) > data.offs.bottom)
  572. animTo = data.offs.bottom;
  573. else animTo = sTop + settings.padding;
  574. }
  575. $this
  576. .stop()
  577. .animate(
  578. {top: animTo}
  579. , settings.speed
  580. , settings.easing
  581. );
  582. }
  583. });
  584. }
  585. var setPosition = function ($sb) {
  586. if ($sb) {
  587. var $this = $sb
  588. , $parent = $this.parent()
  589. , parentOffs = $parent.offset()
  590. , currOff = $this.offset()
  591. , data = $this.data("stickySB");
  592. if (!data) {
  593. data = {
  594. offs: {} // our parents offset
  595. , orig: { // cache for original css
  596. top: $this.css("top")
  597. , left: $this.css("left")
  598. , position: $this.css("position")
  599. , marginTop: $this.css("marginTop")
  600. , marginLeft: $this.css("marginLeft")
  601. , offset: $this.offset()
  602. }
  603. }
  604. }
  605. //go up the tree until we find an elem to position from
  606. while (parentOffs && "top" in parentOffs
  607. && $parent.css("position") == "static") {
  608. $parent = $parent.parent();
  609. parentOffs = $parent.offset();
  610. }
  611. if (parentOffs) { // found a postioned ancestor
  612. var padBtm = parseInt($parent.css("paddingBottom"));
  613. padBtm = isNaN(padBtm) ? 0 : padBtm;
  614. data.offs = parentOffs;
  615. data.offs.bottom = settings.constrain ?
  616. Math.abs(($parent.innerHeight() - padBtm) - $this.outerHeight()) :
  617. $(document).height();
  618. }
  619. else data.offs = { // went to far set to doc
  620. top: 0
  621. , left: 0
  622. , bottom: $(document).height()
  623. };
  624. $this.css({
  625. position: "absolute"
  626. , top: Math.floor(currOff.top - data.offs.top) + "px"
  627. , left: Math.floor(currOff.left - data.offs.left) + "px"
  628. , margin: 0
  629. , width: $this.width()
  630. }).data("stickySB", data);
  631. }
  632. }
  633. var reset = function (ev, $toReset) {
  634. var stickies = stickyboxes;
  635. if ($toReset) { // just resetting selected items
  636. stickies = [$toReset];
  637. }
  638. $.each(stickies, function(i, $sb) {
  639. var data = $sb.data("stickySB");
  640. if (data) {
  641. $sb.css({
  642. position: data.orig.position
  643. , marginTop: data.orig.marginTop
  644. , marginLeft: data.orig.marginLeft
  645. , left: data.orig.left
  646. , top: data.orig.top
  647. });
  648. if (!$toReset) { // just resetting
  649. setPosition($sb);
  650. moveIntoView();
  651. }
  652. }
  653. });
  654. }
  655. $window.bind("scroll", moveIntoView);
  656. $window.bind("resize", reset);
  657. $.fn.stickySidebar = function (method) {
  658. if (methods[method]) {
  659. return methods[method].apply(
  660. this
  661. , Array.prototype.slice.call(arguments, 1)
  662. );
  663. } else if (!method || typeof method == "object") {
  664. return methods.init.apply(this, arguments);
  665. }
  666. }
  667. })(jQuery);
  668. /* =============================================================
  669. * bootstrap-scrollspy.js v2.0.2
  670. * http://twitter.github.com/bootstrap/javascript.html#scrollspy
  671. * =============================================================
  672. * Copyright 2012 Twitter, Inc.
  673. *
  674. * Licensed under the Apache License, Version 2.0 (the "License");
  675. * you may not use this file except in compliance with the License.
  676. * You may obtain a copy of the License at
  677. *
  678. * http://www.apache.org/licenses/LICENSE-2.0
  679. *
  680. * Unless required by applicable law or agreed to in writing, software
  681. * distributed under the License is distributed on an "AS IS" BASIS,
  682. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  683. * See the License for the specific language governing permissions and
  684. * limitations under the License.
  685. * ============================================================== */
  686. !function ( $ ) {
  687. "use strict"
  688. /* SCROLLSPY CLASS DEFINITION
  689. * ========================== */
  690. function ScrollSpy( element, options) {
  691. var process = $.proxy(this.process, this)
  692. , $element = $(element).is('body') ? $(window) : $(element)
  693. , href
  694. this.options = $.extend({}, $.fn.scrollspy.defaults, options)
  695. this.$scrollElement = $element.on('scroll.scroll.data-api', process)
  696. this.selector = (this.options.target
  697. || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
  698. || '') + ' .nav li > a'
  699. this.$body = $('body').on('click.scroll.data-api', this.selector, process)
  700. this.refresh()
  701. this.process()
  702. }
  703. ScrollSpy.prototype = {
  704. constructor: ScrollSpy
  705. , refresh: function () {
  706. this.targets = this.$body
  707. .find(this.selector)
  708. .map(function () {
  709. var href = $(this).attr('href')
  710. return /^#\w/.test(href) && $(href).length ? href : null
  711. })
  712. this.offsets = $.map(this.targets, function (id) {
  713. return $(id).position().top
  714. })
  715. }
  716. , process: function () {
  717. var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
  718. , offsets = this.offsets
  719. , targets = this.targets
  720. , activeTarget = this.activeTarget
  721. , i
  722. for (i = offsets.length; i--;) {
  723. activeTarget != targets[i]
  724. && scrollTop >= offsets[i]
  725. && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
  726. && this.activate( targets[i] )
  727. }
  728. }
  729. , activate: function (target) {
  730. var active
  731. this.activeTarget = target
  732. this.$body
  733. .find(this.selector).parent('.active')
  734. .removeClass('active')
  735. active = this.$body
  736. .find(this.selector + '[href="' + target + '"]')
  737. .parent('li')
  738. .addClass('active')
  739. if ( active.parent('.dropdown-menu') ) {
  740. active.closest('li.dropdown').addClass('active')
  741. }
  742. }
  743. }
  744. /* SCROLLSPY PLUGIN DEFINITION
  745. * =========================== */
  746. $.fn.scrollspy = function ( option ) {
  747. return this.each(function () {
  748. var $this = $(this)
  749. , data = $this.data('scrollspy')
  750. , options = typeof option == 'object' && option
  751. if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
  752. if (typeof option == 'string') data[option]()
  753. })
  754. }
  755. $.fn.scrollspy.Constructor = ScrollSpy
  756. $.fn.scrollspy.defaults = {
  757. offset: 10
  758. }
  759. /* SCROLLSPY DATA-API
  760. * ================== */
  761. $(function () {
  762. $('[data-spy="scroll"]').each(function () {
  763. var $spy = $(this)
  764. $spy.scrollspy($spy.data())
  765. })
  766. })
  767. }( window.jQuery );
  768. /* Modernizr 2.6.1 (Custom Build) | MIT & BSD
  769. * Build: http://modernizr.com/download/#-backgroundsize-csstransforms-csstransforms3d-csstransitions-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
  770. */
  771. ;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.backgroundsize=function(){return F("backgroundSize")},q.csstransforms=function(){return!!F("transform")},q.csstransforms3d=function(){var a=!!F("perspective");return a&&"webkitPerspective"in g.style&&w("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},q.csstransitions=function(){return F("transition")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
  772. /*
  773. This license text has to stay intact at all times:
  774. fleXcroll Public License Version
  775. Cross Browser Custom Scroll Bar Script by Hesido.
  776. Public version - Free for non-commercial uses.
  777. This script cannot be used in any commercially built
  778. web sites, or in sites that relates to commercial
  779. activities. This script is not for re-distribution.
  780. For licensing options:
  781. Contact Emrah BASKAYA @ www.hesido.com
  782. Derivative works are only allowed for personal uses,
  783. and they cannot be redistributed.
  784. FleXcroll Public Key Code: 20050907122003339
  785. MD5 hash for this license: 9ada3be4d7496200ab2665160807745d
  786. End of license text---
  787. */
  788. //fleXcroll v2.0.0
  789. eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('B F={2W:[],4F:8(){5(Y.1t){Y.5U(\'<11 57="5C/6p">.1R-5G-4T {3B: 2m !6a;}</11>\')};M.V(16,\'5m\',M.5E)},3O:8(g){B h=Y,J=16,23=6F;5(!h.1t||!h.4M)C;5(33(g)==\'3I\')g=Y.1t(g);5(g==Z||23.3b.2B(\'62\')!=-1||((23.3b.2B(\'6U\')!=-1||23.3b.2B(\'7d\')!=-1)&&!(33(5e)!="6x"&&5e.74))||23.7k==\'6h\'||(23.79.2B(\'7o\')!=-1&&23.3b.2B(\'70\')!=-1)){5(g!=Z)2b(g,\'1R-7g\',\'1R-5G-4T\');5(16.50)16.50(g);C};5(g.14){g.14.1G();C};5(F.5u(g))C;5(!g.1M||g.1M==\'\'){B k="6M",c=1;1B(Y.1t(k+c)!=Z){c++};g.1M=k+c}g.4I=2q 5q();g.14=2q 5q();B l=g.1M,4=g.4I,I=g.14;4.27={5Y:[\'-1s\',0],6Y:[0,\'-1s\'],6t:[\'1s\',0],7s:[0,\'1s\'],7f:[0,\'-1p\'],6e:[0,\'1p\'],7u:[0,\'-4W\'],77:[0,\'+4W\']};4.3R=["-2s","2s"];4.41=["-2s","2s"];4.1V=[[A,A],[A,A]];B m=T(\'6I\',E),H=T(\'7m\',E),G=T(\'66\',E),1l=T(\'72\',E);B o=T(\'7q\',E),1x=T(\'6B\',E),37=A;1l.D.1K=\'4P 5i 7i\';1l.2e();g.11.3B=\'2m\';1x.D.6l="7b";1x.D.1Z="53";1x.D.13="53";1x.D.1O="3h";1x.D.21="-6Q";1x.2e();B p=g.15,5y=g.1q;2u(g,1l,\'1g\',[\'1K-1b-13\',\'1K-25-13\',\'1K-1e-13\',\'1K-2g-13\']);B q=g.15,5k=g.1q,3D=5y-5k,43=p-q;B s=(g.2c)?g.2c:0,59=(g.2i)?g.2i:0;B t=Y.2Y.1f,3Q=/#([^#.]*)$/;B u=[\'5W\',\'6r\',\'6S\'];4.O=[];4.29=[];4.6c=4.U=[];4.6H=4.1I=[];4.1Q=[A,A];4.2D=A;4.2G=A;4.17=[];4.1T=[0,0];4.1v=[];4.3K=[];4.19=[];4.2o=[A,A];4.2x=[0,0];1B(g.4N){m.1a(g.4N)};m.1a(o);g.1a(H);g.1a(1l);B w=P(g,\'1O\');5(w!=\'3h\'&&w!=\'5g\'){g.11.1O=w="35"};5(w==\'5g\')g.11.1O="3h";B x=P(g,\'5C-64\');g.11.5s=\'1b\';H.D.13="52";H.D.1Z="52";H.D.1e="1g";H.D.1b="1g";2u(g,1l,"1g",[\'N-1b\',\'N-1e\',\'N-25\',\'N-2g\']);B y=g.1q,5w=g.15,48;48=H.15;H.D.6j="6O 5i 6z";5(H.15>48)37=E;H.D.6W="1g";2u(1l,g,A,[\'N-1b\',\'N-1e\',\'N-25\',\'N-2g\']);1N(H);1N(g);4.19[0]=H.1D-g.1D;4.19[2]=H.1F-g.1F;g.11.5o=P(g,"N-2g");g.11.5A=P(g,"N-25");1N(H);1N(g);4.19[1]=H.1D-g.1D;4.19[3]=H.1F-g.1F;g.11.5o=P(1l,"N-1e");g.11.5A=P(1l,"N-1b");B z=4.19[2]+4.19[3],3G=4.19[0]+4.19[1];g.11.1O=w;H.11.5s=x;2u(g,H,A,[\'N-1b\',\'N-25\',\'N-1e\',\'N-2g\']);G.D.13=g.1q+\'K\';G.D.1Z=g.15+\'K\';H.D.13=y+\'K\';H.D.1Z=5w+\'K\';G.D.1O=\'3h\';G.D.1e=\'1g\';G.D.1b=\'1g\';4.31=G.D.21;H.1a(m);g.1a(G);G.1a(1x);m.D.1O=\'35\';H.D.1O=\'35\';m.D.1e="0";m.D.13="46%";H.D.3B=\'2m\';H.D.1b="-"+4.19[2]+"K";H.D.1e="-"+4.19[0]+"K";4.4h=1x.15;4.3l=8(){B a=m.60,3p=6v=0;1n(B i=0;i<a.2y;i++){5(a[i].1q){3p=R.1X(a[i].1q,3p)}};4.U[0]=((4.17[1]&&!4.1v[1])||4.29[1])?g.1q-4.1T[0]:g.1q;4.1I[0]=3p+z;C 4.1I[0]};4.3f=8(){4.U[1]=((4.17[0]&&!4.1v[0])||4.29[0])?g.15-4.1T[1]:g.15;4.1I[1]=m.15+3G-2;C 4.1I[1]};4.4K=8(){m.D.2K=\'3T\';m.D.2K=\'6g\'};4.4d=8(){H.D.13=(37)?(4.U[0]-z-3D)+\'K\':4.U[0]+\'K\'};4.4l=8(){H.D.1Z=(37)?(4.U[1]-3G-43)+\'K\':4.U[1]+\'K\'};4.2O=8(){4.3l();4.3f();G.2U=2q 4j();B a=G.2U;2O(a,\'6K\',1);a.2S=[1j(P(a.7,\'N-1e\')),1j(P(a.7,\'N-2g\'))];a.7.D.N=\'1g\';a.7.Q=0;a.7.39=E;a.7.2w=1;m.4R=a.7;3M(a,0);4.1T[0]=(4.2o[1])?0:a.1k.1q;4.4d();G.3n=2q 4j();B b=G.3n;2O(b,\'68\',0);b.2S=[1j(P(b.7,\'N-1b\')),1j(P(b.7,\'N-25\'))];b.7.D.N=\'1g\';b.7.Q=0;b.7.39=A;b.7.2w=0;m.6D=b.7;5(J.55)b.7.D.1O=\'35\';3M(b,0);4.1T[1]=(4.2o[0])?0:b.1k.15;4.4l();G.D.1Z=g.15+\'K\';b.2I=T(\'6n\');G.1a(b.2I);b.2I.4a=8(){b.7.3j=E;4.1L=b.7;b.7.3t=E;b.7.2z=A;G.2U.7.2z=A;F.V(h,\'3Y\',1P);F.V(h,\'2M\',3r);F.V(h,\'3v\',2Q);C A}};4.1L=Z;4.2O();M.4f(o,G);5(!M.1z(g,\'4Y\',2A)||!M.1z(g,\'5c\',2A)){g.5V=2A};M.1z(g,\'4Y\',2A);M.1z(g,\'5c\',2A);M.1z(m,\'4G\',3C);M.1z(G,\'4G\',3C);g.6b(\'6G\',\'0\');M.V(g,\'6q\',8(e){5(g.2X)C;5(!e){B e=J.1m};B a=e.58;4.5D=a;I.24();5(4.27[\'1S\'+a]&&!16.55){I.1h(4.27[\'1S\'+a][0],4.27[\'1S\'+a][1],E);5(e.1u)e.1u();C A}});M.V(g,\'63\',8(e){5(g.2X)C;5(!e){B e=J.1m};B a=e.58;5(4.27[\'1S\'+a]){I.1h(4.27[\'1S\'+a][0],4.27[\'1S\'+a][1],E);5(e.1u)e.1u();C A}});M.V(g,\'6y\',8(){4.5D=A});M.V(h,\'3v\',2C);M.V(g,\'4U\',3P);8 3P(e){5(!e)e=J.1m;B a=(e.18)?e.18:(e.1C)?e.1C:A;5(!a||(a.1r&&a.1r.X(3c("\\\\6i\\\\b"))))C;4.5n=e.2f;4.5J=e.2l;34();1N(g);2C();F.V(h,\'2M\',3J);4.2J=[g.1F+10,g.1F+4.U[0]-10,g.1D+10,g.1D+4.U[1]-10]};8 3J(e){5(!e)e=J.1m;B a=e.2f,4i=e.2l,4x=a+4.4B,42=4i+4.4z;4.4D=(4x<4.2J[0]||4x>4.2J[1])?1:0;4.4E=(42<4.2J[2]||42>4.2J[3])?1:0;4.4s=a-4.5n;4.4C=4i-4.5J;4.3q=(4.4s>40)?1:(4.4s<-40)?-1:0;4.3i=(4.4C>40)?1:(4.4C<-40)?-1:0;5((4.3q!=0||4.3i!=0)&&!4.2j)4.2j=J.2R(8(){5(4.3q==0&&4.3i==0){J.2n(4.2j);4.2j=A;C};34();5(4.4D==1||4.4E==1)I.1h((4.3q*4.4D)+"s",(4.3i*4.4E)+"s",E)},45)};8 2C(){F.1H(h,\'2M\',3J);5(4.2j)J.2n(4.2j);4.2j=A;5(4.3V)J.51(4.3V);5(4.4b)J.2n(4.4b)};8 3x(a){5(4.2G){16.2n(4.2G);4.2G=A}5(!a)G.D.21=4.31};8 34(){4.4B=(J.5v)?J.5v:(h.2t&&h.2t.2i)?h.2t.2i:0;4.4z=(J.5f)?J.5f:(h.2t&&h.2t.2c)?h.2t.2c:0};I.4o=8(){1n(B j=0,3F;3F=u[j];j++){B a=g.30(3F);1n(B i=0,2r;2r=a[i];i++){5(!2r.4J){F.V(2r,\'5Z\',8(){g.2X=E});F.V(2r,\'6J\',6R=8(){g.2X=A});2r.4J=E}}}};g.6u=I.1G=8(a){5(G.W[1]()===0||G.W[0]()===0)C;m.D.N=\'4P\';B b=4.17[0],5b=4.17[1],47=G.2U,2F=G.3n,3e,3u,2T=[];G.D.13=g.1q-3D+\'K\';G.D.1Z=g.15-43+\'K\';2T[0]=4.U[0];2T[1]=4.U[1];4.17[0]=4.3l()>4.U[0];4.17[1]=4.3f()>4.U[1];B c=(b!=4.17[0]||5b!=4.17[1]||2T[0]!=4.U[0]||2T[1]!=4.U[1])?E:A;47.1k.3S(4.17[1]);2F.1k.3S(4.17[0]);3e=(4.17[1]||4.29[1]);3u=(4.17[0]||4.29[0]);4.3l();4.3f();4.4l();4.4d();5(!4.17[0]||!4.17[1]||4.1v[0]||4.1v[1])2F.2I.2e();1i 2F.2I.38();5(3e)3y(47,(3u&&!4.1v[0])?4.1T[1]:0);1i m.D.1e="0";5(3u)3y(2F,(3e&&!4.1v[1])?4.1T[0]:0);1i m.D.1b="0";5(c&&!a)I.1G(E);m.D.N=\'1g\';4.1Q[0]=4.1Q[1]=A};g.6f=I.1h=8(a,b,c,d){B e;5((a||a===0)&&4.O[0]){a=4u(a,0);e=G.3n.7;e.1c=(c)?R.28(R.1X(e.1J,e.1c-a),0):-a;e.3m()}5((b||b===0)&&4.O[1]){b=4u(b,1);e=G.2U.7;e.1c=(c)?R.28(R.1X(e.1J,e.1c-b),0):-b;e.3m()}5(!c)4.1Q[0]=4.1Q[1]=A;5(g.3z&&!d)g.3z();C 4.1V};I.4m=8(a,b){C I.1h(a,b,E)};I.3A=8(a){5(a==Z||!4X(a))C;B b=4Q(a);I.1h(b[0]+4.19[2],b[1]+4.19[0],A);I.1h(0,0,E)};2u(1l,g,\'1g\',[\'1K-1b-13\',\'1K-25-13\',\'1K-1e-13\',\'1K-2g-13\']);M.4f(1l,G);g.2c=0;g.2i=0;I.4o();M.2W[M.2W.2y]=g;2b(g,\'67\',A);I.1G();I.1h(59,s,E);5(t.X(3Q)){I.3A(h.1t(t.X(3Q)[1]))};4.7c=J.2R(8(){B n=1x.15;5(n!=4.4h){I.1G();4.4h=n}},6V);8 4u(v,i){B a=v.7j();v=6C(a);C 1j((a.X(/p$/))?v*4.U[i]*0.9:(a.X(/s$/))?v*4.U[i]*0.1:v)};8 P(a,b){C F.P(a,b)};8 2u(a,b,c,d){B e=2q 4j();1n(B i=0;i<d.2y;i++){e[i]=F.4e(d[i]);b.11[e[i]]=P(a,d[i],e[i]);5(c)a.11[e[i]]=c}};8 T(b,c,d,e){B f=(d)?d:h.4M(\'4q\');5(!d){f.1M=l+\'1S\'+b;f.1r=(c)?b:b+\' 73\'};f.W=[8(){C f.1q},8(){C f.15}];f.2N=(e)?[1P,1P]:[8(a){f.D.13=a},8(a){f.D.1Z=a}];f.5j=[8(){C P(f,"1b")},8(){C P(f,"1e")}];f.1y=(e)?[1P,1P]:[8(a){f.D.1b=a},8(a){f.D.1e=a}];f.2e=8(){f.D.2V="2m"};f.38=8(a){f.D.2V=(a)?P(a,\'2V\'):"6m"};f.D=f.11;C f};8 2O(a,b,c){B d=Y.1t(l+\'-1R-\'+b);B e=(d!=Z)?E:A;5(e){a.1k=T(A,A,d,E);4.2o[c]=E;a.2v=T(b+\'54\');a.1W=T(b+\'5z\');a.7=T(A,A,F.3X(d,\'4q\',\'1R-6N\')[0]);a.20=T(b+\'5r\');a.1E=T(b+\'5H\')}1i{a.1k=T(b+\'6Z\');a.2v=T(b+\'54\');a.1W=T(b+\'5z\');a.7=T(b+\'78\');a.20=T(b+\'5r\');a.1E=T(b+\'5H\');G.1a(a.1k);a.1k.1a(a.7);a.1k.1a(a.2v);a.1k.1a(a.1W);a.7.1a(a.20);a.7.1a(a.1E)}};8 3M(b,c){B d=b.1k,7=b.7,i=7.2w;7.1c=0;7.2E=b.2S[0];7.2Z=d;7.H=H;7.4H=m;7.1w=0;3y(b,c,E);7.3E=8(a){5(!a)7.Q=1j((7.1c*7.26)/7.1J);7.Q=(R.28(R.1X(7.Q,0),7.26));7.1y[i](7.Q+7.2E+"K");5(!7.1w)7.1w=7.1c-1j((7.Q/7.3d)*7.1J);7.1w=(7.Q==0)?0:(7.Q==7.26)?0:(!7.1w)?0:7.1w;5(a){7.1c=1j((7.Q/7.3d)*7.1J);m.1y[i](7.1c+7.1w+"K");4.1V[i]=[-7.1c-7.1w,-7.1J]}};7.3m=8(){7.Q=1j((7.1c*7.3d)/7.1J);7.Q=(R.28(R.1X(7.Q,0),7.26));m.1y[i](7.1c+"K");4.1V[i]=[-7.1c,-7.1J];7.1w=A;7.3E(A)};4.2L=P(7,\'z-5a\');7.D.21=(4.2L=="5X"||4.2L=="0"||4.2L==\'6X\')?2:4.2L;H.D.21=P(7,\'z-5a\');7.4a=8(){7.3t=E;4.1L=7;7.3j=A;7.2z=A;F.V(h,\'3Y\',1P);F.V(h,\'2M\',3r);F.V(h,\'3v\',2Q);C A};7.6s=2C;d.4a=d.7A=8(e){5(!e){B e=J.1m};5(e.18&&(e.18==b.20||e.18==b.1E||e.18==b.7))C;5(e.1C&&(e.1C==b.20||e.1C==b.1E||e.1C==b.7))C;B a,2k=[];34();I.24();1N(7);a=(7.39)?e.2l+4.4z-7.1D:e.2f+4.4B-7.1F;2k[7.2w]=(a<0)?4.41[0]:4.41[1];2k[1-7.2w]=0;I.1h(2k[0],2k[1],E);5(e.57!="7p"){2C();4.3V=J.4V(8(){4.4b=J.2R(8(){I.1h(2k[0],2k[1],E)},5M)},6d)};C A};d.3S=8(r){5(r){d.38(g);4.1v[i]=(P(d,"2V")=="2m"||4.2o[i])?E:A;5(!4.1v[i])7.38(g);1i 5(!4.2o[i])7.2e();4.O[i]=E;2b(d,"","5F")}1i{d.2e();7.2e();4.29[i]=(P(d,"2V")!="2m")?E:A;4.O[i]=A;7.Q=0;m.1y[i](\'1g\');4.1V[i]=[A,A];2b(d,"5F","")};H.1y[1-i]((4.3K[i]&&(r||4.29[i])&&!4.1v[i])?4.1T[1-i]-4.19[i*2]+"K":"-"+4.19[i*2]+"K")};d.7e=1P};8 3y(a,b,c){B d=a.1k,7=a.7,2v=a.2v,20=a.20,1W=a.1W,1E=a.1E,i=7.2w;d.2N[i](G.W[i]()-b+\'K\');d.1y[1-i](G.W[1-i]()-d.W[1-i]()+\'K\');4.3K[i]=(1j(d.5j[1-i]())===0)?E:A;a.4k=a.2S[0]+a.2S[1];a.44=1j((d.W[i]()-a.4k)*0.75);7.5p=R.28(R.1X(R.28(1j(4.U[i]/4.1I[i]*d.W[i]()),a.44),45),a.44);7.2N[i](7.5p+\'K\');7.26=d.W[i]()-7.W[i]()-a.4k;7.Q=R.28(R.1X(0,7.Q),7.26);7.1y[i](7.Q+7.2E+\'K\');7.1J=H.W[i]()-4.1I[i];7.3d=7.26;2v.2N[i](d.W[i]()-1W.W[i]()+\'K\');20.2N[i](7.W[i]()-1E.W[i]()+\'K\');1E.1y[i](7.W[i]()-1E.W[i]()+\'K\');1W.1y[i](d.W[i]()-1W.W[i]()+\'K\');5(!c)7.3m();4.4K()};I.24=8(){H.2c=0;H.2i=0;g.2c=0;g.2i=0};M.V(J,\'5m\',8(){5(g.14)I.1G()});M.V(J,\'7E\',8(){5(g.4t)J.51(g.4t);g.4t=J.4V(8(){5(g.14)I.1G()},5M)});8 1P(){C A};8 3r(e){5(!e){B e=J.1m};B a=4.1L,L,4y,7w,65;5(a==Z)C;5(!F.4O&&!e.76)2Q();4y=(a.3j)?2:1;1n(B i=0;i<4y;i++){L=(i==1)?a.4H.4R:a;5(a.3t){5(!L.2z){I.24();1N(L);1N(L.2Z);L.5x=e.2l-L.1D;L.5S=e.2f-L.1F;L.5O=L.Q;L.2z=E};L.Q=(L.39)?e.2l-L.5x-L.2Z.1D-L.2E:e.2f-L.5S-L.2Z.1F-L.2E;5(a.3j)L.Q=L.Q+(L.Q-L.5O);L.3E(E);5(g.3z)g.3z()}1i L.2z=A}};8 2Q(){5(4.1L!=Z){4.1L.3t=A;4.1L.1c+=4.1L.1w}4.1L=Z;F.1H(h,\'3Y\',1P);F.1H(h,\'2M\',3r);F.1H(h,\'3v\',2Q)};8 3C(e){5(!e)e=J.1m;5(M==G)G.D.21=4.31;5(e.2d.2y!=1||(!4.O[0]&&!4.O[1]))C A;B a=\'\',6A=(e.18&&(e.18.1f||(e.18.7t==3&&e.18.1d.1f)))?E:A;4.2x=[e.2d[0].2f,e.2d[0].2l];3x();F.1z(g,\'5h\',3L);F.1z(g,\'5K\',4c);4.5Q=(e.18&&e.18.1M&&e.18.1M.X(/1S[6k]7y[7C]e?/))?E:A;C A};8 3L(e){5(!e)e=J.1m;5(e.2d.2y!=1)C A;F.1H(g,\'4U\',3P);B a=[e.2d[0].2f,e.2d[0].2l];4.2D=E;4.12=[4.2x[0]-a[0],4.2x[1]-a[1]];5(4.5Q){4.12[0]*=-(4.1I[0]/4.U[0]);4.12[1]*=-(4.1I[1]/4.U[1])};I.4m(4.12[0],4.12[1]);4.2x[0]=a[0];4.2x[1]=a[1];1n(B i=0;i<2;i++){5(4.12[i]!==0&&4.O[i]&&(4.12[1-i]==0||!4.O[1-i])){5((4.12[i]>0&&4.1V[i][1]==4.1V[i][0])||(4.12[i]<0&&4.1V[i][0]==0))4.2D=A};5(!4.O[i]&&4.12[1-i]!==0&&R.3W(4.12[i]/4.12[1-i])>1.1)4.2D=A};5(4.2D){e.1u();G.D.21=\'7l\'}1i{G.D.21=4.31}};8 4c(e){5(!e)e=J.1m;e.1u();5(e.2d.2y>0)C A;F.1H(g,\'5h\',3L);F.1H(g,\'5K\',4c);5((4.O[0]&&R.3W(4.12[0])>6)||(4.O[1]&&R.3W(4.12[1])>6)){B a=0;3x(E);4.2G=16.2R(8(){I.4m(4p(4.12[0],0,10,a,0.3),4p(4.12[1],0,10,a,0.3));a++;5(a>10)3x()},46)}};8 2A(e){5(!e)e=J.1m;5(!M.14)C;B a=M,36,4A,1U=A,1A=0,22;I.24();4w=(e.18)?e.18:(e.1C)?e.1C:M;5(4w.1M&&4w.1M.X(/6P/))1U=E;5(e.4L)1A=-e.4L;5(e.5R)1A=e.5R;1A=(1A<0)?-1:+1;22=(1A<0)?0:1;4.1Q[1-22]=A;5((4.1Q[22]&&!1U)||(!4.O[0]&&!4.O[1]))C;5(4.O[1]&&!1U)1Y=I.1h(A,4.3R[22],E);36=!4.O[1]||1U||(4.O[1]&&((1Y[1][0]==1Y[1][1]&&1A>0)||(1Y[1][0]==0&&1A<0)));5(4.O[0]&&(!4.O[1]||1U))1Y=I.1h(4.3R[22],A,E);4A=!4.O[0]||(4.O[0]&&4.O[1]&&36&&!1U)||(4.O[0]&&((1Y[0][0]==1Y[0][1]&&1A>0)||(1Y[0][0]==0&&1A<0)));5(36&&4A&&!1U)4.1Q[22]=E;1i 4.1Q[22]=A;5(e.1u)e.1u();C A};8 4X(a){1B(a.1d){a=a.1d;5(a==g)C E}C A};8 1N(a){B b=a,2a=2h=0;5(b.32){1B(b){2a+=b.5I;2h+=b.5d;b=b.32}}1i 5(b.x){2a+=b.x;2h+=b.y};a.1F=2a;a.1D=2h};8 4Q(a){B b=a;2a=2h=0;1B(!b.15&&b.1d&&b!=m&&P(b,\'2K\')=="61"){b=b.1d};5(b.32){1B(b!=m){2a+=b.5I;2h+=b.5d;b=b.32}};C[2a,2h]};8 2b(a,b,c){F.2b(a,b,c)};8 4p(a,b,c,d,e){c=R.1X(c,1);B f=b-a,3o=a+(R.71(((1/c)*d),e)*f);C(3o>0)?R.6w(3o):R.7r(3o)}},5E:8(){5(F.3w)16.2n(F.3w);F.3H();F.3U();5(16.4Z)16.4Z()},2b:8(a,b,c){5(!a.1r)a.1r=\'\';B d=a.1r;5(b&&!d.X(3c("(^|\\\\s)"+b+"($|\\\\s)")))d=d.4n(/(\\S$)/,\'$1 \')+b;5(c)d=d.4n(3c("((^|\\\\s)+"+c+")+($|\\\\s)","g"),\'$2\').4n(/\\s$/,\'\');a.1r=d},3H:8(){B d=/#([^#.]*)$/,2H=/(.*)#.*$/,5N=/(^|\\s)1R-7h-6L-7B($|\\s)/,7x,49,i,1o,5t=Y.30("a"),2p=Y.2Y.1f;5(2p.X(2H))2p=2p.X(2H)[1];1n(i=0;1o=5t[i];i++){49=(1o.1r)?1o.1r:\'\';5(1o.1f&&!1o.3g&&1o.1f.X(d)&&((1o.1f.X(2H)&&2p===1o.1f.X(2H)[1])||49.X(5N))){1o.3g=E;F.V(1o,\'69\',8(e){5(!e)e=16.1m;B a=(e.1C)?e.1C:M;1B(!a.3g&&a.1d){a=a.1d};5(!a.3g)C;B b=Y.1t(a.1f.X(d)[1]),3a=A;5(b==Z)b=(b=Y.7D(a.1f.X(d)[1])[0])?b:Z;5(b!=Z){B c=b;1B(c.1d){c=c.1d;5(c.14){c.14.3A(b);3a=c}};5(3a){5(e.1u)e.1u();Y.2Y.1f=2p+"#"+a.1f.X(d)[1];3a.14.24();C A}}})}}},3U:8(a){F.7a=E;B b=F.3X(Y.30("7J")[0],"4q",(a)?a:\'1R\');1n(B i=0,3s;3s=b[i];i++)5(!3s.14)F.3O(3s)},7H:8(a,b){5(33(a)==\'3I\')a=Y.1t(a);5(a==Z)C A;B c=a;1B(c.1d){c=c.1d;5(c.14){5(b){Y.2Y.1f="#"+b};c.14.3A(a);c.14.24();C E}};C A},1G:8(a,b){1n(B i=0,3k;3k=F.2W[i];i++){3k.14.1G();5(b)3k.14.4o()};5(a)F.3H()},4e:8(a){B a=a.6E(\'-\'),3N=a[0],i;1n(i=1;4g=a[i];i++){3N+=4g.7v(0).7G()+4g.7I(1)};C 3N},3X:8(a,b,c){5(33(a)==\'3I\')a=Y.1t(a);5(a==Z)C A;B d=2q 3c("(^|\\\\s)"+c+"($|\\\\s)"),7K,3Z=[],4v=0;B e=a.30(b);1n(B i=0,2P;2P=e[i];i++){5(2P.1r&&2P.1r.X(d)){3Z[4v]=2P;4v++}}C 3Z},5u:8(a){5(a==Z)C E;B b;1B(a.1d){b=F.P(a,\'2K\');5(b==\'3T\')C E;a=a.1d};C A},P:8(a,b){5(16.4S)C 16.4S(a,Z).6o(b);5(a.5l)C a.5l[F.4e(b)];C A},3w:16.2R(8(){B a=Y.1t(\'1R-7n\');5(a!=Z){F.3U();16.2n(F.3w)}},46),4f:8(a,b){a.1d.7F(a);a.11.2K="3T";b.1a(a)},V:8(a,b,c){5(!F.1z(a,b,c)&&a.56){a.56(\'5L\'+b,c)}},1z:8(a,b,c){5(a.4r){a.4r(b,c,A);F.4O=E;16.4r("6T",8(){F.1H(a,b,c)},A);C E}1i C A},1H:8(a,b,c){5(!F.5B(a,b,c)&&a.5P)a.5P(\'5L\'+b,c)},5B:8(a,b,c){5(a.5T){a.5T(b,c,A);C E}1i C A}};8 7z(a){F.3O(a)};F.4F();',62,481,'||||sC|if||sBr|function||||||||||||||||||||||||||||false|var|return|sY|true|fleXenv|tDv|mDv|sfU|wD|px|movBr|this|padding|scroller|getStyle|curPos|Math||createDiv|cntRSize|addTrggr|getSize|match|document|null||style|moveDelta|width|fleXcroll|offsetHeight|window|reqS|target|paddings|appendChild|left|trgtScrll|parentNode|top|href|0px|setScrollPos|else|parseInt|sDv|pDv|event|for|anchoR||offsetWidth|className||getElementById|preventDefault|forcedHide|targetSkew|fDv|setPos|addChckTrggr|delta|while|srcElement|yPos|sSBr|xPos|updateScrollBars|remTrggr|cntSize|mxScroll|border|goScroll|id|findPos|position|retFalse|edge|flexcroll|_|barSpace|hoverH|scrollPosition|sSDv|max|scrollState|height|sFBr|zIndex|iNDx|nV|mDPosFix|right|maxPos|keyAct|min|forcedBar|curleft|classChange|scrollTop|targetTouches|fHide|clientX|bottom|curtop|scrollLeft|tSelectFunc|mV|clientY|hidden|clearInterval|externaL|urlBase|new|formItem||documentElement|copyStyles|sFDv|indx|touchPos|length|moved|mWheelProc|indexOf|intClear|touchPrevent|minPos|hBr|touchFlick|urlExt|jBox|mTBox|display|barZ|mousemove|setSize|createScrollBars|pusher|mMouseUp|setInterval|barPadding|cPSize|vrt|visibility|fleXlist|focusProtect|location|ofstParent|getElementsByTagName|tDivZ|offsetParent|typeof|pageScrolled|relative|vEdge|stdMode|fShow|vertical|eScroll|userAgent|RegExp|sRange|vUpReq|getContentHeight|fleXanchor|absolute|sYdir|scrollBoth|fleXdiv|getContentWidth|realScrollPos|hrz|stepp|maxCWidth|sXdir|mMoveBar|tgDiv|clicked|hUpReq|mouseup|catchFastInit|flickClear|updateScroll|onfleXcroll|scrollToElement|overflow|handleTouch|brdWidthLoss|doBarPos|inputName|padHeightComp|prepAnchors|string|tSelectMouse|forcedPos|handleTouchMove|prepareScroll|reT|fleXcrollMain|handleTextSelect|uReg|wheelAct|setVisibility|none|initByClass|barClickRetard|abs|getByClassName|selectstart|retArray||baseAct|mdY|brdHeightLoss|baseProp||100|vBr|mHeight|claSS|onmousedown|barClickScroll|handleTouchEnd|setWidth|camelConv|putAway|parT|zTHeight|mY|Array|padLoss|setHeight|scrollContent|replace|formUpdate|easeInOut|div|addEventListener|xAw|refreshTimeout|calcCScrollVal|key|hElem|mdX|maxx|yScrld|hEdge|xScrld|yAw|mOnXEdge|mOnYEdge|fleXcrollInit|touchstart|scrlTrgt|fleXdata|fleXprocess|fixIEDispBug|wheelDelta|createElement|firstChild|w3events|1px|findRCpos|vBar|getComputedStyle|default|mousedown|setTimeout|100p|isddvChild|mousewheel|onfleXcrollRun|onfleXcrollFail|clearTimeout|100px|1em|basebeg|opera|attachEvent|type|keyCode|oScrollX|index|reqV|DOMMouseScroll|offsetTop|HTMLElement|pageYOffset|fixed|touchmove|solid|getPos|intlWidth|currentStyle|load|inMposX|paddingTop|aSize|Object|barbeg|textAlign|anchorList|checkHidden|pageXOffset|postHeight|pointerOffsetY|brdWidth|baseend|paddingLeft|remChckTrggr|text|pkeY|globalInit|flexinactive|hide|barend|offsetLeft|inMposY|touchend|on|80|regExer|inCurPos|detachEvent|touchBar|detail|pointerOffsetX|removeEventListener|write|onmousewheel|textarea|auto|_37|focus|childNodes|inline|OmniWeb|keypress|align|yScroll|scrollwrapper|flexcrollactive|hscroller|click|important|setAttribute|containerSize|425|_34|contentScroll|block|KDE|bscrollgeneric|borderBottom|vh|fontSize|visible|scrollerjogbox|getPropertyValue|css|keydown|input|onmouseover|_39|scrollUpdate|compPad|floor|undefined|keyup|black|touchLink|zoomdetectdiv|parseFloat|hBar|split|navigator|tabIndex|contentSize|contentwrapper|blur|vscroller|page|flex__|scrollbar|2px|_hscroller|999|onblur|select|unload|AppleWebKit|2500|borderBottomWidth|normal|_38|base|MSIE|pow|copyholder|scrollgeneric|prototype||button|_35|bar|platform|initialized|12px|sizeChangeDetect|Safari|onmouseclick|_33|failed|in|blue|toString|vendor|9999|mcontentwrapper|init|Mac|dblclick|domfixdiv|ceil|_40|nodeType|_36|charAt|xScroll|matcH|scrollerba|CSBfleXcroll|ondblclick|link|rs|getElementsByName|resize|removeChild|toUpperCase|scrollTo|substr|body|clsnm'.split('|'),0,{}))
  790. (function($,g){var h={},id=1,etid=g+'ETID';$.fn[g]=function(e,f){id++;f=f||this.data(etid)||id;e=e||150;if(f===id)this.data(etid,f);this._hover=this.hover;this.hover=function(c,d){c=c||$.noop;d=d||$.noop;this._hover(function(a){var b=this;clearTimeout(h[f]);h[f]=setTimeout(function(){c.call(b,a)},e)},function(a){var b=this;clearTimeout(h[f]);h[f]=setTimeout(function(){d.call(b,a)},e)});return this};return this};$.fn[g+'Pause']=function(){clearTimeout(this.data(etid));return this};$[g]={get:function(){return id++},pause:function(a){clearTimeout(h[a])}}})(jQuery,'mouseDelay');
  791. function autoFlashHeight(){
  792. $(".newsList").height($(window).height()-296 );$(".contentBg").height($(window).height()-305 );
  793. };
  794. $(window).resize(autoFlashHeight);
  795. $(function(){
  796. $(".videoItem li").hover(function () {
  797. $(this).children(".videoCon").animate({top:'0'},"normal","swing");
  798. },
  799. function () {
  800. $(this).children(".videoCon").animate({top:'110px'},"fast");
  801. }
  802. );
  803. });
  804. $(function(){
  805. $(".trainEntry").hover(function () {
  806. $(this).addClass("shake")
  807. },
  808. function () {
  809. $(this).removeClass("shake")
  810. }
  811. );
  812. $(".trainFormTab a").click(function(){
  813. $(this).addClass("now").siblings().removeClass("now");
  814. $(".trainFormItem > .formEntry ").hide().eq($(".trainFormTab a").index(this)).animate({opacity: 'toggle'},500);});
  815. $(".openAll").click(function(){
  816. $(".mainContact").animate({left:"340px"},"normal").hide();
  817. $(".allContact").show().animate({left:"0"},"normal");
  818. });
  819. $(".closeAll").click(function(){
  820. $(".allContact").hide().animate({left:"450px"},"normal");
  821. $(".mainContact").show().animate({left:"0"},"normal");
  822. });
  823. $(".indexSoft .softEntry").hover(function () {
  824. $(this).addClass("focus").children(".seList").show("fast");
  825. },
  826. function () {
  827. $(this).removeClass("focus").children(".seList").hide();
  828. }
  829. );
  830. $(".contentBottom").mouseDelay(800).hover(function () {
  831. $(this).children(".newsExtra").show().animate({top:"-255px",opacity:"1"});
  832. },
  833. function () {
  834. $(this).children(".newsExtra").animate({top:"-200",opacity:"0"}).fadeOut();
  835. }
  836. );
  837. $('.selectTitle').click(function(){
  838. $(this).siblings(".selectList").fadeToggle();
  839. $(this).toggleClass("focus");
  840. if ($(this).hasClass('focus')) $(this).find('b').html('&#x25B2;').addClass("down")
  841. else $(this).find('b').html('&#x25BC;').removeClass("down")
  842. });
  843. });