/*
 * jQuery Address Plugin v1.4
 * http://www.asual.com/jquery/address/
 *
 * Copyright (c) 2009-2010 Rostislav Hristov
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Date: 2011-05-04 14:22:12 +0300 (Wed, 04 May 2011)
 */
(function(c){c.address=function(){var v=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},e=c.address.parameterNames(),f=0,p=e.length;f<p;f++)b[e[f]]=c.address.parameter(e[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:e,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},w=function(){c().bind.apply(c(c.address),Array.prototype.slice.call(arguments));return c.address},r=function(){return M.pushState&&
d.state!==k},s=function(){return("/"+g.pathname.replace(new RegExp(d.state),"")+g.search+(D()?"#"+D():"")).replace(U,"/")},D=function(){var a=g.href.indexOf("#");return a!=-1?B(g.href.substr(a+1),l):""},u=function(){return r()?s():D()},ha=function(){return"javascript"},N=function(a){a=a.toString();return(d.strict&&a.substr(0,1)!="/"?"/":"")+a},B=function(a,b){if(d.crawlable&&b)return(a!==""?"!":"")+a;return a.replace(/^\!/,"")},x=function(a,b){return parseInt(a.css(b),10)},V=function(a){for(var b,
e,f=0,p=a.childNodes.length;f<p;f++){try{if("src"in a.childNodes[f]&&a.childNodes[f].src)b=String(a.childNodes[f].src)}catch(J){}if(e=V(a.childNodes[f]))b=e}return b},F=function(){if(!K){var a=u();if(h!=a)if(y&&q<7)g.reload();else{y&&q<8&&d.history&&t(O,50);h=a;E(l)}}},E=function(a){v(W);v(a?X:Y);t(Z,10)},Z=function(){if(d.tracker!=="null"&&d.tracker!==null){var a=c.isFunction(d.tracker)?d.tracker:j[d.tracker],b=(g.pathname+g.search+(c.address&&!r()?c.address.value():"")).replace(/\/\//,"/").replace(/^\/$/,
"");if(c.isFunction(a))a(b);else if(c.isFunction(j.urchinTracker))j.urchinTracker(b);else if(j.pageTracker!==k&&c.isFunction(j.pageTracker._trackPageview))j.pageTracker._trackPageview(b);else j._gaq!==k&&c.isFunction(j._gaq.push)&&j._gaq.push(["_trackPageview",decodeURI(b)])}},O=function(){var a=ha()+":"+l+";document.open();document.writeln('<html><head><title>"+n.title.replace("'","\\'")+"</title><script>var "+C+' = "'+encodeURIComponent(u())+(n.domain!=g.hostname?'";document.domain="'+n.domain:
"")+"\";<\/script></head></html>');document.close();";if(q<7)m.src=a;else m.contentWindow.location.replace(a)},aa=function(){if(G&&$!=-1){var a,b=G.substr($+1).split("&");for(i=0;i<b.length;i++){a=b[i].split("=");if(/^(autoUpdate|crawlable|history|strict|wrap)$/.test(a[0]))d[a[0]]=isNaN(a[1])?/^(true|yes)$/i.test(a[1]):parseInt(a[1],10)!==0;if(/^(state|tracker)$/.test(a[0]))d[a[0]]=a[1]}G=null}h=u()},ca=function(){if(!ba){ba=o;aa();var a=function(){ia.call(this);ja.call(this)},b=c("body").ajaxComplete(a);
a();if(d.wrap){c("body > *").wrapAll('<div style="padding:'+(x(b,"marginTop")+x(b,"paddingTop"))+"px "+(x(b,"marginRight")+x(b,"paddingRight"))+"px "+(x(b,"marginBottom")+x(b,"paddingBottom"))+"px "+(x(b,"marginLeft")+x(b,"paddingLeft"))+'px;" />').parent().wrap('<div id="'+C+'" style="height:100%;overflow:auto;position:relative;'+(H&&!window.statusbar.visible?"resize:both;":"")+'" />');c("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"});H&&c('<style type="text/css" />').appendTo("head").text("#"+
C+"::-webkit-resizer { background-color: #fff; }")}if(y&&q<8){a=n.getElementsByTagName("frameset")[0];m=n.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",m);a[a.cols?"cols":"rows"]+=",0";m.noResize=o;m.frameBorder=m.frameSpacing=0}else{m.style.display="none";m.style.width=m.style.height=0;m.tabIndex=-1;n.body.insertAdjacentElement("afterBegin",m)}t(function(){c(m).bind("load",function(){var e=m.contentWindow;h=e[C]!==k?e[C]:"";if(h!=u()){E(l);g.hash=B(h,o)}});m.contentWindow[C]===
k&&O()},50)}t(function(){v("init");E(l)},1);if(!r())if(y&&q>7||!y&&"on"+I in j)if(j.addEventListener)j.addEventListener(I,F,l);else j.attachEvent&&j.attachEvent("on"+I,F);else ka(F,50)}},ia=function(){var a,b=c("a"),e=b.size(),f=-1,p=function(){if(++f!=e){a=c(b.get(f));a.is('[rel*="address:"]')&&a.address();t(p,1)}};t(p,1)},la=function(){if(h!=u()){h=u();E(l)}},ma=function(){if(j.removeEventListener)j.removeEventListener(I,F,l);else j.detachEvent&&j.detachEvent("on"+I,F)},ja=function(){if(d.crawlable){var a=
g.pathname.replace(/\/$/,"");c("body").html().indexOf("_escaped_fragment_")!=-1&&c('a[href]:not([href^=http]), a[href*="'+document.domain+'"]').each(function(){var b=c(this).attr("href").replace(/^http:/,"").replace(new RegExp(a+"/?$"),"");if(b===""||b.indexOf("_escaped_fragment_")!=-1)c(this).attr("href","#"+b.replace(/\/(.*)\?_escaped_fragment_=(.*)$/,"!$2"))})}},k,C="jQueryAddress",I="hashchange",W="change",X="internalChange",Y="externalChange",o=true,l=false,d={autoUpdate:o,crawlable:l,history:o,
strict:o,wrap:l},z=c.browser,q=parseFloat(c.browser.version),da=z.mozilla,y=z.msie,ea=z.opera,H=z.webkit||z.safari,P=l,j=function(){try{return top.document!==k?top:window}catch(a){return window}}(),n=j.document,M=j.history,g=j.location,ka=setInterval,t=setTimeout,U=/\/{2,9}/g;z=navigator.userAgent;var m,G=V(document),$=G?G.indexOf("?"):-1,Q=n.title,K=l,ba=l,R=o,fa=o,L=l,h=u();if(y){q=parseFloat(z.substr(z.indexOf("MSIE")+4));if(n.documentMode&&n.documentMode!=q)q=n.documentMode!=8?7:8;var ga=n.onpropertychange;
n.onpropertychange=function(){ga&&ga.call(n);if(n.title!=Q&&n.title.indexOf("#"+u())!=-1)n.title=Q}}if(P=da&&q>=1||y&&q>=6||ea&&q>=9.5||H&&q>=523){if(ea)history.navigationMode="compatible";if(document.readyState=="complete")var na=setInterval(function(){if(c.address){ca();clearInterval(na)}},50);else{aa();c(ca)}c(window).bind("popstate",la).bind("unload",ma)}else!P&&D()!==""?g.replace(g.href.substr(0,g.href.indexOf("#"))):Z();return{bind:function(a,b,e){return w(a,b,e)},init:function(a){return w("init",
a)},change:function(a){return w(W,a)},internalChange:function(a){return w(X,a)},externalChange:function(a){return w(Y,a)},baseURL:function(){var a=g.href;if(a.indexOf("#")!=-1)a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},autoUpdate:function(a){if(a!==k){d.autoUpdate=a;return this}return d.autoUpdate},crawlable:function(a){if(a!==k){d.crawlable=a;return this}return d.crawlable},history:function(a){if(a!==k){d.history=a;return this}return d.history},state:function(a){if(a!==
k){d.state=a;var b=s();if(d.state!==k)if(M.pushState)b.substr(0,3)=="/#/"&&g.replace(d.state.replace(/^\/$/,"")+b.substr(2));else b!="/"&&b.replace(/^\/#/,"")!=D()&&t(function(){g.replace(d.state.replace(/^\/$/,"")+"/#"+b)},1);return this}return d.state},strict:function(a){if(a!==k){d.strict=a;return this}return d.strict},tracker:function(a){if(a!==k){d.tracker=a;return this}return d.tracker},wrap:function(a){if(a!==k){d.wrap=a;return this}return d.wrap},update:function(){L=o;this.value(h);L=l;return this},
title:function(a){if(a!==k){t(function(){Q=n.title=a;if(fa&&m&&m.contentWindow&&m.contentWindow.document){m.contentWindow.document.title=a;fa=l}if(!R&&da)g.replace(g.href.indexOf("#")!=-1?g.href:g.href+"#");R=l},50);return this}return n.title},value:function(a){if(a!==k){a=N(a);if(a=="/")a="";if(h==a&&!L)return;R=o;h=a;if(d.autoUpdate||L){E(o);if(r())M[d.history?"pushState":"replaceState"]({},"",d.state.replace(/\/$/,"")+(h===""?"/":h));else{K=o;if(H)if(d.history)g.hash="#"+B(h,o);else g.replace("#"+
B(h,o));else if(h!=u())if(d.history)g.hash="#"+B(h,o);else g.replace("#"+B(h,o));y&&q<8&&d.history&&t(O,50);if(H)t(function(){K=l},1);else K=l}}return this}if(!P)return null;return N(h)},path:function(a){if(a!==k){var b=this.queryString(),e=this.hash();this.value(a+(b?"?"+b:"")+(e?"#"+e:""));return this}return N(h).split("#")[0].split("?")[0]},pathNames:function(){var a=this.path(),b=a.replace(U,"/").split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-
1,1);return b},queryString:function(a){if(a!==k){var b=this.hash();this.value(this.path()+(a?"?"+a:"")+(b?"#"+b:""));return this}a=h.split("?");return a.slice(1,a.length).join("?").split("#")[0]},parameter:function(a,b,e){var f,p;if(b!==k){var J=this.parameterNames();p=[];b=b?b.toString():"";for(f=0;f<J.length;f++){var S=J[f],A=this.parameter(S);if(typeof A=="string")A=[A];if(S==a)A=b===null||b===""?[]:e?A.concat([b]):[b];for(var T=0;T<A.length;T++)p.push(S+"="+A[T])}c.inArray(a,J)==-1&&b!==null&&
b!==""&&p.push(a+"="+b);this.queryString(p.join("&"));return this}if(b=this.queryString()){e=[];p=b.split("&");for(f=0;f<p.length;f++){b=p[f].split("=");b[0]==a&&e.push(b.slice(1).join("="))}if(e.length!==0)return e.length!=1?e:e[0]}},parameterNames:function(){var a=this.queryString(),b=[];if(a&&a.indexOf("=")!=-1){a=a.split("&");for(var e=0;e<a.length;e++){var f=a[e].split("=")[0];c.inArray(f,b)==-1&&b.push(f)}}return b},hash:function(a){if(a!==k){this.value(h.split("#")[0]+(a?"#"+a:""));return this}a=
h.split("#");return a.slice(1,a.length).join("#")}}}();c.fn.address=function(v){if(!c(this).attr("address")){var w=function(r){if(r.shiftKey||r.ctrlKey||r.metaKey)return true;if(c(this).is("a")){var s=v?v.call(this):/address:/.test(c(this).attr("rel"))?c(this).attr("rel").split("address:")[1].split(" ")[0]:c.address.state()!==undefined&&c.address.state()!="/"?c(this).attr("href").replace(new RegExp("^(.*"+c.address.state()+"|\\.)"),""):c(this).attr("href").replace(/^(#\!?|\.)/,"");c.address.value(s);
r.preventDefault()}};c(this).click(w).live("click",w).live("submit",function(r){if(c(this).is("form")){var s=c(this).attr("action");s=v?v.call(this):(s.indexOf("?")!=-1?s.replace(/&$/,""):s+"?")+c(this).serialize();c.address.value(s);r.preventDefault()}}).attr("address",true)}return this}})(jQuery);

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

jQuery.fn.extend({
   findPos : function() {
       obj = jQuery(this).get(0);
       var curleft = obj.offsetLeft || 0;
       var curtop = obj.offsetTop || 0;
       while (obj = obj.offsetParent) {
                curleft += obj.offsetLeft
                curtop += obj.offsetTop
       }
       return {x:curleft,y:curtop};
   }
});
// page init
var nav;
var contactform = false;
(function($){
	$("#main .main-holder .ref img").each(function(){
		$(this).mouseover(function(){
			$(this).parent().find(".details a").addClass("hover");
		});
		$(this).mouseout(function(){
			$(this).parent().find(".details a").removeClass("hover");
		});
	});
	if( $.browser.msie != true && $.browser.opera != true && !($.browser.mozilla == true && $.browser.version.slice(0,3) <= 4.6) ) {
		$.address.init(function(event) {
			$('ul#nav a').each(function(){
				if($(this).attr('href') != undefined && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/.*/) != null && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/sites\/default\/files.*/) == null && $(this).attr('href').match(/^#.*/) == null&& $(this).attr('href').match(/^\/contact/) == null){
					$(this).address();
				}
			});
			if(event.path.match(/^\/((services)|(labs)|(references))$/) != null || event.path.match(/^\/.*\/labs$/) != null ) {
				$('div#main .main-holder a').each(function(){
					if($(this).attr('href') != undefined && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/.*/) != null && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/sites\/default\/files.*/) == null && $(this).attr('href').match(/^#.*/) == null){
						$(this).address();
					}
				});
			}else if(event.path.match(/^\/.*\/references$/) != null ){
				$('div#main .main-holder a, div#reference a').each(function(){
					if($(this).attr('href') != undefined && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/.*/) != null && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/sites\/default\/files.*/) == null && $(this).attr('href').match(/^#.*/) == null){
						$(this).address();
					}
				});
			}else{
				$('div#header .visual a, div#main .three-columns a, div#main .news a').each(function(){
					if($(this).attr('href') != undefined && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/.*/) != null && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/sites\/default\/files.*/) == null && $(this).attr('href').match(/^#.*/) == null){
						$(this).address();
					}
				});
			}
		});
		$.address.state('http://www.mmdev.fr/');
		$.address.change(function(event) {
			var current_page = (document.location.href).replace(/\/#$/, '').replace(/\/$/, '');
			var navigate_to = ($.address.state().replace(/\/$/, '') + event.value).replace(/\/$/, '');

			// if user lands on a page, don't reload the page. (bug in jQuery Address?)
			//alert("current_page : "+current_page+"\n\rNavigate To: "+navigate_to+"\n\r hash : "+window.location.href);
			if( current_page == navigate_to ) { return; }

			var value = $.address.state().replace(/\/$/, '') + event.value;
			if(contactform){
				$("#nav .contact").click();
			}
			//alert("current page : "+current_page+"\n\rNavigate To : "+navigate_to+"\n\rValue : "+value+"\n\rEvent Value : "+event.value);
			if( event.value == '/' ) {
				$("body").css("background-color",'#FFFFFF');
				$("#header").css("overflow","hidden");
				$('#header .header-holder .header_container').fadeOut(1000);
				$("#header").animate({height:648},1000);
				$("#main").fadeOut(1000);
				$("#wrapper").animate({'padding-top':648},1000,function(){
					var div_content = $('#main');
					var div_header = $('#header .header-holder .header_container');
					var request = $.ajax(
										{ url:value, 
										dataType:'html',
										success:function(data){
											// update page title
											title = data.match(/<title>([^<]+)<\/title>/);
											document.title = title[1];
											body_class = data.match(/<body class\=\"([^<]+)\".*>/);
											$("body").attr("class",body_class[1]);
											var images = new Array();
											$('img', $(data)).each(function(){
												images.push( $(this).attr("src"));
											});
											menu_active = $('#header #nav li.active', $(data)).attr("class");
											id_active = menu_active.match(/.*menu-([0-9]+).*/);
											id_active = id_active[1];
											$('#header #nav li').each(function(){
												$(this).removeClass("active");
												$(this).removeClass("active-trail");
											});
											$('#header #nav li.menu-'+id_active).attr("class",menu_active);
											actionNav();
											page_content = $('#main', $(data));
											page_content = $(page_content[0]);
											// get page div.wrapper from div#content
											
											page_header = $('#header .header-holder .header_container', $(data));
											page_header = $(page_header[0]);
											div_content.html(page_content.html());
											$('#main .main-holder').slideUp(0);
											$('#main').show(0);
											div_header.html(page_header.html());
											preload_images(images, "open_page");
										}
									});
				});
			}
			reg_ref = new RegExp("\/references$");
			reg_lab = new RegExp("\/labs$");	
			if( event.value == '/services' || reg_lab.test(event.value) || reg_ref.test(event.value) ) {
				var reg_homepage = new RegExp("^"+$.address.state().replace(/\/$/, '')+"$");
				if( current_page.match(reg_homepage)){
					$("body").css("background-color",'#EFEFEF');
					$("#header").css("overflow","hidden");
					$('#header .header-holder .header_container').fadeOut(1000);
					$("#header").animate({height:272},1000);
					$('#main object').remove();
					$('#main div:not(.news)').remove();
					$("#wrapper").animate({'padding-top':272},1000,function(){
						var div_content = $('#main');
						var div_header = $('#header .header-holder .header_container');
						var request = $.ajax(
											{ url:value, 
											dataType:'html',
											success:function(data){
												// update page title
												title = data.match(/<title>([^<]+)<\/title>/);
												document.title = title[1];
												body_class = data.match(/<body class\=\"([^<]+)\".*>/);
												$("body").attr("class",body_class[1]);
												var images = new Array();
												$('img', $(data)).each(function(){
													images.push( $(this).attr("src"));
												});
												menu_active = $('#header #nav li.active', $(data)).attr("class");
												id_active = menu_active.match(/.*menu-([0-9]+).*/);
												id_active = id_active[1];
												$('#header #nav li').each(function(){
													$(this).removeClass("active");
													$(this).removeClass("active-trail");
												});
												$('#header #nav li.menu-'+id_active).attr("class",menu_active);
												actionNav();
												page_content = $('#main', $(data));
												page_content = $(page_content[0]);
												// get page div.wrapper from div#content
												
												page_header = $('#header .header-holder .header_container', $(data));
												page_header = $(page_header[0]);
												div_content.html(page_content.html());
												$('#main .main-holder').slideUp(0);
												$('#main').show(0);
												div_header.html(page_header.html());
												preload_images(images, "open_page");
											}
										});
					});
				}else{
					var reg = new RegExp("^"+$.address.state().replace(/\/$/, '')+"\/([^<]+)/([^<]+)$");
					var segments = current_page.match(reg);
					if(segments == null){
						reg = new RegExp("^"+$.address.state().replace(/\/$/, '')+"\/([^<]+)$");
						segments = current_page.match(reg);
					}
					var source = segments[segments.length-1];
					
					if(source == "references" && reg_ref.test(event.value) && event.value != "/references"){
						if(segments.length == 3){
							$("#reference").css("height",$("#reference").height());
							$("#reference .content").fadeOut(500,function(){
															var request = $.ajax(
															{ url:value, 
															dataType:'html',
															success:function(data){
																// update page title
																title = data.match(/<title>([^<]+)<\/title>/);
																document.title = title[1];
																body_class = data.match(/<body class\=\"([^<]+)\".*>/);
																$("body").attr("class",body_class[1]);
																var images = new Array();
																$('#reference img', $(data)).each(function(){
																	images.push( $(this).attr("src"));
																});
																page_content = $('#reference .content', $(data));
																page_content = $(page_content[0]);
																$("#reference .content").html(page_content.html());
																preload_images(images, "open_ref");
															}
															});
														});
						}else{
							$('<div class="main-holder"></div><div id="reference"><div class="content"></div></div>').insertBefore("#main .main-holder");
							$("#reference").css("height",0);
							$("#reference .content").hide(0);
							var request = $.ajax(
								{ url:value, 
								dataType:'html',
								success:function(data){
									// update page title
									title = data.match(/<title>([^<]+)<\/title>/);
									document.title = title[1];
									body_class = data.match(/<body class\=\"([^<]+)\".*>/);
									$("body").attr("class",body_class[1]);
									var images = new Array();
									$('#reference img', $(data)).each(function(){
										images.push( $(this).attr("src"));
									});
									page_content = $('#reference .content', $(data));
									page_content = $(page_content[0]);
									$("#reference .content").html(page_content.html());
									preload_images(images, "open_ref");
								}
							});
						}
					}else if(event.value == "/references" && source == "references"){
						$("#reference").slideUp(500,function(){
							$("#main .main-holder").eq(0).remove();
							$("#reference").remove();
						});
					}else{
						$("#main blockquote").css("margin-top",$("#main .main-holder").height());
						$('#header .header-holder .header_container h1').fadeOut(0);
						$("#main .title").fadeOut(0);
						$("#main .main-holder").fadeOut(0,function(){
							var div_content = $('#main');
							var div_header = $('#header .header-holder .header_container');
							var request = $.ajax(
												{ url:value, 
												dataType:'html',
												success:function(data){
													// update page title
													title = data.match(/<title>([^<]+)<\/title>/);
													document.title = title[1];
													body_class = data.match(/<body class\=\"([^<]+)\".*>/);
													$("body").attr("class",body_class[1]);
													var images = new Array();
													$('img', $(data)).each(function(){
														images.push( $(this).attr("src"));
													});
													menu_active = $('#header #nav li.active', $(data)).attr("class");
													id_active = menu_active.match(/.*menu-([0-9]+).*/);
													id_active = id_active[1];
													$('#header #nav li').each(function(){
														$(this).removeClass("active");
														$(this).removeClass("active-trail");
													});
													$('#header #nav li.menu-'+id_active).attr("class",menu_active);
													actionNav();
													page_content = $('#main', $(data));
													page_content = $(page_content[0]);
													// get page div.wrapper from div#content
													
													page_header = $('#header .header-holder .header_container', $(data));
													page_header = $(page_header[0]);
													div_content.html(page_content.html());
													$('#main .main-holder').slideUp(0);
													$('#main').show(0);
													$("#header .header-holder .header_container h1").hide(0);
													div_header.html(page_header.html());
													preload_images(images, "open_page2");
												}
											});
						});
					}
				}
			}
			var loaded = 0;
			var toload = 0;
			var functiontocall = "";
			function preload_images(images, func){
				toload = images.length;
				if(toload == 0){
					eval(func+"()");
				}
				functiontocall = func;
				for (index in images){
					var img = new Image();
					img.src = images[index];
					if(!img.complete){
						jQuery(img).bind('error load onreadystatechange', onImgComplete);
					} else {
						onImgComplete();
					}
				}
			}
			function onImgComplete(){
				loaded++;
				if(loaded == toload){
					eval(functiontocall+"()");
				}
			}
			function open_page(){
				// get page div#content
				$("#main .main-holder").show(0);
				initTabs();
				initAutoScalingNav({
					menuId: "tabset",
					sideClasses: true,
					minPaddings: 10
					
				});
				initRefSelector();
				$('div#main .main-holder a').each(function(){
					if($(this).attr('href') != undefined && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/.*/) != null && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/sites\/default\/files.*/) == null && $(this).attr('href').match(/^#.*/) == null){
						$(this).address();
					}
				});
				$("#main .news a").address();
				$("#main .blockquote a").address();
				$("#main .main-holder").hide(0);
				$("#main .main-holder").slideDown(1000);
				$('#header .header-holder .header_container').fadeIn();
			}
			function open_page2(){
				// get page div#content
				$("#main .main-holder").show(0);
				
				initTabs();
				initAutoScalingNav({
					menuId: "tabset",
					sideClasses: true,
					minPaddings: 10
					
				});
				initRefSelector();
				$('div#main .main-holder a').each(function(){
					if($(this).attr('href') != undefined && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/.*/) != null && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/sites\/default\/files.*/) == null && $(this).attr('href').match(/^#.*/) == null){
						$(this).address();
					}
				});
				
				$("#main .blockquote a").address();
				$("#main .main-holder").hide(0);
				$("#main .main-holder").fadeIn(1000);
				$('#header .header-holder .header_container h1').fadeIn(1000);
			}
			function open_ref(){
				// get page div#content
				$('div#reference .content a').each(function(){
					if($(this).attr('href') != undefined && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/.*/) != null && $(this).attr('href').match(/^((http)|(https)):\/\/www\.mmdev\.fr\/sites\/default\/files.*/) == null && $(this).attr('href').match(/^#.*/) == null){
						$(this).address();
					}
				});
				$("#main .blockquote a").address();
				$("#reference .content").fadeIn(1000);
				$("#reference").animate({height:$("#reference .content").height()},1000);
				y = $("#reference").findPos().y-80;
				if(window.scrollY > y+10 || window.scrollY < y-10){
					$.scrollTo(y+'px',1000,{easing:"easeInOut"});
				}
			}
		});
	}
	$(function(){
		initMenuForm();
		initFormContact();
		actionNav();
		initTabs();
		initAutoScalingNav({
			menuId: "tabset",
			sideClasses: true,
			minPaddings: 10
		});
		initRefSelector();
	});

	// init action nav
	function actionNav(){
		$('#nav').each(function(){
			var _this = $(this);
			var list = $('>li', _this);
			var linksList = $('>a', list);
			var activeClass = 'active_nav';
			_this.append('<li class="'+ activeClass +'"></li>');
			var activeItem = _this.find("." + activeClass);
			var duration = 300;
			var active = list.filter('.active:eq(0)');
			if (active.length == 0) {active = list.eq(0);}
			var positionItem;
			var activeLeft;
			
			getActivePosition(active);
			
			function getActivePosition(current){
				positionItem = current.position();
				activeLeft = positionItem.left;
				activeItem.css({
					'position': 'absolute',
					'z-index': 1,
					'width': current.width(),
					'height': current.height(),
					'left': positionItem.left + 'px'
				});
			}
			
			list.hover(
				function(){
					current = $(this);
					currentPosition = current.position();
					activeItem.stop().animate({
						'left': currentPosition.left + 'px',
						'width': current.width(),
						'heihgt': current.height()
					},{
						queue: false,
						duration: duration,
						easing: "easeOutBack"
					});
				},
				function(){
					activeItem.stop().animate({
						'left': activeLeft + 'px',
						'width': active.width(),
						'heihgt': active.height()
					},{
						queue: false,
						duration: duration,
						easing: "easeOutBack"
					});
				}
			);
			
			linksList.click(function(){
				//getActivePosition($(this).parent('li'));
				//return false;
			});
		});
	}
	function initRefSelector(){
		$("#main .main-holder .filter_refs a").each(function(){
			$(this).click(function(){
				y = $(this).findPos().y;
				if(window.scrollY > y+10 || window.scrollY < y-10){
					$.scrollTo(y+'px',1000,{easing:"easeInOut"});
				}
				$("#main .main-holder .filter_refs a").removeClass("active");
				$(this).addClass("active");
				showrefs($(this).attr("href").replace(/#/,""));
				return false;
			});
		});
		
	}
	function showrefs(term){
		if(term != ""){
			$("#main .main-holder .ref:not(."+term+")").each(function(){
				$(this).children().fadeOut(200);
			});
			$("#main .main-holder .ref."+term).each(function(){
				$(this).children().fadeIn(200);
			});
		}else{
			$("#main .main-holder .ref").each(function(){
				$(this).children().fadeIn(200);
			});
		}
	}
	function initTabs(){
		$('ul.tabset').each(function(){
			var list = $(this);
			var links = list.find('a.tab');
			links.each(function() {
				var link = $(this);
				var href = link.attr('href');
				var tab = $(href);
				if(link.hasClass('active')){
					tab.show();
					link.parent('>li').addClass('active');
				}
				
				else tab.hide();
				link.click(function(){
					links.filter('.active').each(function(){
						$(this).parent('li').removeClass('active');
						$($(this).removeClass('active').attr('href')).hide();
					});
					$(this).addClass('active');
					$(this).parent('li').addClass('active');
					tab.show();
					return false;
				});
			});
		});
	}
	function initMenuForm(){
		$("#nav").append('<li><a class="contact" href="/contact">Contact</a></li>');
		$("#nav .contact").click(function() {
			if(!contactform){
				contactform = true;
				$('form.contact .nom').val("NOM");
				$('form.contact .societe').val("SOCIETE");
				$('form.contact .mail').val("MAIL");
				$('form.contact .message').val("MESSAGE");
				$('form.contact .response').html("");
				$('#contactform').animate({
				'height': 267
				}, 1000, function() {
				//$('#contactform').fadeIn(500);
				});
				$('#main,#header').animate({
				'margin-top': '+=267'
				}, 1000, function() {
				//$('#contactform').fadeIn(500);
				});
				$(this).parent().parent().find("li.active").addClass("noactive").removeClass("active active-trail");
				$(this).parent().addClass("active");
				actionNav();
			}else{
				contactform = false;
				/*$('#contactform').fadeOut(500,function() {
					
				});*/
				$('#main,#header').animate({
						'margin-top': '-=267'
					  }, 1000);
				$('#contactform').animate({
					'height': 0
				  }, 1000, function() {
					//$('#contactform').fadeIn(500);
				  });
				  $(this).parent().parent().find("li.noactive").removeClass("noactive").addClass("active active-trail");
				  $(this).parent().removeClass("active");
				  actionNav();
			}
			return false;
		});
		$("#content a").each(function(){
			if($(this).attr("href") == "#contact"){
				$(this).click(function(){
					$("#nav .contact").click();
					$.scrollTo('0px',1000,{easing:"easeInOut"});
					return false;
				});
			}
		});
	}
	function initFormContact(){
		$('form.contact .response').hide();
		
		$('form.contact .nom').focus(function() {
			if($(this).val() == "NOM"){
				$(this).val('');
			}
		});
		$('form.contact .societe').focus(function() {
			if($(this).val() == "SOCIETE"){
				$(this).val('');
			}
		});
		$('form.contact .mail').focus(function() {
			if($(this).val() == "MAIL"){
				$(this).val('');
			}
		});
		$('form.contact .message').focus(function() {
			if($(this).val() == "MESSAGE"){
				$(this).val('');
			}
		});
		$('form.contact .nom').blur(function() {
			if($(this).val() == ""){
				$(this).val('NOM');
			}
		});
		$('form.contact .societe').blur(function() {
			if($(this).val() == ""){
				$(this).val('SOCIETE');
			}
		});
		$('form.contact .mail').blur(function() {
			if($(this).val() == ""){
				$(this).val('MAIL');
			}
		});
		$('form.contact .message').blur(function() {
			if($(this).val() == ""){
				$(this).val('MESSAGE');
			}
		});
		
		$('form.contact').submit(function() {
			nom = $(this).find(".nom").val();
			societe = $(this).find(".societe").val();
			email = $(this).find(".mail").val();
			message = $(this).find(".message").val();
			var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
			if(nom != "NOM" && message != "MESSAGE" && email!= "MAIL"){
				if(!emailReg.test(email)){
					$('form.contact .response').html("<span>L'addresse mail que vous avez renseigné n'est pas correcte. Merci de corriger.</span>");
					$('form.contact .response').fadeIn(300).delay(2000).fadeOut(300);
					return false;
				}
				if(societe == "SOCIETE"){
					$(this).find(".societe").val("");
				}
				datas = $(this).serialize();
				$.post("/contactmmdev/ajax/post", datas,
				function(callback) {
					if(callback == 1){
						$('form.contact .response').html("Votre message a bien été envoyé.").fadeIn(300).delay(1500).queue(function() {
							$('form.contact .response').fadeOut(300);
							if(contactform){
								contactform = false;

								$('#main,#header').animate({
									'margin-top': '-=267'
								}, 1000);
								$('#contactform').animate({
									'height': 0
								}, 1000);
								$("#nav .contact").parent().removeClass("active");
							}
						});;
						
					}else{
						$('form.contact .response').html("<span>Une erreur s'est produite durant l'envoi de votre message, merci de recommencer plus tard.</span>");
						$('form.contact .response').fadeIn(300).delay(2000).fadeOut(300);
					}
				});
			}else{
				$('form.contact .response').html("<span>Merci de renseigner au moins votre nom, votre e-mail et votre message pour nous contacter.</span>");
				$('form.contact .response').fadeIn(300).delay(2000).fadeOut(300);
			}
			return false;
		});
	}
})(jQuery);
function initAutoScalingNav(o) {
	if (!o.menuId) o.menuId = "nav";
	if (!o.tag) o.tag = "a";
	if (!o.spacing) o.spacing = 0;
	if (!o.constant) o.constant = 0;
	if (!o.minPaddings) o.minPaddings = 0;
	if (!o.liHovering) o.liHovering = false;
	if (!o.sideClasses) o.sideClasses = false;
	if (!o.equalLinks) o.equalLinks = false;
	if (!o.flexible) o.flexible = false;
	var nav = document.getElementById(o.menuId);
	if(nav) {
		nav.className += " scaling-active";
		var lis = nav.getElementsByTagName("li");
		var asFl = [];
		var lisFl = [];
		var width = 0;
		for (var i=0, j=0; i<lis.length; i++) {
			if(lis[i].parentNode == nav) {
				var t = lis[i].getElementsByTagName(o.tag).item(0);
				asFl.push(t);
				asFl[j++].width = t.offsetWidth;
				lisFl.push(lis[i]);
				if(width < t.offsetWidth) width = t.offsetWidth;
			}
			if(o.liHovering) {
				lis[i].onmouseover = function() {
					this.className += " hover";
				}
				lis[i].onmouseout = function() {
					this.className = this.className.replace("hover", "");
				}
			}
		}
		var menuWidth = nav.clientWidth - asFl.length*o.spacing - o.constant;
		if(o.equalLinks && width * asFl.length < menuWidth) {
			for (var i=0; i<asFl.length; i++) {
				asFl[i].width = width;
			}
		}
		width = getItemsWidth(asFl);
		if(width < menuWidth) {
			var version = navigator.userAgent.toLowerCase();
			for (var i=0; getItemsWidth(asFl) < menuWidth; i++) {
				asFl[i].width++;
				if(!o.flexible) {
					asFl[i].style.width = asFl[i].width + "px";
				}
				if(i >= asFl.length-1) i=-1;
			}
			if(o.flexible) {
				for (var i=0; i<asFl.length; i++) {
					width = (asFl[i].width - o.spacing - o.constant/asFl.length)/menuWidth*100;
					if(i != asFl.length-1) {
						lisFl[i].style.width = width + "%";
					}
					else {
						if(navigator.appName.indexOf("Microsoft Internet Explorer") == -1 || version.indexOf("msie 8") != -1 || version.indexOf("msie 9") != -1)
							lisFl[i].style.width = width + "%";
					}
				}
			}
		}
		else if(o.minPaddings > 0) {
			for (var i=0; i<asFl.length; i++) {
				asFl[i].style.paddingLeft = o.minPaddings + "px";
				asFl[i].style.paddingRight = o.minPaddings + "px";
			}
		}
		if(o.sideClasses) {
			lisFl[0].className += " first-child";
			lisFl[0].getElementsByTagName(o.tag).item(0).className += " first-child-a";
			lisFl[lisFl.length-1].className += " last-child";
			lisFl[lisFl.length-1].getElementsByTagName(o.tag).item(0).className += " last-child-a";
		}
		nav.className += " scaling-ready";
	}
	function getItemsWidth(a) {
		var w = 0;
		for(var q=0; q<a.length; q++) {
			w += a[q].width;
		}
		return w;
	}
}

// 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) {
		//alert(jQuery.easing.default);
		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;
	},
	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;
	}
});
 /*
 * jQuery Easing Compatibility v1 - http://gsgd.co.uk/sandbox/jquery.easing.php
 *
 * Adds compatibility for applications that use the pre 1.2 easing names
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */

jQuery.extend( jQuery.easing,{
	easeIn: function (x, t, b, c, d) {
		return jQuery.easing.easeInQuad(x, t, b, c, d);
	},
	easeOut: function (x, t, b, c, d) {
		return jQuery.easing.easeOutQuad(x, t, b, c, d);
	},
	easeInOut: function (x, t, b, c, d) {
		return jQuery.easing.easeInOutQuad(x, t, b, c, d);
	},
	expoin: function(x, t, b, c, d) {
		return jQuery.easing.easeInExpo(x, t, b, c, d);
	},
	expoout: function(x, t, b, c, d) {
		return jQuery.easing.easeOutExpo(x, t, b, c, d);
	},
	expoinout: function(x, t, b, c, d) {
		return jQuery.easing.easeInOutExpo(x, t, b, c, d);
	},
	bouncein: function(x, t, b, c, d) {
		return jQuery.easing.easeInBounce(x, t, b, c, d);
	},
	bounceout: function(x, t, b, c, d) {
		return jQuery.easing.easeOutBounce(x, t, b, c, d);
	},
	bounceinout: function(x, t, b, c, d) {
		return jQuery.easing.easeInOutBounce(x, t, b, c, d);
	},
	elasin: function(x, t, b, c, d) {
		return jQuery.easing.easeInElastic(x, t, b, c, d);
	},
	elasout: function(x, t, b, c, d) {
		return jQuery.easing.easeOutElastic(x, t, b, c, d);
	},
	elasinout: function(x, t, b, c, d) {
		return jQuery.easing.easeInOutElastic(x, t, b, c, d);
	},
	backin: function(x, t, b, c, d) {
		return jQuery.easing.easeInBack(x, t, b, c, d);
	},
	backout: function(x, t, b, c, d) {
		return jQuery.easing.easeOutBack(x, t, b, c, d);
	},
	backinout: function(x, t, b, c, d) {
		return jQuery.easing.easeInOutBack(x, t, b, c, d);
	}
});;

