/**************************************************************************
	Site: Grupa Oak
	Date: 03.2010

***************************************************************************/

var Engine = {
	vars: {
		start: 1,
		scrollSpeed: 2000, 
		content: {
			minW: 960,
			minH: 600,
			maxW: 1920,
			maxH: 1200,
			timeout: null
		},
		opacity: $.browser.msie ? 0.8 : 1,
		baseSelector: $.browser.webkit ? 'body' : 'html',
		keyEvent: $.browser.msie ? 'keyup' : $.browser.webkit ? 'keydown' : 'keypress',
		hash: null,
		ie6: $.browser.msie && $.browser.version == '6.0',
		clients: {
			interval: null,
			timeout: 5000,
			fade: 1500
		}
	},
	
	utils: {
		externalLink: function() {
			$('#sections a[rel=external]').click(function(e){
				window.open(this.href);
				e.preventDefault();
			});
		},
		
		clients: {
			interval: null,
			
			init: function() {
				var clients = $('#grupa-oak .clients li'),
					array = [],
					index = 0,
					i = 0;
	
				 this.showClients = function() {
					i++;
					if(i == array.length) {
						i = 0;
					}
	
					index = array[i];
					clients.filter(':visible').fadeOut(Engine.vars.clients.fade);
					clients.filter(':eq(' + index + ')').fadeIn(Engine.vars.clients.fade);
				};
	
				clients.each(function(index){
				    array.push(index);
				});
				
				clients.hide().filter(':eq(' + array[0] + ')').fadeIn(500);
				
				Engine.utils.clients.start();
			},
			
			pause: function() {
				clearInterval(Engine.vars.clients.interval);
			},
			
			start: function() {
				clearInterval(Engine.vars.clients.interval);
				Engine.vars.clients.interval = setInterval(function() {
					Engine.utils.clients.showClients();
				}, Engine.vars.clients.timeout);
			}
		}
	},
	
	layout: {
		init: function() {
			$('#sections .content').hide();
		
			Engine.layout.dimentions();
			Engine.layout.nav();
			Engine.layout.controls();

			$(window).bind('resize', function(){ Engine.layout.dimentions(); });

			var hashChange = function() {
					if(window.location.hash) {
						$('#nav [href$="' + window.location.hash + '"]').click();
						$('.current').removeClass('current');
						$(window.location.hash).addClass('current');
					} else {
						$('#sections > li:first-child').addClass('current');
					}
				},
				
				/*
					hide .prev/.next when mouse scrolling
					thinking of a better way to do it (no timeouts?)
				*/
				mouseScroll = function() {
					var time = 0,
						$pn = $('#sections .prev, #sections .next');
						
					$(Engine.vars.baseSelector).mousewheel(function(event, delta) {
						$pn.hide();
						this.scrollLeft -= (delta * 30);
		
						clearTimeout(time);
						time = setTimeout(function() {
							$pn.show();
						}, 500)
						event.preventDefault();
					});					
				}
						
			$(window)
				.bind('hashchange', function(){ hashChange(); })
				.trigger('hashchange');
				
			mouseScroll();

			if($.browser.msie && ($.browser.version == '7.0' || $.browser.version == '6.0')) {
				Engine.layout.ie(); 
			}
		},
		
		controls: function() {
			var $li = $('#sections > li');
		
			/*
				prev / next page 
			*/
			var $prev = $('<div/>', {
					'class': 'prev',
					css: {
						height: $(window).height() - $('#nav').outerHeight()
					},
					click: function() {
						clearTimeout(Engine.vars.content.timeout);
						$('#sections .content').fadeOut(350);
						
						Engine.layout.scroll($(this).parent(), 'prev');
					}
				}),
				$next = $('<div/>', {
					'class': 'next',
					css: {
						height: $(window).height() - $('#nav').outerHeight()
					},
					click: function() {
						clearTimeout(Engine.vars.content.timeout);
						$('#sections .content').fadeOut(350);

						Engine.layout.scroll($(this).parent(), 'next');
					}
				});

				/*
					hover scroll
				*/				
				$('.current .next')
					.live('mouseenter', function(){
						$(this).stop().animate({ width: 140, right: -30 }, Engine.vars.scrollSpeed/3);
						$(Engine.vars.baseSelector).stop()
							.animate({ scrollLeft: $(this).closest('li').offset().left + 30 },
								Engine.vars.scrollSpeed/3, 'easeInOutQuad');
					})
					.live('mouseleave', function(){
						$(this).stop().animate({ width: 110, right: 0 }, Engine.vars.scrollSpeed/3);
						$(Engine.vars.baseSelector).stop()
							.animate({ scrollLeft: $(this).closest('li').offset().left },
								Engine.vars.scrollSpeed/2, 'easeInOutQuad');
					});
	
				$('.current .prev')
					.live('mouseenter', function(){
						$(this).stop().animate({ width: 140, left: -30 }, Engine.vars.scrollSpeed/3);
						$(Engine.vars.baseSelector).stop()
							.animate({ scrollLeft: $(this).closest('li').offset().left - 30 },
								Engine.vars.scrollSpeed/3, 'easeInOutQuad');
					})
					.live('mouseleave', function(){
						$(this).stop().animate({ width: 110, left: 0 }, Engine.vars.scrollSpeed/3);
						$(Engine.vars.baseSelector).stop()
							.animate({ scrollLeft: $(this).closest('li').offset().left },
								Engine.vars.scrollSpeed/2,'easeInOutQuad');
					});
			
				$li.each(function(idx){
						$(this)
							.prepend($prev.clone(true))
							.append($next.clone(true))	
							.data('idx', idx);
					})
					.filter(':first').find('.prev').remove().end().end()
					.filter(':last').find('.next').remove();		

			/*
				arrow keys scrolling
			*/
			$(document)
				.bind(Engine.vars.keyEvent, function(e) {
	                var key = e.keyCode || e.which;
	
					if(!$(Engine.vars.baseSelector).is(':animated')) {
						if (key == 37) {
							$('#sections .current .prev').click();
							return false;
						} else if (key == 39) {
							$('#sections .current .next').click();
							return false;
						}
					}
					
					if(key == 40) {
						return false;
					}
	            })

			/*
				hide content
			*/
			var $hide = $('<button />', {
					'class': 'hide',
					'text': 'x',
					'title': $('html').attr('lang') == 'pl' ? 'Ukryj' : 'Hide',
					click: function() {
						$(this).parent().fadeOut(650).addClass('hidden').parent().addClass('content-hidden');
					}
				});
			
			$li.each(function(){
				$('.content', this).prepend($hide.clone(true));
			});
		},
		
		nav: function() {
			var $nav = $('#nav'),
				$s = $('#sections'),
				navTimeout = null;
				
			$('#nav ul').wrap('<div class="nav"></div>');
			var navItems = $('div, li a, .lang', $nav);
			
			$nav.insertAfter('#sections li:first .background');
			
			$('a', $nav).click(function() {
				$(Engine.vars.baseSelector).dequeue();
				
				if($(this).is('.active')) {
					var $c = $('#sections .current .content');

					if($c.is('.hidden')) {
						$c.fadeIn(650).removeClass('hidden');
					}
					
					var targetPos = $($(this).hrefHash(), $s).offset().left,
						distance = $(window).scrollLeft() - targetPos;

					if(distance != 0) {
						$(Engine.vars.baseSelector).animate({ scrollLeft: targetPos }, 2000, 'easeInOutQuad' )
					}
				} else {
					var id = $(this).attr('href'),
						currentOffset = $(window).scrollLeft();
					
					$nav.find('.active').removeClass('active');
					$(this).addClass('active');
						
					if(currentOffset > $(id).offset().left) {
						$s.find(id).next().find('.prev').click();
					} else if(currentOffset < $(id).offset().left) {
						$s.find(id).prev().find('.next').click();	
					}
				}
							
				return false;
			});
			
			/*
				click on background: show content, set as .current, set position
			*/
		
			$('.background').click(function(event){
				var $page = $(this).closest('li');
				
				if($page.find('.content').is(':hidden')) {
					$page.removeClass('content-hidden')
						 .find('.content').fadeIn(650).removeClass('hidden');
					
					if(!$page.hasClass('current')) {
						var offset = $page.offset().left,
							id = $page[0].id;

						$('.current', $s).removeClass('current').addClass('content-hidden').find('.content').fadeOut();
						$page.addClass('current');
						
						if($page.is(':first-child')) {
							navItems.stop().animate({ opacity: Engine.vars.opacity }, 650);
						}

						$(Engine.vars.baseSelector).stop()
							.animate({ scrollLeft: offset }, Engine.vars.scrollSpeed/2,'easeInOutQuad', function() {
								location.hash = id;
							});
						
						$nav
							.find('.active').removeClass('active').end()
							.find('a[href*=#' + id + ']').addClass('active');
					}
				}
			});

			$nav.hover(
				function(){
					clearTimeout(navTimeout);
					$nav.addClass('hover');
					if(!$('> li:first', $s).is('.current')) {
						navItems.stop().animate({ opacity: Engine.vars.opacity }, 650);
					}
				},
				function(){
					$nav.removeClass('hover');
					if(!$('> li:first', $s).is('.current')) {
						navTimeout = setTimeout(function() {
							navItems.stop().animate({ opacity: 0 }, 650);
						}, 350);
					}
				}
			);

			setTimeout(function() {
				if(!$('> li:first', $s).is('.current')) {
					$nav.find('div, li a, .lang').animate({ opacity: 0 }, 350);
				} else {
					$nav.find('h1').addClass('active');
				}
			}, 150);
		},
		
		dimentions: function() {
			$('body').css('overflow-y', 'hidden');

			var winWidth = $(window).width(),
				winHeight = $(window).height(),
				imgHeight = null,
				diff = null,
				$sections = $('#sections'),
				$li = $('> li', $sections),
				$prevNext = $('.prev, .next', $li),
				$nav = $('#nav'),
				animationSpeed = 350;
			
			/*
				set dimentions (background, content, prev/next, etc.)
			*/			
			var setDimentions = function() {
				winHeight = $(window).height();
				
				if(winWidth < Engine.vars.content.minW) { winWidth = Engine.vars.content.minW; }
				if(winHeight < Engine.vars.content.minH) { winHeight = Engine.vars.content.minH; }
			
				$li.add('.background', $li).css({
					width: winWidth,
					height: winHeight
				});
	
				$('.background img', $li).css('width', winWidth);
	
				$('body').css({
					width: function() {
						return $li.length * winWidth;
					}
				});
				
				var imgHeight = $('img', $li).first().height();
				
				if(imgHeight < winHeight){
					var diff = winHeight - imgHeight;
					
					$('.background img', $li).css({
						width: winWidth + 2*diff,
						marginLeft: -diff
					});
				} else if(imgHeight > winHeight) {
					$('.background img', $li).css('marginLeft', 0);
				}
				
				
				/*
					navigation width
				*/
				var h1w = $('h1').width() + 5,
					$n = $('#nav');

				$n.css('width', winWidth).find('.nav').css('width', winWidth - h1w);
				
				/*
					.prev / .next height
				*/
				$prevNext.css('height', $(window).height() - $('#nav').outerHeight());

				/*
					.content vertical align
				*/
				if(!Engine.vars.ie6) {
					var contentTop =  $nav.offset().top;
	
					$('.content', $sections).each(function(){					
						if(contentTop > $(this).outerHeight()) {
							$(this).css('top', function() {
								return (contentTop - $(this).outerHeight())/2;
							});
						} else {
							$(this).css('top', 0);
						}
					});
				}
			};

			$li.first().find('.background img').each(function(){
				if (this.complete || this.readyState == 'complete') {
					setDimentions();
				} else { 
					$(this).load(function() {
						setDimentions();
					}); 
				}
			});

			if(Engine.vars.start) {
				Engine.vars.content.timeout = setTimeout(function() {
					$li.addClass('content-hidden').filter('.current').removeClass('content-hidden').find('.content').fadeIn(650);
					Engine.vars.start = 0;
				}, 3000);
			}
		},
		
		scroll: function(li, dir) {
			var $li = li,
				$target = null,
				$all = null,
				$nav = $('#nav'),
				$sections = $('#sections'),
				navItems = $('div, li a, .lang', $nav);
			
			if(dir == 'next') {
				if($li.next().length) {
					$target = $li.next();
					$all = $li.nextAll();
				}
			} else if(dir == 'prev') {
				if($li.prev().length) {
					$target = $li.prev();
					$all = $li.prevAll();
				}					
			}
			
			if($target) {
				var idx = null,
					speed = Engine.vars.scrollSpeed;
					
				Engine.vars.hash = $target[0].id;

				if($('#sections .current').data('idx') > $target.data('idx')) {
					idx = $('#sections .current').data('idx') - $target.data('idx');
				} else if($('#sections .current').data('idx') < $target.data('idx')) {
					idx = $target.data('idx') - $('#sections .current').data('idx');
				}


				/*
					scroll speed
				*/
				if(idx >= 2 && idx < 4) {
					speed = idx * parseInt(speed/2, 10);
				} else if(idx >= 4) {
					speed = idx * parseInt(speed/3, 10);
				}
				
				$('#sections .current').removeClass('current');


				/*
					don't hide navigation on 1st page
				*/
				if($('> li:first', $sections).is('.current')) {
					navItems.animate({ opacity: 1 }, 350);
					Engine.utils.clients.start();
				} else {
					$nav.find('h1').removeClass('active');
					
					if(!$nav.is('.hover')) {
						$nav.find('div, li a, .lang').animate({ opacity: 0 }, 350).end();
					}
					
					Engine.utils.clients.pause();
				}
				
				if($all.length > 1) {
					var offset = null;
					
					dir == 'next' ? offset = $target.offset().left + 60 : offset = $target.offset().left - 60;

					$(Engine.vars.baseSelector).stop()
						.animate(
							{ scrollLeft: offset },
							speed,
							'easeInOutQuad'
						)
						.animate(
							{ scrollLeft: $target.offset().left },
							parseInt(Engine.vars.scrollSpeed/2, 10),
							'easeInOutQuad',
							function() {
								$('#nav').appendTo($target);
								$target.addClass('current');
								
								$('#nav')
									.find('.active').removeClass('active').end()
									.find('a[href=#' + $target.attr('id') + ']').addClass('active');

								clearTimeout(Engine.vars.content.timeout);
								Engine.vars.content.timeout = setTimeout(function() {
									$target.removeClass('content-hidden').find('.content').fadeIn(650);

									if($('#sections li:first-child').is('.current')) {
										$nav
											.find('div, li a, .lang').animate({ opacity: 1 }, 350).end()
											.find('h1').addClass('active');
											
										Engine.utils.clients.start();
									}
								}, 1000);

								/* if(typeof XULDocument != 'undefined') { location.hash = Engine.vars.hash; } */
								location.hash = Engine.vars.hash;
							}
						);
				} else {
					$(Engine.vars.baseSelector).stop()
						.animate(
							{ scrollLeft: $target.offset().left }, 
							speed - 300,
							'easeInOutQuad',
							function() {
								$('#nav').appendTo($target);
								$target.addClass('current');

								$('#nav')
									.find('.active').removeClass('active').end()
									.find('a[href=#' + $target.attr('id') + ']').addClass('active');

								clearTimeout(Engine.vars.content.timeout);
								Engine.vars.content.timeout = setTimeout(function() {
									$target.removeClass('content-hidden').find('.content').fadeIn(650);

									if($('#sections li:first-child').is('.current')) {
										$nav
											.find('div, li a, .lang').animate({ opacity: 1 }, 350).end()
											.find('h1').addClass('active');
											
										Engine.utils.clients.start();
									}
								}, 1000);
								
								/* if(typeof XULDocument != 'undefined') { location.hash = Engine.vars.hash; } */
								location.hash = Engine.vars.hash;
							}
						)
				};
			}
		},
		
		/*
			IE message
		*/
		ie: function() {
			$.get('ie-msg.html', function(data) {
				$('#sections .current')
					.append(data)
					.find('.hide').click(function(){
						$(this).closest('#ie-msg').fadeOut(650, function() {
							$(this).remove();
						})
					}).end()
					.find('h2').toggle(
						function() {
							$(this).find('span').hide().end().next('div').fadeIn();
						},
						function() {
							$(this).find('span').fadeIn().end().next('div').fadeOut();							
						}
					)
			});
		}
	}
};

$(function(){
	Engine.layout.init();
	Engine.utils.externalLink();
});


jQuery.fn.extend({
	hrefHash: function(){
		return $(this).attr('href').substr($(this).attr('href').indexOf('#'));
	}
});

/*
 * jQuery hashchange event - v1.2 - 2/11/2010
 * http://benalman.com/projects/jquery-hashchange-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);


/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend( jQuery.easing, {
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) { return jQuery.easing[jQuery.easing.def](x, t, b, c, d); },
	easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; },
	easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; },
	easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b;	return -c/2 * ((--t)*(t-2) - 1) + b; }
});


/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * Version: 3.0.2
 * 
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);


/*
 * QueryLoader		Preload your site before displaying it!
 * Author:			Gaya Kessler
 * Date:			23-09-09
 * URL:				http://www.gayadesign.com
 * Version:			1.0
 * 
 * A simple jQuery powered preloader to load every image on the page and in the CSS
 * before displaying the page to the user.
 * 
 * 
 * Modified by:		Bartek Stankowski (http://bstankowski.pl)
 * Date: 			10-03-2010
 * Notes:			Used custom loading effect, cleaned the code, used jQuery 1.4 new element construction, etc.
 * 
 */

eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('7 1={w:"",e:"",x:"",o:[],v:0,q:0,5:"l",17:1g,J:"",15:3(){8(Y.12.C(/m (\\d+(?:\\.\\d+)+(?:b\\d*)?)/)=="m 6.0,6.0"){10 1f}8(1.5=="l"){1.A();1.H(1.5);1.D()}n{$(1e).1d(3(){1.A();1.H(1.5);1.D()})}1.J=F(3(){1.18()},1.17)},18:3(){7 I=Y.12.C(/m (\\d+(?:\\.\\d+)+(?:b\\d*)?)/);8(I){8(I[0].C("m")){1c((K/1.v)*1.q<K){1.B()}}}},B:3(){1.q++;1.16()},H:3(X){$(X).1h("*:1i(1l)").1k(3(){7 4="";8($(a).g("Q-S")!="1j"){4=$(a).g("Q-S")}n 8(1m($(a).p("G"))!="1b"&&$(a).p("1a").19()=="O"){4=$(a).p("G")}4=4.s("4(\\"","");4=4.s("4(","");4=4.s("\\")","");4=4.s(")","");8(4.k>0){1.o.1q(4)}})},D:3(){1.x=$("<h />",{g:{9:0,c:0,V:\'P\'}}).r(1.5);7 k=1.o.k;1.v=k;1C(7 i=0;i<k;i++){7 M=$("<O />");$(M).p("G",1.o[i]).1A("R").1D("R",3(){1.B()}).r($(1.x))}},A:3(){$(\'l\').g(\'V-y\',\'P\');7 9=0,c=0,j=0;8(1.5=="l"){9=$(z).9();c=$(z).c();j="1H"}n{9=$(1.5).1G();c=$(1.5).1F();j="1n"}7 u=$(1.5).W().u,f=$(1.5).W().f;1.w=$(\'<h />\',{\'14\':\'1y\',\'g\':{j:j,f:f,u:u,c:c+"E",9:9+"E"}}).r($(1.5));1.e=$(\'<h />\',{\'1r\':\'<h />\',\'14\':\'Z\'}).r($(1.w));1.e=$(\'.Z h\');$(1.e).N().g({f:3(){10($(z).9()-$(a).9())/2+\'E\'}})},16:3(){7 t=(K/1.v)*1.q;8(t>1p){$(1.e).U().T({f:-t+"%"},3(){1.L()})}n{$(1.e).U().T({f:-t+"%"},1o)}},L:3(){1s(1.J);F(3(){$(1.e).N().11(1w,3(){$(1.w).11(1v,3(){$(a).13()});$(1.x).13();1u.1I.1x.15()})},1t);F(3(){$(\'z\').1E(\'1B\')},1z)}};',62,107,'|QueryLoader||function|url|selectorPreload||var|if|height|this||width||loadBar|top|css|div||position|length|body|MSIE|else|items|attr|doneNow|appendTo|replace|perc|left|doneStatus|overlay|preloader||window|spawnLoader|imgCallback|match|createPreloading|px|setTimeout|src|getImages|ie|ieTimeout|100|doneLoad|imgLoad|parent|img|hidden|background|load|image|animate|stop|overflow|offset|selector|navigator|QLoader|return|fadeOut|userAgent|remove|class|init|animateLoader|ieLoadFixTime|ieLoadFix|toLowerCase|tagName|undefined|while|ready|document|false|2000|find|not|none|each|script|typeof|absolute|500|99|push|html|clearTimeout|350|Engine|750|1000|clients|QOverlay|300|unbind|resize|for|bind|trigger|outerWidth|outerHeight|fixed|utils'.split('|'),0,{}));
