$(document).ready(function(){
/*Choose country redirect*/
$('#ChooseCountry').change(function(){
	var val = $(this).find("option:selected").attr('value');
	window.location=val;
});



/*Newsletter*/
$('#newsletterSignup .newsletter-subscribe').appendTo('#newsletterFormWrapper');
$('.newsletter-name label').hide();
$('.newsletter-lastname label').hide();

var newsletterName = $('#newsletterFormWrapper .newsletter-name label').text();
var newsletterLastName = $('#newsletterFormWrapper .newsletter-lastname label').text();

$('.newsletter-name input').val(newsletterName).addClass('replaceInput');
$('.newsletter-lastname input').val(newsletterLastName).addClass('replaceInput');

/*Replace input*/
$('.replaceInput').each(function(){
	var thisVal = $(this).attr('value');							
	$(this).focus(function(){
		if($(this).attr('value')==thisVal){
			$(this).attr('value','');
		}
	}).blur(function(){
		if($(this).attr('value')==''){
			$(this).attr('value',thisVal);
		}
	});														
});

/*Live search input*/
$('#liveSearchInput').keyup(function(){
	$('.DealerList').removeHighlight();
	var searchField = $(this);
	var searchInput = searchField.attr('value').toLowerCase();
	if(searchInput==''){
		$('.dealerInfo').parent().show();	
	}else{
		$('.dealerInfo').parent().hide();
		$('.dealerInfo:contains('+searchInput+')').highlight(searchInput).parent().show();
		$('#output').text(searchInput);
	}
});


$('#ctl00_ctl00_ctl00_ctl00_ContentPlaceHolderDefault_MasterpagePlaceholder_SubpagePlaceholder_ctl02_umbLogin_6_TextBoxUserName').val('Press');
	



});

/*Functions*/

function StartPopUp() { //funktionskald for at launche
$.blockUI({
		message: $('#LanguageGrowlWrapper'), //message kalder den id/class som skal vises ovenp? sitet
		centerY: false, 
		css: { border: '', width:'100%', background:'', top:'0px', left:'0px' , position:'absolute'},
		overlayCSS: { opacity: '0.45', cursor: 'pointer' }
	});
	$('.blockOverlay').click($.unblockUI);
};

$('#LanguageGrowlWrapper').click(function(){});

function EndPopUp() { //kald til at fjerne pop-up
	  $.unblockUI();
}

var addthis_config = {
	  services_compact: 'email, facebook, linkedin, twitter, delicious, digg, more',
	  services_exclude: 'print'
}


/*
* jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
*
* Uses the built In easIng capabilities added In jQuery 1.1
* to offer multiple easIng options
*
* Copyright (c) 2007 George Smith
* Licensed under the MIT License:
*   http://www.opensource.org/licenses/mit-license.php
*/

// t: current time, b: begInnIng value, c: change In value, d: duration

jQuery.extend(jQuery.easing,
{
   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;
   },
   easeInCubic: function (x, t, b, c, d) {
      return c * (t /= d) * t * t + b;
   },
   easeOutCubic: function (x, t, b, c, d) {
      return c * ((t = t / d - 1) * t * t + 1) + b;
   },
   easeInOutCubic: function (x, t, b, c, d) {
      if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
      return c / 2 * ((t -= 2) * t * t + 2) + b;
   },
   easeInQuart: function (x, t, b, c, d) {
      return c * (t /= d) * t * t * t + b;
   },
   easeOutQuart: function (x, t, b, c, d) {
      return -c * ((t = t / d - 1) * t * t * t - 1) + b;
   },
   easeInOutQuart: function (x, t, b, c, d) {
      if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
      return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
   },
   easeInQuint: function (x, t, b, c, d) {
      return c * (t /= d) * t * t * t * t + b;
   },
   easeOutQuint: function (x, t, b, c, d) {
      return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
   },
   easeInOutQuint: function (x, t, b, c, d) {
      if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
      return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
   },
   easeInSine: function (x, t, b, c, d) {
      return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
   },
   easeOutSine: function (x, t, b, c, d) {
      return c * Math.sin(t / d * (Math.PI / 2)) + b;
   },
   easeInOutSine: function (x, t, b, c, d) {
      return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
   },
   easeInExpo: function (x, t, b, c, d) {
      return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
   },
   easeOutExpo: function (x, t, b, c, d) {
      return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
   },
   easeInOutExpo: function (x, t, b, c, d) {
      if (t == 0) return b;
      if (t == d) return b + c;
      if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
      return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
   },
   easeInCirc: function (x, t, b, c, d) {
      return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
   },
   easeOutCirc: function (x, t, b, c, d) {
      return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
   },
   easeInOutCirc: function (x, t, b, c, d) {
      if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
      return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
   },
   easeInElastic: function (x, t, b, c, d) {
      var s = 1.70158; var p = 0; var a = c;
      if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3;
      if (a < Math.abs(c)) { a = c; var s = p / 4; }
      else var s = p / (2 * Math.PI) * Math.asin(c / a);
      return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
   },
   easeOutElastic: function (x, t, b, c, d) {
      var s = 1.70158; var p = 0; var a = c;
      if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3;
      if (a < Math.abs(c)) { a = c; var s = p / 4; }
      else var s = p / (2 * Math.PI) * Math.asin(c / a);
      return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
   },
   easeInOutElastic: function (x, t, b, c, d) {
      var s = 1.70158; var p = 0; var a = c;
      if (t == 0) return b; if ((t /= d / 2) == 2) return b + c; if (!p) p = d * (.3 * 1.5);
      if (a < Math.abs(c)) { a = c; var s = p / 4; }
      else var s = p / (2 * Math.PI) * Math.asin(c / a);
      if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
      return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
   },
   easeInBack: function (x, t, b, c, d, s) {
      if (s == undefined) s = 1.70158;
      return c * (t /= d) * t * ((s + 1) * t - s) + b;
   },
   easeOutBack: function (x, t, b, c, d, s) {
      if (s == undefined) s = 1.70158;
      return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
   },
   easeInOutBack: function (x, t, b, c, d, s) {
      if (s == undefined) s = 1.70158;
      if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
      return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
   },
   easeInBounce: function (x, t, b, c, d) {
      return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;
   },
   easeOutBounce: function (x, t, b, c, d) {
      if ((t /= d) < (1 / 2.75)) {
         return c * (7.5625 * t * t) + b;
      } else if (t < (2 / 2.75)) {
         return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
      } else if (t < (2.5 / 2.75)) {
         return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
      } else {
         return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
      }
   },
   easeInOutBounce: function (x, t, b, c, d) {
      if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;
      return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b;
   }
});



/*
AnythingSlider v1.7.12 minified using Google Closure Compiler
Original by Chris Coyier: http://css-tricks.com
Get the latest version: https://github.com/ProLoser/AnythingSlider
*/

(function (d) { d.anythingSlider = function (h, i) { var a = this, b; a.el = h; a.$el = d(h).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>'); a.$el.data("AnythingSlider", a); a.init = function () { a.options = b = d.extend({}, d.anythingSlider.defaults, i); a.initialized = !1; d.isFunction(b.onBeforeInitialize) && a.$el.bind("before_initialize", b.onBeforeInitialize); a.$el.trigger("before_initialize", a); a.$wrapper = a.$el.parent().closest("div.anythingSlider").addClass("anythingSlider-" + b.theme); a.$window = a.$el.closest("div.anythingWindow"); a.win = window; a.$win = d(a.win); a.$controls = d('<div class="anythingControls"></div>').appendTo(b.appendControlsTo !== null && d(b.appendControlsTo).length ? d(b.appendControlsTo) : a.$wrapper); a.$startStop = d('<a href="#" class="start-stop"></a>'); b.buildStartStop && a.$startStop.appendTo(b.appendStartStopTo !== null && d(b.appendStartStopTo).length ? d(b.appendStartStopTo) : a.$controls); a.$nav = d('<ul class="thumbNav" />').appendTo(b.appendNavigationTo !== null && d(b.appendNavigationTo).length ? d(b.appendNavigationTo) : a.$controls); a.flag = !1; a.playing = b.autoPlay; a.slideshow = !1; a.hovered = !1; a.panelSize = []; a.currentPage = b.startPanel = parseInt(b.startPanel, 10) || 1; b.changeBy = parseInt(b.changeBy, 10) || 1; a.adj = b.infiniteSlides ? 0 : 1; a.width = a.$el.width(); a.height = a.$el.height(); a.outerPad = [a.$wrapper.innerWidth() - a.$wrapper.width(), a.$wrapper.innerHeight() - a.$wrapper.height()]; b.playRtl && a.$wrapper.addClass("rtl"); if (b.expand) a.$outer = a.$wrapper.parent(), a.$window.css({ width: "100%", height: "100%" }), a.checkResize(); b.buildStartStop && a.buildAutoPlay(); b.buildArrows && a.buildNextBackButtons(); if (!b.autoPlay) b.autoPlayLocked = !1; a.updateSlider(); a.$lastPage = a.$currentPage; a.runTimes = d("div.anythingSlider").index(a.$wrapper) + 1; a.regex = RegExp("panel" + a.runTimes + "-(\\d+)", "i"); a.runTimes === 1 && a.makeActive(); if (!d.isFunction(d.easing[b.easing])) b.easing = "swing"; b.pauseOnHover && a.$wrapper.hover(function () { a.playing && (a.$el.trigger("slideshow_paused", a), a.clearTimer(!0)) }, function () { a.playing && (a.$el.trigger("slideshow_unpaused", a), a.startStop(a.playing, !0)) }); a.setCurrentPage(a.gotoHash() || b.startPage, !1); a.slideControls(!1); a.$wrapper.bind("mouseenter mouseleave", function (b) { a.hovered = b.type === "mouseenter" ? !0 : !1; a.slideControls(a.hovered, !1) }); d(document).keyup(function (c) { if (b.enableKeyboard && a.$wrapper.is(".activeSlider") && !c.target.tagName.match("TEXTAREA|INPUT|SELECT") && (b.vertical || !(c.which === 38 || c.which === 40))) switch (c.which) { case 39: case 40: a.goForward(); break; case 37: case 38: a.goBack() } }); a.$items.delegate("a", "focus.AnythingSlider", function (c) { var e = d(this).closest(".panel"), e = a.$items.index(e) + a.adj; a.$items.find(".focusedLink").removeClass("focusedLink"); d(this).addClass("focusedLink"); a.$window.scrollLeft(0); if (e >= a.currentPage + b.showMultiple || e < a.currentPage) a.gotoPage(e), c.preventDefault() }); var c = "slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" "); d.each("onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "), function (g, e) { d.isFunction(b[e]) && a.$el.bind(c[g], b[e]) }); d.isFunction(b.onSlideComplete) && a.$el.bind("slide_complete", function () { setTimeout(function () { b.onSlideComplete(a) }, 0) }); a.initialized = !0; a.$el.trigger("initialized", a); a.startStop(a.playing) }; a.updateSlider = function () { a.$el.children(".cloned").remove(); a.$nav.empty(); a.currentPage = a.currentPage || 1; a.$items = a.$el.children(); a.pages = a.$items.length; a.dir = b.vertical ? "top" : "left"; b.showMultiple = b.vertical ? 1 : parseInt(b.showMultiple, 10) || 1; if (b.showMultiple > 1) { if (b.showMultiple > a.pages) b.showMultiple = a.pages; a.adjustMultiple = b.infiniteSlides && a.pages > 1 ? 0 : b.showMultiple - 1; a.pages = a.$items.length - a.adjustMultiple } a.$controls.add(a.$nav).add(a.$startStop).add(a.$forward).add(a.$back)[a.pages <= 1 ? "hide" : "show"](); a.pages > 1 && a.buildNavigation(); b.infiniteSlides && a.pages > 1 && (a.$el.prepend(a.$items.filter(":last").clone().removeAttr("id").addClass("cloned")), b.showMultiple > 1 ? a.$el.append(a.$items.filter(":lt(" + b.showMultiple + ")").clone().removeAttr("id").addClass("cloned").addClass("multiple")) : a.$el.append(a.$items.filter(":first").clone().removeAttr("id").addClass("cloned")), a.$el.find(".cloned").each(function () { d(this).find("a,input,textarea,select,button,area").attr("disabled", "disabled"); d(this).find("[id]").removeAttr("id") })); a.$items = a.$el.children().addClass("panel" + (b.vertical ? " vertical" : "")); a.setDimensions(); b.resizeContents ? (a.$items.css("width", a.width), a.$wrapper.css("width", a.getDim(a.currentPage)[0]), a.$wrapper.add(a.$items).css("height", a.height)) : a.$win.load(function () { a.setDimensions() }); if (a.currentPage > a.pages) a.currentPage = a.pages; a.setCurrentPage(a.currentPage, !1); a.$nav.find("a").eq(a.currentPage - 1).addClass("cur") }; a.buildNavigation = function () { if (b.buildNavigation && a.pages > 1) { var c, g; a.$items.filter(":not(.cloned)").each(function (e) { var f = e + 1; c = (f === 1 ? "first" : "") + (f === a.pages ? "last" : ""); g = d('<a href="#"></a>').addClass("panel" + f).wrap('<li class="' + c + '" />'); a.$nav.append(g.parent()); d.isFunction(b.navigationFormatter) ? (c = b.navigationFormatter(f, d(this)), g.html("<span>" + c + "</span>"), parseInt(g.find("span").css("text-indent"), 10) < 0 && g.addClass(b.tooltipClass).attr("title", c)) : g.html("<span>" + f + "</span>"); g.bind(b.clickControls, function (c) { if (!a.flag && b.enableNavigation) a.flag = !0, setTimeout(function () { a.flag = !1 }, 100), a.gotoPage(f), b.hashTags && a.setHash(f); c.preventDefault() }) }); if (b.navigationSize !== !1 && parseInt(b.navigationSize, 10) < a.pages) a.$controls.find(".anythingNavWindow").length || a.$nav.before('<ul><li class="prev"><a href="#"><span>' + b.backText + "</span></a></li></ul>").after('<ul><li class="next"><a href="#"><span>' + b.forwardText + "</span></a></li></ul>").wrap('<div class="anythingNavWindow"></div>'), a.navWidths = a.$nav.find("li").map(function () { return d(this).innerWidth() + Math.ceil(parseInt(d(this).find("span").css("left"), 10) / 2 || 0) }).get(), a.navLeft = 1, a.$nav.width(a.navWidth(1, a.pages + 1) + 5), a.$controls.find(".anythingNavWindow").width(a.navWidth(1, b.navigationSize + 1)).end().find(".prev,.next").bind(b.clickControls, function (c) { if (!a.flag) a.flag = !0, setTimeout(function () { a.flag = !1 }, 200), a.navWindow(a.navLeft + b.navigationSize * (d(this).is(".prev") ? -1 : 1)); c.preventDefault() }) } }; a.navWidth = function (b, d) { for (var e = Math.min(b, d), f = Math.max(b, d), j = 0; e < f; e++) j += a.navWidths[e - 1] || 0; return j }; a.navWindow = function (c) { var d = a.pages - b.navigationSize + 1, c = c <= 1 ? 1 : c > 1 && c < d ? c : d; if (c !== a.navLeft) a.$controls.find(".anythingNavWindow").animate({ scrollLeft: a.navWidth(1, c), width: a.navWidth(c, c + b.navigationSize) }, { queue: !1, duration: b.animationTime }), a.navLeft = c }; a.buildNextBackButtons = function () { a.$forward = d('<span class="arrow forward"><a href="#"><span>' + b.forwardText + "</span></a></span>"); a.$back = d('<span class="arrow back"><a href="#"><span>' + b.backText + "</span></a></span>"); a.$back.bind(b.clickBackArrow, function (c) { if (b.enableArrows && !a.flag) a.flag = !0, setTimeout(function () { a.flag = !1 }, 100), a.goBack(); c.preventDefault() }); a.$forward.bind(b.clickForwardArrow, function (c) { if (b.enableArrows && !a.flag) a.flag = !0, setTimeout(function () { a.flag = !1 }, 100), a.goForward(); c.preventDefault() }); a.$back.add(a.$forward).find("a").bind("focusin focusout", function () { d(this).toggleClass("hover") }); a.$back.appendTo(b.appendBackTo !== null && d(b.appendBackTo).length ? d(b.appendBackTo) : a.$wrapper); a.$forward.appendTo(b.appendForwardTo !== null && d(b.appendForwardTo).length ? d(b.appendForwardTo) : a.$wrapper); a.$arrowWidth = a.$forward.width() }; a.buildAutoPlay = function () { a.$startStop.html("<span>" + (a.playing ? b.stopText : b.startText) + "</span>").bind(b.clickSlideshow, function (c) { b.enableStartStop && (a.startStop(!a.playing), a.makeActive(), a.playing && !b.autoPlayDelayed && a.goForward(!0)); c.preventDefault() }).bind("focusin focusout", function () { d(this).toggleClass("hover") }) }; a.checkResize = function (c) { clearTimeout(a.resizeTimer); a.resizeTimer = setTimeout(function () { var d = a.$outer.width() - a.outerPad[0], e = (a.$outer[0].tagName === "BODY" ? a.$win.height() : a.$outer.height()) - a.outerPad[1]; if (a.width * b.showMultiple !== d || a.height !== e) a.setDimensions(), a.gotoPage(a.currentPage, a.playing, null, -1); typeof c === "undefined" && a.checkResize() }, 500) }; a.setDimensions = function () { var c, g, e, f = 0, j = b.showMultiple > 1 ? a.width || a.$window.width() / b.showMultiple : a.$window.width(), h = a.$win.width(); if (b.expand) c = a.$outer.width() - a.outerPad[0], a.height = g = a.$outer.height() - a.outerPad[1], a.$wrapper.add(a.$window).add(a.$items).css({ width: c, height: g }), a.width = j = b.showMultiple > 1 ? c / b.showMultiple : c; a.$items.each(function (i) { e = d(this).children(); b.resizeContents ? (c = a.width, g = a.height, d(this).css({ width: c, height: g }), e.length && e[0].tagName === "EMBED" && e.attr({ width: "100%", height: "100%" }), e.length === 1 && e.css({ width: "100%", height: "100%" })) : (c = d(this).width(), e.length === 1 && c >= h && (c = e.width() >= h ? j : e.width(), e.css("max-width", c)), d(this).css("width", c), g = e.length === 1 ? e.outerHeight(!0) : d(this).height(), d(this).css("height", g)); a.panelSize[i] = [c, g, f]; f += b.vertical ? g : c }); a.$el.css(b.vertical ? "height" : "width", f) }; a.getDim = function (c) { if (a.pages < 1 || isNaN(c)) return [a.width, a.height]; var c = b.infiniteSlides && a.pages > 1 ? c : c - 1, d, e = a.panelSize[c][0], f = a.panelSize[c][1]; if (b.showMultiple > 1) for (d = 1; d < b.showMultiple; d++) e += a.panelSize[(c + d) % b.showMultiple][0], f = Math.max(f, a.panelSize[c + d][1]); return [e, f] }; a.goForward = function (c) { a.gotoPage(a.currentPage + b.changeBy * (b.playRtl ? -1 : 1), c) }; a.goBack = function (c) { a.gotoPage(a.currentPage + b.changeBy * (b.playRtl ? 1 : -1), c) }; a.gotoPage = function (c, g, e, f) { g !== !0 && (g = !1, a.startStop(!1), a.makeActive()); /^[#|.]/.test(c) && d(c).length && (c = d(c).closest(".panel").index() + a.adj); b.changeBy !== 1 && (c < 0 && (c += a.pages), c > a.pages && (c -= a.pages)); if (!(a.pages <= 1)) { a.$lastPage = a.$currentPage; if (typeof c !== "number") c = b.startPanel, a.setCurrentPage(c); if (!g || !b.isVideoPlaying(a)) c > a.pages + 1 - a.adj && (c = !b.infiniteSlides && !b.stopAtEnd ? 1 : a.pages), c < a.adj && (c = !b.infiniteSlides && !b.stopAtEnd ? a.pages : 1), a.currentPage = c > a.pages ? a.pages : c < 1 ? 1 : a.currentPage, a.$currentPage = a.$items.eq(a.currentPage - a.adj), a.exactPage = c, a.$targetPage = a.$items.eq(c === 0 ? a.pages - a.adj : c > a.pages ? 1 - a.adj : c - a.adj), f = f || b.animationTime, f >= 0 && a.$el.trigger("slide_init", a), a.slideControls(!0, !1), g !== !0 && (g = !1), (!g || b.stopAtEnd && c === a.pages) && a.startStop(!1), f >= 0 && a.$el.trigger("slide_begin", a), setTimeout(function (d) { b.resizeContents || (d = a.getDim(c), a.$wrapper.filter(":not(:animated)").animate({ width: d[0] || a.width, height: d[1] || a.height }, { queue: !1, duration: f < 0 ? 0 : f, easing: b.easing })); d = {}; d[a.dir] = -a.panelSize[b.infiniteSlides && a.pages > 1 ? c : c - 1][2]; a.$el.filter(":not(:animated)").animate(d, { queue: !1, duration: f, easing: b.easing, complete: function () { a.endAnimation(c, e, f) } }) }, parseInt(b.delayBeforeAnimate, 10) || 0) } }; a.endAnimation = function (c, d, e) { c === 0 ? (a.$el.css(a.dir, -a.panelSize[a.pages][2]), c = a.pages) : c > a.pages && (a.$el.css(a.dir, -a.panelSize[1][2]), c = 1); a.exactPage = c; a.setCurrentPage(c, !1); a.$items.removeClass("activePage").eq(c - a.adj).addClass("activePage"); a.hovered || a.slideControls(!1); e >= 0 && a.$el.trigger("slide_complete", a); typeof d === "function" && d(a); b.autoPlayLocked && !a.playing && setTimeout(function () { a.startStop(!0) }, b.resumeDelay - (b.autoPlayDelayed ? b.delay : 0)) }; a.setCurrentPage = function (c, d) { c = parseInt(c, 10); if (!(a.pages < 1 || c === 0 || isNaN(c))) { c > a.pages + 1 - a.adj && (c = a.pages - a.adj); c < a.adj && (c = 1); b.buildNavigation && a.$nav.find(".cur").removeClass("cur").end().find("a").eq(c - 1).addClass("cur"); !b.infiniteSlides && b.stopAtEnd && (a.$wrapper.find("span.forward")[c === a.pages ? "addClass" : "removeClass"]("disabled").end().find("span.back")[c === 1 ? "addClass" : "removeClass"]("disabled"), c === a.pages && a.playing && a.startStop()); if (!d) { var e = a.getDim(c); a.$wrapper.css({ width: e[0], height: e[1] }).add(a.$window).scrollLeft(0); a.$el.css(a.dir, -a.panelSize[b.infiniteSlides && a.pages > 1 ? c : c - 1][2]) } a.currentPage = c; a.$currentPage = a.$items.removeClass("activePage").eq(c - a.adj).addClass("activePage") } }; a.makeActive = function () { a.$wrapper.is(".activeSlider") || (d(".activeSlider").removeClass("activeSlider"), a.$wrapper.addClass("activeSlider")) }; a.gotoHash = function () { var c = a.win.location.hash, g = c.indexOf("&"), e = c.match(a.regex); e === null && !/^#&/.test(c) ? (c = c.substring(0, g >= 0 ? g : c.length), e = d(c).closest(".anythingBase")[0] === a.el ? d(c).closest(".panel").index() : null) : e !== null && (e = b.hashTags ? parseInt(e[1], 10) : null); return e }; a.setHash = function (b) { var d = "panel" + a.runTimes + "-", e = a.win.location.hash; if (typeof e !== "undefined") a.win.location.hash = e.indexOf(d) > 0 ? e.replace(a.regex, d + b) : e + "&" + d + b }; a.slideControls = function (c) { var d = c ? 0 : b.animationTime, e = c ? b.animationTime : 0, f = c ? 1 : 0, h = c ? 0 : 1; b.toggleControls && a.$controls.stop(!0, !0).delay(d)[c ? "slideDown" : "slideUp"](b.animationTime / 2).delay(e); b.buildArrows && b.toggleArrows && (!a.hovered && a.playing && (h = 1, f = 0), a.$forward.stop(!0, !0).delay(d).animate({ right: h * a.$arrowWidth, opacity: f }, b.animationTime / 2), a.$back.stop(!0, !0).delay(d).animate({ left: h * a.$arrowWidth, opacity: f }, b.animationTime / 2)) }; a.clearTimer = function (b) { if (a.timer && (a.win.clearInterval(a.timer), !b && a.slideshow)) a.$el.trigger("slideshow_stop", a), a.slideshow = !1 }; a.startStop = function (c, d) { c !== !0 && (c = !1); if ((a.playing = c) && !d) a.$el.trigger("slideshow_start", a), a.slideshow = !0; b.buildStartStop && (a.$startStop.toggleClass("playing", c).find("span").html(c ? b.stopText : b.startText), parseInt(a.$startStop.find("span").css("text-indent"), 10) < 0 && a.$startStop.addClass(b.tooltipClass).attr("title", c ? b.stopText : b.startText)); c ? (a.clearTimer(!0), a.timer = a.win.setInterval(function () { b.isVideoPlaying(a) ? b.resumeOnVideoEnd || a.startStop() : a.goForward(!0) }, b.delay)) : a.clearTimer() }; a.init() }; d.anythingSlider.defaults = { theme: "default", expand: !1, resizeContents: !0, vertical: !1, showMultiple: !1, easing: "swing", buildArrows: !0, buildNavigation: !0, buildStartStop: !0, appendForwardTo: null, appendBackTo: null, appendControlsTo: null, appendNavigationTo: null, appendStartStopTo: null, toggleArrows: !1, toggleControls: !1, startText: "Start", stopText: "Stop", forwardText: "&raquo;", backText: "&laquo;", tooltipClass: "tooltip", enableArrows: !0, enableNavigation: !0, enableStartStop: !0, enableKeyboard: !0, startPanel: 1, changeBy: 1, hashTags: !0, infiniteSlides: !0, navigationFormatter: null, navigationSize: !1, autoPlay: !1, autoPlayLocked: !1, autoPlayDelayed: !1, pauseOnHover: !0, stopAtEnd: !1, playRtl: !1, delay: 3E3, resumeDelay: 15E3, animationTime: 600, delayBeforeAnimate: 0, clickForwardArrow: "click", clickBackArrow: "click", clickControls: "click focusin", clickSlideshow: "click", resumeOnVideoEnd: !0, addWmodeToObject: "opaque", isVideoPlaying: function () { return !1 } }; d.fn.anythingSlider = function (h, i) { return this.each(function () { var a, b = d(this).data("AnythingSlider"); (typeof h).match("object|undefined") ? b ? b.updateSlider() : new d.anythingSlider(this, h) : /\d/.test(h) && !isNaN(h) && b ? (a = typeof h === "number" ? h : parseInt(d.trim(h), 10), a >= 1 && a <= b.pages && b.gotoPage(a, !1, i)) : /^[#|.]/.test(h) && d(h).length && b.gotoPage(h, !1, i) }) } })(jQuery);


/*
* AnythingSlider Slide FX 1.5.7 minified for AnythingSlider v1.7.11+
* By Rob Garrison (aka Mottie & Fudgey)
* Dual licensed under the MIT and GPL licenses.
*/
(function (i) { i.fn.anythingSliderFx = function (q, r) { var n = i(this).closest(".anythingSlider"), g = n.width(), o = n.height(), p = function (c) { var a = c, l; c && typeof c === "string" && c.indexOf(",") > 0 && (c = c.split(","), a = i.trim(c[0]), l = i.trim(c[1])); return { top: [{ inFx: { top: 0 }, outFx: { top: "-" + (a || o)}}], bottom: [{ inFx: { top: 0 }, outFx: { top: a || o}}], left: [{ inFx: { left: 0 }, outFx: { left: "-" + (a || g)}}], right: [{ inFx: { left: 0 }, outFx: { left: a || g}}], fade: [{ inFx: { opacity: a || 1 }, outFx: { opacity: 0}}], expand: [{ inFx: { width: l || "100%", height: l || "100%", top: "0%", left: "0%" }, outFx: { width: a || "10%", height: a || "10%", top: "50%", left: "50%"}}], grow: [{ inFx: { top: 0, fontSize: a || "16px", opacity: 1 }, outFx: { top: "-200px", fontSize: l || "80px", opacity: 0}}], listLR: [{ inFx: { left: 0, opacity: 1 }, outFx: [{ left: a || g, opacity: 0 }, { left: "-" + (a || g), opacity: 0}], selector: [":odd", ":even"]}], listRL: [{ inFx: { left: 0, opacity: 1 }, outFx: [{ left: a || g, opacity: 0 }, { left: "-" + (a || g), opacity: 0}], selector: [":even", ":odd"]}], "caption-Top": [{ inFx: { top: 0, opacity: 0.8 }, outFx: { top: "-" + a || -50, opacity: 0}}], "caption-Right": [{ inFx: { right: 0, opacity: 0.8 }, outFx: { right: "-" + a || -150, opacity: 0}}], "caption-Bottom": [{ inFx: { bottom: 0, opacity: 0.8 }, outFx: { bottom: "-" + a || -50, opacity: 0}}], "caption-Left": [{ inFx: { left: 0, opacity: 0.8 }, outFx: { left: "-" + a || -150, opacity: 0}}]} }; return this.each(function () { i(this).data("AnythingSlider").fx = q; var c = i.extend({ easing: "swing", timeIn: 400, timeOut: 350, stopRepeat: !1, outFxBind: "slide_init", inFxBind: "slide_complete" }, r), a = p(), l = function (a, b, e, c) { if (!(a.length === 0 || typeof b === "undefined")) { var d = b[0] || b, f = d[1] || "", c = c || parseInt(f === "" ? d.duration : d[0].duration, 10); if (e && (a.css("position") !== "absolute" && a.css({ position: "relative" }), a.stop(), f !== "")) { a.filter(b[1][0]).animate(d[0], { queue: !1, duration: c, easing: d[0].easing }); a.filter(b[1][1]).animate(f, { queue: !0, duration: c, easing: d[0].easing }); return } a.animate(d, { queue: !0, duration: c, easing: d.easing }) } }, g = function (k, b) { var e, j = b ? "outFx" : "inFx", d = {}, f = b ? c.timeOut : c.timeIn, h = i.trim(k[0].replace(/\s+/g, " ")).split(" "); if (b && h.length === 1 && a.hasOwnProperty(h) && typeof a[h][0].selector !== "undefined") return e = a[h][0].outFx, e[0].duration = k[2] || c.timeOut, e[0].easing = k[3] || c.easing, [e, a[h][0].selector || []]; i.each(h, function (e, h) { if (a.hasOwnProperty(h)) { var g = typeof k[1] === "undefined" || k[1] === "", g = g ? a : p(k[1]); i.extend(!0, d, g[h][0][j]); g = k[2] || d.duration || f; d.duration = b ? g / 2 : g; d.easing = isNaN(k[3]) ? k[3] || c.easing : k[4] || c.easing } }); return [d] }, m = i(this).bind(c.outFxBind, function (a, b) { if (!(c.stopRepeat && b.$lastPage[0] === b.$targetPage[0])) { var e, j, d, f = b.$lastPage.add(b.$items.eq(b.exactPage)).add(b.$targetPage), h = b.fx; b.exactPage === 0 && (f = f.add(b.$items.eq(b.pages))); b.options.animationTime < c.timeOut && (d = b.options.animationTime || c.timeOut); f = f.find("*").andSelf(); for (e in h) if (e === "outFx") for (j in h.outFx) f.filter(j).length && l(f.filter(j), h.outFx[j], !0); else e !== "inFx" && i.isArray(h[e]) && f.filter(e).length && l(f.filter(e), g(h[e], !0), !0, d) } }).bind(c.inFxBind, function (a, b) { if (!(c.stopRepeat && b.$lastPage[0] === b.$targetPage[0])) { var e, j, d = b.$currentPage.add(b.$items.eq(b.exactPage)), f = b.fx, d = d.find("*").andSelf(); for (e in f) if (e === "inFx") for (j in f.inFx) d.filter(j).length && l(d.filter(j), f.inFx[j], !1); else e !== "outFx" && i.isArray(f[e]) && d.filter(e).length && l(d.filter(e), g(f[e], !1), !1) } }).data("AnythingSlider"); i(window).load(function () { m.gotoPage(m.currentPage, m.playing) }) }) } })(jQuery);

