',
+ 'warn' => $this->l('Please take a look to this following warning, maybe the ticket won\'t be generated'));
+
+ foreach($errorListTicket as $errorType => $errorList)
+ {
+ if (count($errorList))
+ {
+ $html .= ''.$titleType[$errorType];
+ foreach($errorList as $type => $error)
$html .= '
'.$type.': '.$error.' ';
$html .= '';
}
+ }
$html .= ''.$this->l('All orders which have the state').' "'.$order_state->name.' " '.
$this->l('will be available for sticker creation');
diff --git a/modules/mondialrelay/classes/MRCreateTickets.php b/modules/mondialrelay/classes/MRCreateTickets.php
index 4f18d615d..66a4553e4 100755
--- a/modules/mondialrelay/classes/MRCreateTickets.php
+++ b/modules/mondialrelay/classes/MRCreateTickets.php
@@ -274,7 +274,7 @@ class MRCreateTickets implements IMondialRelayWSMethod
{
$this->_fields['list']['Enseigne']['value'] = Configuration::get('MR_ENSEIGNE_WEBSERVICE');
$this->_fields['list']['Expe_Langage']['value'] = Configuration::get('MR_LANGUAGE');
- $this->_fields['list']['Expe_Ad1']['value'] = Configuration::get('PS_MR_SHOP_NAME');
+ $this->_fields['list']['Expe_Ad1']['value'] = Configuration::get('PS_SHOP_NAME');
$this->_fields['list']['Expe_Ad3']['value'] = Configuration::get('PS_SHOP_ADDR1');
// Deleted, cause to many failed for the process
// $this->_fields['list']['Expe_Ad4']['value'] = Configuration::get('PS_SHOP_ADDR2');
@@ -331,7 +331,7 @@ class MRCreateTickets implements IMondialRelayWSMethod
$tmp['NDossier']['value'] = $orderDetail['id_order'];
$tmp['NClient']['value'] = $orderDetail['id_customer'];
$tmp['Dest_Langage']['value'] = 'FR'; //Language::getIsoById($orderDetail['id_lang']);
- $tmp['Dest_Ad1']['value'] = $deliveriesAddress->lastname;
+ $tmp['Dest_Ad1']['value'] = $deliveriesAddress->firstname.' '.$deliveriesAddress->lastname;
$tmp['Dest_Ad2']['value'] = $deliveriesAddress->address2;
$tmp['Dest_Ad3']['value'] = $deliveriesAddress->address1;
$tmp['Dest_Ville']['value'] = $deliveriesAddress->city;
@@ -342,7 +342,6 @@ class MRCreateTickets implements IMondialRelayWSMethod
$tmp['Dest_Tel2']['value'] = $deliveriesAddress->phone_mobile;
$tmp['Dest_Mail']['value'] = $customer->email;
$tmp['Assurance']['value'] = $orderDetail['mr_ModeAss'];
-
if ($orderDetail['MR_Selected_Num'] != 'LD1' && $orderDetail['MR_Selected_Num'] != 'LDS')
{
$tmp['LIV_Rel_Pays']['value'] = $orderDetail['MR_Selected_Pays'];
@@ -511,7 +510,7 @@ class MRCreateTickets implements IMondialRelayWSMethod
*/
public function checkPreValidation()
{
- $errorList = array();
+ $errorList = array('error' => array(), 'warn' => array());
if (!$this->_mondialRelay)
$this->_mondialRelay = new MondialRelay();
@@ -521,7 +520,7 @@ class MRCreateTickets implements IMondialRelayWSMethod
'value' => Configuration::get('MR_LANGUAGE'),
'error' => $this->_mondialRelay->l('Please check your language configuration')),
'Expe_Ad1' => array(
- 'value' => Configuration::get('PS_MR_SHOP_NAME'),
+ 'value' => Configuration::get('PS_SHOP_NAME'),
'error' => $this->_mondialRelay->l('Please check your shop name configuration')),
'Expe_Ad3' => array(
'value' => Configuration::get('PS_SHOP_ADDR1'),
@@ -531,7 +530,8 @@ class MRCreateTickets implements IMondialRelayWSMethod
'error' => $this->_mondialRelay->l('Please check your city configuration')),
'Expe_CP' => array(
'value' => Configuration::get('PS_SHOP_CODE'),
- 'error' => $this->_mondialRelay->l('Please check your zipcode configuration')),
+ 'error' => $this->_mondialRelay->l('Please check your zipcode configuration'),
+ 'warn' => $this->_mondialRelay->l('It seems the layout of your zipcode country is not configured or you didn\'t set a right zipcode')),
'Expe_Pays' => array(
'value' => ((_PS_VERSION_ >= '1.4') ?
Country::getIsoById(Configuration::get('PS_SHOP_COUNTRY_ID')) :
@@ -546,16 +546,22 @@ class MRCreateTickets implements IMondialRelayWSMethod
foreach($list as $name => $tab)
{
- $tab['value'] = strtoupper($tab['value']);
+ // Mac server make an empty string instead of a cleaned string
+ // TODO : test on windows and linux server
+ $cleanedString = MRTools::replaceAccentedCharacters($tab['value']);
+ $tab['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($tab['value']);
+
if ($name == 'Expe_CP')
{
- if (!MRTools::checkZipcodeByCountry($tab['value'], array(
- 'id_country' => Configuration::get('PS_COUNTRY_DEFAULT'))))
- $errorList[$name] = $tab['error'];
+ if (!($zipcodeError = MRTools::checkZipcodeByCountry($tab['value'], array(
+ 'id_country' => Configuration::get('PS_COUNTRY_DEFAULT')))))
+ $errorList['error'][$name] = $tab['error'];
+ else if ($zipcodeError < 0)
+ $errorList['warn'][$name] = $tab['warn'];
}
else if (isset($this->_fields['list'][$name]['regexValidation']) &&
(!preg_match($this->_fields['list'][$name]['regexValidation'], $tab['value'], $matches)))
- $errorList[$name] = $tab['error'];
+ $errorList['error'][$name] = $tab['error'];
}
return $errorList;
}
diff --git a/modules/mondialrelay/classes/MRTools.php b/modules/mondialrelay/classes/MRTools.php
index 20dc7984d..741014f97 100755
--- a/modules/mondialrelay/classes/MRTools.php
+++ b/modules/mondialrelay/classes/MRTools.php
@@ -64,14 +64,14 @@ class MRTools
{
$id_country = $params['id_country'];
- $zipcodeFormat = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
+ $zipcodeFormat = Db::getInstance()->getValue('
SELECT `zip_code_format`
FROM `'._DB_PREFIX_.'country`
WHERE `id_country` = '.(int)$id_country);
- // Skip the cheking format if doesn't exist
+ // -1 to warn user that no layout exist
if (!$zipcodeFormat)
- return true;
+ return -1;
$regxMask = str_replace(
array('N', 'C', 'L'),
diff --git a/modules/mondialrelay/config.xml b/modules/mondialrelay/config.xml
index 81aca9169..486d3efa2 100755
--- a/modules/mondialrelay/config.xml
+++ b/modules/mondialrelay/config.xml
@@ -2,7 +2,7 @@
mondialrelay
-
+
diff --git a/modules/mondialrelay/docs/install.pdf b/modules/mondialrelay/docs/install.pdf
new file mode 100644
index 000000000..1565f4942
Binary files /dev/null and b/modules/mondialrelay/docs/install.pdf differ
diff --git a/modules/mondialrelay/fr.php b/modules/mondialrelay/fr.php
index 7d059d8d0..555651d85 100755
--- a/modules/mondialrelay/fr.php
+++ b/modules/mondialrelay/fr.php
@@ -4,6 +4,7 @@ global $_MODULE;
$_MODULE = array();
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_d1908b9b04e81c4b6112e38b608c49af'] = 'Merci de bien vouloir corriger les erreurs suivantes dans';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_ccce63109db30895153094de05c60fa5'] = 'la page de contact';
+$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_7c5fd3d93bd19d81953db3b374997961'] = 'Merci de jeter un oeil à la mise en garde suivante, peut-être que l\'étiquette ne sera pas générée';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_de21dc13e1ea638777fbfad49f88b332'] = 'Toutes les commandes qui auront un statut';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_a0bf3c9ac2d785f053d883b8746e91ba'] = 'seront disponibles pour la création d\'ètiquette';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_2345e28c9b93f368968be4781ed70f5c'] = 'Changer la configuration';
@@ -46,7 +47,9 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_c888438d14855d7d96a2724ee9c306b
$_MODULE['<{mondialrelay}prestashop>mondialrelay_07213a0161f52846ab198be103b5ab43'] = 'erreurs';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_cb5e100e5a9a3e7f6d1fd97512215282'] = 'erreur';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_350c1cc4343826a89f08a33bb49c6d98'] = 'Configuration du Module Mondial Relay';
-$_MODULE['<{mondialrelay}prestashop>mondialrelay_192a5439bcfb850e8885cd4b5e01ced4'] = 'Essayez de désactiver le cache et de forcer la compilation smarty si vous rencontrez le moindre problème après une mise à jour du module';
+$_MODULE['<{mondialrelay}prestashop>mondialrelay_5a2355a42ba3ab265701183c914467f2'] = 'Essayez de désactiver le cache et de forcer la compilation smarty';
+$_MODULE['<{mondialrelay}prestashop>mondialrelay_3de769f9a81eed916583d5b35c58dbdd'] = 'si vous rencontrez le moindre problème après une mise à jour du module';
+$_MODULE['<{mondialrelay}prestashop>mondialrelay_8f8b21bd013b38d1e3059557c22a57e7'] = 'Consulter le manuel pour vous guider dans la configuration de Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_d21a9f93917604d5490ad529a7cf1ff9'] = 'Pour créer un transporteur Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Remplissez et sauvegarder vos paramètres Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_94fbe32464fcfa902feed9f256439833'] = 'Créez un transporteur via le formulaire ‘’ajouter un transporteur’’ ci-dessous';
@@ -114,6 +117,7 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_ef2a1f426c2c289ed5986c7636a5d69
$_MODULE['<{mondialrelay}prestashop>mondialrelay_80a0c205cd57b22fca7f174253870300'] = 'Heures d\'ouvertures';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_2b56b60f878922093facd42284848a0c'] = 'Plus de détails';
$_MODULE['<{mondialrelay}prestashop>orderdetail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Livraison à ';
+$_MODULE['<{mondialrelay}prestashop>orderdetail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Suivre mon colis sur le site de Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée';
@@ -129,6 +133,7 @@ $_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Merci de vérifier la configuration de votre adresse 1';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Merci de vérifier la configuration de votre ville';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Merci de vérifier la configuration de votre code postal';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_74cb73eddbe6eaf556023f943fc7e1fd'] = 'Il semble que le format du code postal ne soit pas configuré ou que vous n\'avez pas défini de code postal valide';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Merci de vérifier la configuration de votre pays';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Merci de vérifier la configuration de votre téléphone';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Merci de vérifier la configuration de votre email';
diff --git a/modules/mondialrelay/images/help.png b/modules/mondialrelay/images/help.png
new file mode 100644
index 000000000..04d4851da
Binary files /dev/null and b/modules/mondialrelay/images/help.png differ
diff --git a/modules/mondialrelay/jquery-1.4.4.min.js b/modules/mondialrelay/jquery-1.4.4.min.js
deleted file mode 100644
index 8f3ca2e2d..000000000
--- a/modules/mondialrelay/jquery-1.4.4.min.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.4
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Thu Nov 11 19:04:53 2010 -0500
- */
-(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
-h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;kd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
-"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
-e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
-"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
-a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
-C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
-s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
-j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
-toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
--1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
-if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
-b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
-!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
-l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;Ha ";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
-k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
-scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
-false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML=" ";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
-1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="
";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
-"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
-c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
-else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
-if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
-attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
-b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
-c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
-arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
-d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
-c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
-8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
-"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
-d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
-B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
-"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
-0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
-(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
-break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
-q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
-l;g.sort(w);if(h)for(var i=1;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
-m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
-true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
-g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]-
-0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
-i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
-if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
-g);else if(typeof g.length==="number")for(var p=g.length;n
";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
-n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML=" ";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
-function(){var g=k,i=t.createElement("div");i.innerHTML="
";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
-p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
-t.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
-function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
-h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
-c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
-2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
-b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
-e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/\s]+\/)>/g,P={option:[1,
-""," "],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
-else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1>$2>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
-prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
-b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1>$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]===""&&!x?r.childNodes:[];for(o=k.length-
-1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
-d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
-jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
-zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
-h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
-if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
-d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
-e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/
- ';
+ ';
return '
-
+
';
@@ -417,8 +418,8 @@ class MondialRelay extends Module
{
DB::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'mr_selected`
- SET `id_order` = '.$params['order']->id.'
- WHERE `id_cart` = '.$params['cart']->id);
+ SET `id_order` = '.(int)$params['order']->id.'
+ WHERE `id_cart` = '.(int)$params['cart']->id);
}
public function hookBackOfficeHeader()
@@ -426,16 +427,17 @@ class MondialRelay extends Module
$cssFilePath = $this->_path.'style.css';
$jsFilePath= $this->_path.'mondialrelay.js';
- $ret = '';
+ $ret = '';
if (Tools::getValue('tab') == 'AdminMondialRelay')
- $ret = '
+ $ret .= self::getJqueryCompatibility(true);
+
+ $ret .= '
- '.
- self::getJqueryCompatibility(true);
+ ';
+ return $ret;
return $ret;
}
@@ -477,13 +479,14 @@ class MondialRelay extends Module
if (!Validate::isUnsignedInt(Tools::getValue('id_order_state')))
$this->_postErrors[] = $this->l('Invalid order state');
}
+ /*
else if (Tools::isSubmit('PS_MRSubmitFieldPersonalization'))
{
$addr1 = Tools::getValue('Expe_ad1');
if (!preg_match('#^[0-9A-Z_\-\'., /]{2,32}$#', strtoupper($addr1), $match))
$this->_postErrors[] = $this->l('The Main address submited hasn\'t a good format');
+ }*/
}
- }
private function _postProcess()
{
@@ -530,12 +533,13 @@ class MondialRelay extends Module
public function hookOrderDetailDisplayed($params)
{
$res = Db::getInstance()->getRow('
- SELECT s.`MR_Selected_LgAdr1`, s.`MR_Selected_LgAdr2`, s.`MR_Selected_LgAdr3`, s.`MR_Selected_LgAdr4`, s.`MR_Selected_CP`, s.`MR_Selected_Ville`, s.`MR_Selected_Pays`, s.`MR_Selected_Num`
+ SELECT s.`MR_Selected_LgAdr1`, s.`MR_Selected_LgAdr2`, s.`MR_Selected_LgAdr3`, s.`MR_Selected_LgAdr4`, s.`MR_Selected_CP`, s.`MR_Selected_Ville`, s.`MR_Selected_Pays`, s.`MR_Selected_Num`, s.`url_suivi`
FROM `'._DB_PREFIX_.'mr_selected` s
WHERE s.`id_cart` = '.$params['order']->id_cart);
if ((!$res) OR ($res['MR_Selected_Num'] == 'LD1') OR ($res['MR_Selected_Num'] == 'LDS'))
return '';
$this->context->smarty->assign('mr_addr', $res['MR_Selected_LgAdr1'].($res['MR_Selected_LgAdr1'] ? ' - ' : '').$res['MR_Selected_LgAdr2'].($res['MR_Selected_LgAdr2'] ? ' - ' : '').$res['MR_Selected_LgAdr3'].($res['MR_Selected_LgAdr3'] ? ' - ' : '').$res['MR_Selected_LgAdr4'].($res['MR_Selected_LgAdr4'] ? ' - ' : '').$res['MR_Selected_CP'].' '.$res['MR_Selected_Ville'].' - '.$res['MR_Selected_Pays']);
+ $smarty->assign('mr_url', $res['url_suivi']);
return $this->display(__FILE__, 'orderDetail.tpl');
}
@@ -548,7 +552,7 @@ class MondialRelay extends Module
/*
** Update the carrier id to use the new one if changed
- */
+ */
public function hookupdateCarrier($params)
{
if ((int)($params['id_carrier']) != (int)($params['carrier']->id))
@@ -557,14 +561,14 @@ class MondialRelay extends Module
INSERT INTO `'._DB_PREFIX_.'mr_method`
(mr_Name, mr_Pays_list, mr_ModeCol, mr_ModeLiv, mr_ModeAss, id_carrier)
(
- SELECT
- mr_Name,
- mr_Pays_list,
- mr_ModeCol,
- mr_ModeLiv,
- mr_ModeAss,
- "'.(int)$params['carrier']->id.'"
- FROM `'._DB_PREFIX_.'mr_method`
+ SELECT
+ mr_Name,
+ mr_Pays_list,
+ mr_ModeCol,
+ mr_ModeLiv,
+ mr_ModeAss,
+ "'.(int)$params['carrier']->id.'"
+ FROM `'._DB_PREFIX_.'mr_method`
WHERE id_carrier ='.(int)$params['id_carrier'].')');
}
}
@@ -606,9 +610,8 @@ class MondialRelay extends Module
Configuration::get('MR_LANGUAGE') == '')
return '';
- $address = new Address((int)($this->context->cart->id_address_delivery));
+ $address = new Address($this->context->cart->id_address_delivery);
$id_zone = Address::getZoneById((int)($address->id));
- //$country = new Country((int)($address->id_country));
$carriersList = self::_getCarriers();
// Check if the defined carrier are ok
@@ -629,18 +632,19 @@ class MondialRelay extends Module
unset($carriersList[$k]);
}
}
-
+
$preSelectedRelay = $this->getRelayPointSelected($params['cart']->id);
- $this->context->smarty->assign( array(
+ $this->context->smarty->assign(array(
'one_page_checkout' => (Configuration::get('PS_ORDER_PROCESS_TYPE') ? Configuration::get('PS_ORDER_PROCESS_TYPE') : 0),
'new_base_dir' => self::$moduleURL,
'MRToken' => self::$MRFrontToken,
'carriersextra' => $carriersList,
'preSelectedRelay' => isset($preSelectedRelay['MR_selected_num']) ? $preSelectedRelay['MR_selected_num'] : '',
- 'jQueryOverload' => self::getJqueryCompatibility()));
+ 'jQueryOverload' => self::getJqueryCompatibility(false)
+ ));
- return $this->display(__FILE__, 'mondialrelay.tpl');
- }
+ return $this->display(__FILE__, 'mondialrelay.tpl');
+ }
public function getContent()
{
@@ -666,10 +670,17 @@ class MondialRelay extends Module
self::mrDelete((int)($_GET['delete_mr']));
$this->_html .= ''.$this->l('Configure Mondial Relay Rate Module').'
-
- '.
- $this->l('Try to turn off the cache and put the force compilation to on if you have any problems with the module after an update').'
+
+
+
+ '.$this->l('Have a look to the following HOW-TO to help you to configure the Mondial Relay module').'
+
+
+
'.$this->l('To create a Mondial Relay carrier').
@@ -1165,14 +1176,14 @@ class MondialRelay extends Module
LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs
ON (mrs.`id_cart` = o.`id_cart`)
LEFT JOIN `'._DB_PREFIX_.'mr_method` mr
- ON (mr.`id_carrier` = ca.`id_carrier`)
+ ON (mr.`id_mr_method` = mrs.`id_method`)
LEFT JOIN `'._DB_PREFIX_.'customer` c
ON (c.`id_customer` = o.`id_customer`)
WHERE (
- SELECT moh.`id_order_state`
- FROM `'._DB_PREFIX_.'order_history` moh
- WHERE moh.`id_order` = o.`id_order`
- ORDER BY moh.`date_add` DESC LIMIT 1) = '.(int)($id_order_state);
+ SELECT moh.`id_order_state`
+ FROM `'._DB_PREFIX_.'order_history` moh
+ WHERE moh.`id_order` = o.`id_order`
+ ORDER BY moh.`date_add` DESC LIMIT 1) = '.(int)($id_order_state);
}
public static function ordersSQLQuery1_3($id_order_state)
@@ -1190,19 +1201,19 @@ class MondialRelay extends Module
mrs.`MR_Selected_Pays` as MR_Selected_Pays, mrs.`exp_number` as exp_number,
mr.`mr_ModeCol` as mr_ModeCol, mr.`mr_ModeLiv` as mr_ModeLiv, mr.`mr_ModeAss` as mr_ModeAss
FROM `'._DB_PREFIX_.'orders` o
- LEFT JOIN `'._DB_PREFIX_.'carrier` ca
+ LEFT JOIN `'._DB_PREFIX_.'carrier` ca
ON (ca.`id_carrier` = o.`id_carrier`
AND ca.`name` = "mondialrelay")
- LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs
+ LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs
ON (mrs.`id_cart` = o.`id_cart`)
LEFT JOIN `'._DB_PREFIX_.'mr_method` mr
- ON (mr.`id_carrier` = ca.`id_carrier`)
+ ON (mr.`id_mr_method` = mrs.`id_method`)
LEFT JOIN `'._DB_PREFIX_.'customer` c
ON (c.`id_customer` = o.`id_customer`)
WHERE (
- SELECT moh.`id_order_state`
- FROM `'._DB_PREFIX_.'order_history` moh
- WHERE moh.`id_order` = o.`id_order`
+ SELECT moh.`id_order_state`
+ FROM `'._DB_PREFIX_.'order_history` moh
+ WHERE moh.`id_order` = o.`id_order`
ORDER BY moh.`date_add` DESC LIMIT 1) = '.(int)($id_order_state);
}
@@ -1248,7 +1259,7 @@ class MondialRelay extends Module
return $statCode[$code];
return $this->l('This error isn\'t referred : ') . $code;
}
-
+
public function getRelayPointSelected($id_cart)
{
return Db::getInstance()->getRow('
@@ -1256,7 +1267,7 @@ class MondialRelay extends Module
FROM `'._DB_PREFIX_.'mr_selected` s
WHERE s.`id_cart` = '.(int)$id_cart);
}
-
+
public function isMondialRelayCarrier($id_carrier)
{
return Db::getInstance()->getRow('
@@ -1264,11 +1275,11 @@ class MondialRelay extends Module
FROM `'._DB_PREFIX_.'mr_method`
WHERE `id_carrier` = '.(int)$id_carrier);
}
-
+
public function hookpaymentTop($params)
{
- if ($this->isMondialRelayCarrier($params['cart']->id_carrier) &&
- !$this->getRelayPointSelected($params['cart']->id))
+ if ($this->isMondialRelayCarrier($params['cart']->id_carrier) &&
+ !$this->getRelayPointSelected($params['cart']->id))
$params['cart']->id_carrier = 0;
}
}
diff --git a/modules/mondialrelay/mondialrelay.tpl b/modules/mondialrelay/mondialrelay.tpl
index 1b3a50b3c..64a374e11 100755
--- a/modules/mondialrelay/mondialrelay.tpl
+++ b/modules/mondialrelay/mondialrelay.tpl
@@ -1,5 +1,5 @@
{*
-* 2007-2011 PrestaShop
+* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -26,18 +26,17 @@
{$jQueryOverload}
-
-
+
-
diff --git a/modules/mondialrelay/orderDetail.tpl b/modules/mondialrelay/orderDetail.tpl
index d533fae55..419503f27 100755
--- a/modules/mondialrelay/orderDetail.tpl
+++ b/modules/mondialrelay/orderDetail.tpl
@@ -23,7 +23,9 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
-
{if $mr_addr}
{l s='Delivery to' mod='mondialrelay'} {$mr_addr}
+{if $mr_url}
+{l s='Follow my package on Mondial Relay website' mod='mondialrelay'}.
+{/if}
{/if}
diff --git a/modules/mondialrelay/style.css b/modules/mondialrelay/style.css
index 934b5e7a5..1a79b689d 100755
--- a/modules/mondialrelay/style.css
+++ b/modules/mondialrelay/style.css
@@ -294,10 +294,6 @@ a.PS_MRSelectRelayPointButton:hover
background:url(images/selectRelayPoint.png) no-repeat 0px -25px;
}
-.PS_MRGmapDefaultPosition
-{
-}
-
.PS_MRGmapDefaultPosition
{
display:none;
@@ -340,3 +336,39 @@ div#PS_MRPersonalizedFields
.MR_date tr.p {background-color:#e9e9e9; height:9px;}
.MR_date td.g {font-weight:bold;}
.MR_date td.d {}
+
+/* 1.3 compatibility*/
+.MR_warn
+{
+ border: 1px solid #D3C200;
+ background-color: #FFFAC6;
+ color: #383838;
+ font-weight: 700;
+ margin: 0 0 10px 0;
+ line-height: 20px;
+ padding: 10px 15px;
+}
+
+/* 1.3 compatibility*/
+.MR_error
+{
+ border: 1px solid #EC9B9B;
+ background-color: #FAE2E3;
+ color: #383838;
+ font-weight: 700;
+ margin: 0 0 10px 0;
+ line-height: 20px;
+ padding: 10px 15px;
+}
+
+/* 1.3 - 1.4 compatibility*/
+.MR_hint
+{
+ margin-top: 4px;
+ margin-bottom: 2px;
+ border: 1px solid #268CCD;
+ padding: 8px 6px 8px 34px;
+ color: #383838;
+ background: #F1F9FF url(images/help.png) no-repeat 6px 5px;
+ border-radius: 3px;
+}
\ No newline at end of file
diff --git a/modules/moneybookers/de.php b/modules/moneybookers/de.php
index b9acf59d4..fa2ef1e4f 100644
--- a/modules/moneybookers/de.php
+++ b/modules/moneybookers/de.php
@@ -17,13 +17,13 @@ $_MODULE['<{moneybookers}prestashop>moneybookers_fa214007826415a21a8456e3e09f999
$_MODULE['<{moneybookers}prestashop>moneybookers_088b74050a381d98fca38d5990b097be'] = 'Sie nutzen zur Zeit die Standard-E-Mail-Adresse von Moneybookers, Sie müssen Ihre eigene E-Mail-Adresse verwenden';
$_MODULE['<{moneybookers}prestashop>moneybookers_7593ded970377fe25371c952eb944770'] = 'Kann Inhalt holen';
$_MODULE['<{moneybookers}prestashop>moneybookers_b863542eebcb27fa230b647b5dd07819'] = 'Konto-Bestätigung fehlgeschlagen, Ihre E-Mail könnte falsch sein';
-$_MODULE['<{moneybookers}prestashop>moneybookers_d70c5b5767846906e0abe68498db887b'] = 'E-Mail-Aktivierung erfolgreich, Sie können nun Ihr Kennwort bestâtigen';
+$_MODULE['<{moneybookers}prestashop>moneybookers_d70c5b5767846906e0abe68498db887b'] = 'E-Mail-Aktivierung erfolgreich, Sie können nun Ihr Geheimwort bestâtigen';
$_MODULE['<{moneybookers}prestashop>moneybookers_87ef564ed1574eda7e77b4012eef0b85'] = 'Unmöglich,den Aktivierungs-Server zu kontaktieren, bitte versuchen Sie es später';
$_MODULE['<{moneybookers}prestashop>moneybookers_7757ea03f2a0893e36c7916a2ad07ef8'] = 'Das E-Mail-Feld ist erforderlich';
-$_MODULE['<{moneybookers}prestashop>moneybookers_aa1c444c2ee2f620d5b349fedfa68ba2'] = 'Kennwortbestätigung fehlgeschlagen, max. Versuchszahl überschritten (3 pro Stunde)';
-$_MODULE['<{moneybookers}prestashop>moneybookers_cdbef58d093e0ff38e13686a669e9fee'] = 'Kennwortbestätigung fehlgeschlagen, Ihr Kennwort könnte falsch sein';
-$_MODULE['<{moneybookers}prestashop>moneybookers_cd1dfa342c3c11c17ede212e6429ca01'] = 'Kontoaktivierung erfolgreich, Kennwort ok';
-$_MODULE['<{moneybookers}prestashop>moneybookers_2e531f9ad978a2a1a88a00ae0d4dc78e'] = 'Das Kennwortfeld ist erforderlich';
+$_MODULE['<{moneybookers}prestashop>moneybookers_aa1c444c2ee2f620d5b349fedfa68ba2'] = 'Geheimwortbestätigung fehlgeschlagen, max. Versuchszahl überschritten (3 pro Stunde)';
+$_MODULE['<{moneybookers}prestashop>moneybookers_cdbef58d093e0ff38e13686a669e9fee'] = 'Geheimwortbestätigung fehlgeschlagen, Ihr Geheimwort könnte falsch sein';
+$_MODULE['<{moneybookers}prestashop>moneybookers_cd1dfa342c3c11c17ede212e6429ca01'] = 'Kontoaktivierung erfolgreich, Geheimwort ok';
+$_MODULE['<{moneybookers}prestashop>moneybookers_2e531f9ad978a2a1a88a00ae0d4dc78e'] = 'Das Geheimwortfeld ist erforderlich';
$_MODULE['<{moneybookers}prestashop>moneybookers_bcfaccebf745acfd5e75351095a5394a'] = 'Disable';
$_MODULE['<{moneybookers}prestashop>moneybookers_e4abb55720e3790fe55982fec858d213'] = 'Linke Spalte';
$_MODULE['<{moneybookers}prestashop>moneybookers_f16072c370ef52db2e329a87b5e7177a'] = 'Rechte Spalte';
@@ -62,12 +62,12 @@ $_MODULE['<{moneybookers}prestashop>moneybookers_71b5b9efebe9c2f73fad6dd1849b431
$_MODULE['<{moneybookers}prestashop>moneybookers_ece6bf0de28bb0442df6e3a1fd7657d4'] = 'Wenn Sie Hilfe benötigen, lesen Sie das Aktivierungshandbuch';
$_MODULE['<{moneybookers}prestashop>moneybookers_32e70e9f3def9ebdcdbc872b739b919f'] = 'Sie können Moneybookers paiement mit dem Test-Account testaccount2@moneybookers.com und das geheime Wort MBTest testen.';
$_MODULE['<{moneybookers}prestashop>moneybookers_f5944cfc42cfb20119407c59a97bd9d1'] = 'Vorsicht, dies ist nur ein Test-Account: Sie erhalten keine Geld, wenn Sie diesen Test-Account auf Ihrem Shop zu nutzen. So empfangen Sie Geld, müssen Sie den Login und das Passwort Ihrer persönlichen Moneybookers-Konto zu verwenden!';
-$_MODULE['<{moneybookers}prestashop>moneybookers_0b65457508cf73c9ed8c96f56b8910ce'] = 'Kennwortbestätigung';
-$_MODULE['<{moneybookers}prestashop>moneybookers_e44efbda9396a5641d730f0ac4866e52'] = 'Ihr Kennwort wurde aktiviert';
+$_MODULE['<{moneybookers}prestashop>moneybookers_0b65457508cf73c9ed8c96f56b8910ce'] = 'Geheimwortbestätigung';
+$_MODULE['<{moneybookers}prestashop>moneybookers_e44efbda9396a5641d730f0ac4866e52'] = 'Ihr Geheimwort wurde aktiviert';
$_MODULE['<{moneybookers}prestashop>moneybookers_98061690dbf6a359c5b2aeb84d0eb317'] = 'Sie müssen';
-$_MODULE['<{moneybookers}prestashop>moneybookers_7360d9333103eec04f2d91fa513a1f46'] = 'bestätigen Sie Ihr Kennwort';
-$_MODULE['<{moneybookers}prestashop>moneybookers_7986dbc3b2bf0e8f72a328c094981836'] = 'Bitte geben Sie das gleiche Kennwort ein, das Sie zum Öffnen Ihres Moneybookers Kontos benutzen:';
-$_MODULE['<{moneybookers}prestashop>moneybookers_22f2d26badcc700d11b93f57dc96d386'] = 'Mein Kennwort bestätigen';
+$_MODULE['<{moneybookers}prestashop>moneybookers_7360d9333103eec04f2d91fa513a1f46'] = 'das Geheimwort bestätigen';
+$_MODULE['<{moneybookers}prestashop>moneybookers_7986dbc3b2bf0e8f72a328c094981836'] = 'Bitte geben Sie das Geheimwort ein, welches Sie in Ihrem Moneybookerskonto unter Händlereinstellungen hinterlegt haben:';
+$_MODULE['<{moneybookers}prestashop>moneybookers_22f2d26badcc700d11b93f57dc96d386'] = 'Mein Geheimwort bestätigen';
$_MODULE['<{moneybookers}prestashop>moneybookers_cbcd58fce9759ea6e84c86ed92a3db44'] = 'Wie lautet das Geheimwort?';
$_MODULE['<{moneybookers}prestashop>moneybookers_ef3cefa901bd32ea6aa2d0f6900b7725'] = 'Das Geheimwort unterscheidet sich vom Passwort. Es ist dazu da, um die Transmission von Ihrem Server zu entschlüsseln.';
$_MODULE['<{moneybookers}prestashop>moneybookers_e1674c7b15040ce09b9615714eb3e787'] = 'Warum das Geheimwort sich vom Passwort unterscheiden soll';
diff --git a/modules/paypal/config.xml b/modules/paypal/config.xml
index 4153164f5..218b28d97 100755
--- a/modules/paypal/config.xml
+++ b/modules/paypal/config.xml
@@ -2,7 +2,7 @@
paypal
-
+
diff --git a/modules/paypal/confirm.tpl b/modules/paypal/confirm.tpl
index a794d0f22..d330d169b 100644
--- a/modules/paypal/confirm.tpl
+++ b/modules/paypal/confirm.tpl
@@ -58,7 +58,7 @@
{l s='Return' mod='paypal'}
{l s='Session expired, please go back and try again' mod='paypal'}
{else}
- {l s='Other payment methods' mod='paypal'}
+ {l s='Other payment methods' mod='paypal'}
{/if}
diff --git a/modules/paypal/confirmation.tpl b/modules/paypal/confirmation.tpl
index 1ba79647f..e43b4c3cb 100644
--- a/modules/paypal/confirmation.tpl
+++ b/modules/paypal/confirmation.tpl
@@ -1,5 +1,5 @@
{*
-* 2007-2011 PrestaShop
+* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
diff --git a/modules/paypal/error.tpl b/modules/paypal/error.tpl
index 77af46812..c97004915 100644
--- a/modules/paypal/error.tpl
+++ b/modules/paypal/error.tpl
@@ -1,5 +1,5 @@
{*
-* 2007-2011 PrestaShop
+* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
diff --git a/modules/paypal/express/login.tpl b/modules/paypal/express/login.tpl
index 85a175aef..ed0cb2401 100644
--- a/modules/paypal/express/login.tpl
+++ b/modules/paypal/express/login.tpl
@@ -1,5 +1,5 @@
{*
-* 2007-2011 PrestaShop
+* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
diff --git a/modules/paypal/express/paypalexpress.php b/modules/paypal/express/paypalexpress.php
index eb7b2b548..3cc2fc44b 100644
--- a/modules/paypal/express/paypalexpress.php
+++ b/modules/paypal/express/paypalexpress.php
@@ -43,8 +43,8 @@ class PaypalExpress extends Paypal
return false;
// Making request
- $returnURL = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/express/submit.php';
- $cancelURL = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'order.php';
+ $returnURL = PayPal::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/express/submit.php';
+ $cancelURL = PayPal::getShopDomainSsl(true, true).__PS_BASE_URI__.'order.php';
$paymentAmount = (float)$cart->getOrderTotal();
$currencyCodeType = strval($currency->iso_code);
$paymentType = Configuration::get('PAYPAL_CAPTURE') == 1 ? 'Authorization' : 'Sale';
diff --git a/modules/paypal/express/submit.php b/modules/paypal/express/submit.php
index 1a95540c6..5d1c1b2f0 100644
--- a/modules/paypal/express/submit.php
+++ b/modules/paypal/express/submit.php
@@ -112,7 +112,7 @@ function displayConfirm()
'ppToken' => strval(Context::getContext()->cookie->paypal_token),
'cust_currency' => Context::getContext()->cart->id_currency,
'currencies' => $ppExpress->getCurrency((int)Context::getContext()->cart->id_currency),
- 'total' => Context::getContext()->cart->getOrderTotal(true, Cart::BOTH),
+ 'total' => Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH),
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'. $ppExpress->name.'/',
'payerID' => $payerID,
'mode' => 'express/'
@@ -133,7 +133,7 @@ function submitConfirm()
die('No currency');
elseif (!$payerID = Tools::htmlentitiesUTF8(strval(Tools::getValue('payerID'))))
die('No payer ID');
- elseif (!Context::getContext()->cart->getOrderTotal(true, Cart::BOTH))
+ elseif (!Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH))
die('Empty cart');
$ppExpress->makePayPalAPIValidation(Context::getContext()->cookie, Context::getContext()->cart, $currency, $payerID, 'express');
@@ -344,7 +344,8 @@ function displayAccount()
displayAccount();
die('Not logged');
}*/
-if (!Context::getContext()->cart->getOrderTotal(true, Cart::BOTH))
+
+if (!Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH))
die('Empty cart');
// No token, we need to get one by making PayPal Authorisation
diff --git a/modules/paypal/integral_evolution/redirect.php b/modules/paypal/integral_evolution/redirect.php
index 0822cd454..515c74cd1 100644
--- a/modules/paypal/integral_evolution/redirect.php
+++ b/modules/paypal/integral_evolution/redirect.php
@@ -87,11 +87,11 @@ $smarty->assign(array(
'shipping_address' => $shippingAddress,
'shipping_country' => $shippingCountry,
'shipping_state' => $shippingState,
- 'amount' => (float)($cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING)),
+ 'amount' => (float)($cart->getOrderTotal(true, PayPal::BOTH_WITHOUT_SHIPPING)),
'customer' => $customer,
- 'total' => (float)($cart->getOrderTotal(true, Cart::BOTH)),
- 'shipping' => Tools::ps_round((float)($cart->getOrderShippingCost()) + (float)($cart->getOrderTotal(true, Cart::ONLY_WRAPPING)), 2),
- 'discount' => $cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS),
+ 'total' => (float)($cart->getOrderTotal(true, PayPal::BOTH)),
+ 'shipping' => Tools::ps_round((float)($cart->getOrderShippingCost()) + (float)($cart->getOrderTotal(true, PayPal::ONLY_WRAPPING)), 2),
+ 'discount' => $cart->getOrderTotal(true, PayPal::ONLY_DISCOUNTS),
'business' => $business,
'currency_module' => $currency_module,
'cart_id' => (int)($cart->id).'_'.pSQL($cart->secure_key),
@@ -99,11 +99,17 @@ $smarty->assign(array(
'paypal_id' => (int)($paypal->id),
'header' => $header,
'template' => 'Template'.Configuration::get('PAYPAL_TEMPLATE'),
- 'url' => Tools::getShopDomain(true, true).__PS_BASE_URI__,
+ 'url' => PayPal::getShopDomain(true, true).__PS_BASE_URI__,
'paymentaction' => (Configuration::get('PAYPAL_CAPTURE') ? 'authorization' : 'sale')
));
+if (substr(_PS_VERSION_, 0, 3) == '1.3')
+ $smarty->assign('jquery', 'jquery-1.2.6.pack.js');
+else
+ $smarty->assign('jquery', 'jquery-1.4.4.min.js');
+
+
if (is_file(_PS_THEME_DIR_.'modules/paypal/integral_evolution/redirect.tpl'))
$smarty->display(_PS_THEME_DIR_.'modules/'.$paypal->name.'/integral_evolution/redirect.tpl');
else
diff --git a/modules/paypal/integral_evolution/redirect.tpl b/modules/paypal/integral_evolution/redirect.tpl
index 6d14c2654..8a4486572 100644
--- a/modules/paypal/integral_evolution/redirect.tpl
+++ b/modules/paypal/integral_evolution/redirect.tpl
@@ -26,7 +26,7 @@
-
+
{$redirect_text}{$cancel_text}
diff --git a/modules/paypal/payment/paypalpayment.php b/modules/paypal/payment/paypalpayment.php
index 005db96ea..e7eda7b5f 100644
--- a/modules/paypal/payment/paypalpayment.php
+++ b/modules/paypal/payment/paypalpayment.php
@@ -46,8 +46,8 @@ class PaypalPayment extends Paypal
// Making request
$vars = '?fromPayPal=1';
- $returnURL = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/payment/submit.php'.$vars;
- $cancelURL = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'order.php';
+ $returnURL = PayPal::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/payment/submit.php'.$vars;
+ $cancelURL = PayPal::getShopDomainSsl(true, true).__PS_BASE_URI__.'order.php';
$paymentAmount = (float)($cart->getOrderTotal());
$currencyCodeType = strval($currency->iso_code);
$paymentType = Configuration::get('PAYPAL_CAPTURE') == 1 ? 'Authorization' : 'Sale';
@@ -68,7 +68,7 @@ class PaypalPayment extends Paypal
$country = new Country((int)$address->id_country);
if ($address->id_state)
$state = new State((int)$address->id_state);
- $discounts = (float)($cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS));
+ $discounts = (float)($cart->getOrderTotal(true, PayPal::ONLY_DISCOUNTS));
if ($discounts == 0)
{
if ($params['cart']->id_customer)
diff --git a/modules/paypal/payment/submit.php b/modules/paypal/payment/submit.php
index 2236a44d8..09a75c929 100644
--- a/modules/paypal/payment/submit.php
+++ b/modules/paypal/payment/submit.php
@@ -1,6 +1,6 @@
$ppPayment->getLogo(),
'cust_currency' => Context::getContext()->cart->id_currency,
'currency' => $ppPayment->getCurrency((int)Context::getContext()->cart->id_currency),
- 'total' => Context::getContext()->cart->getOrderTotal(true, Cart::BOTH),
+ 'total' => Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH),
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'. $ppPayment->name.'/',
'mode' => 'payment/'
));
@@ -116,7 +116,7 @@ function submitConfirm()
}
elseif (!$id_currency = (int)(Tools::getValue('currency_payement')))
die('No currency');
- elseif (!Context::getContext()->cart->getOrderTotal(true, Cart::BOTH))
+ elseif (!Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH))
die('Empty cart');
$currency = new Currency((int)($id_currency));
if (!Validate::isLoadedObject($currency))
@@ -133,7 +133,7 @@ function validOrder()
header('location:../../../'); exit;
die('Not logged');
}
- elseif (!Context::getContext()->cart->getOrderTotal(true, Cart::BOTH))
+ elseif (!Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH))
die('Empty cart');
if (!$token = Tools::htmlentitiesUTF8(strval(Tools::getValue('token'))))
{
@@ -153,7 +153,7 @@ function validOrder()
if (!Context::getContext()->customer->isLogged(true))
die('Not logged');
-elseif (!Context::getContext()->cart->getOrderTotal(true, Cart::BOTH))
+elseif (!Context::getContext()->cart->getOrderTotal(true, PayPal::BOTH))
die('Empty cart');
// No submit, confirmation page
diff --git a/modules/paypal/paypal.php b/modules/paypal/paypal.php
index efc425f03..1dcdf168d 100644
--- a/modules/paypal/paypal.php
+++ b/modules/paypal/paypal.php
@@ -1,6 +1,6 @@
name = 'paypal';
$this->tab = 'payments_gateways';
- $this->version = '2.8.3';
-
+ $this->version = '2.8.5';
+
$this->currencies = true;
$this->currencies_mode = 'radio';
@@ -78,7 +78,7 @@ class PayPal extends PaymentModule
$this->warning .= Configuration::get('PS_PREACTIVATION_PAYPAL_WARNING');
}
}
-
+
public function install()
{
/* Install and register on hook */
@@ -92,14 +92,14 @@ class PayPal extends PaymentModule
OR !$this->registerHook('cancelProduct')
OR !$this->registerHook('adminOrder'))
return false;
-
+
if (file_exists(_PS_ROOT_DIR_.'/modules/paypalapi/paypalapi.php') AND !Configuration::get('PAYPAL_NEW'))
{
include_once(_PS_ROOT_DIR_.'/modules/paypalapi/paypalapi.php');
$paypalapi = new PaypalAPI();
return $this->_checkAndUpdateFromOldVersion(true);
}
-
+
/* Set database */
if (!Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_order` (
@@ -111,7 +111,7 @@ class PayPal extends PaymentModule
PRIMARY KEY (`id_order`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'))
return false;
-
+
/* Set configuration */
Configuration::updateValue('PAYPAL_SANDBOX', 1);
Configuration::updateValue('PAYPAL_BUSINESS', 'paypal@prestashop.com');
@@ -147,10 +147,10 @@ class PayPal extends PaymentModule
copy(dirname(__FILE__).'/../../img/os/'.Configuration::get('PS_OS_PAYPAL').'.gif', dirname(__FILE__).'/../../img/os/'.(int)$orderState->id.'.gif');
Configuration::updateValue('PAYPAL_OS_AUTHORIZATION', (int)$orderState->id);
}
-
+
return true;
}
-
+
public function uninstall()
{
/* Delete all configurations */
@@ -165,23 +165,23 @@ class PayPal extends PaymentModule
Configuration::deleteByName('PAYPAL_TEMPLATE');
Configuration::deleteByName('PAYPAL_CAPTURE');
Configuration::deleteByName('PAYPAL_DEBUG_MODE');
-
+
return parent::uninstall();
}
-
+
public function getContent()
{
- $this->_html .= ''.$this->l('PayPal').' ';
-
+ $this->_html .= ''.$this->l('PayPal').' ';
+
$this->_postProcess();
$this->_setPayPalSubscription();
if (file_exists(_PS_ROOT_DIR_.'/modules/paypalapi/paypalapi.php'))
$this->_html .= '
'.$this->l('All features of Paypal API module are be include in this new module. In order to don\'t have any conflict, please don\'t use and remove PayPalAPI module.').' ';
$this->_setConfigurationForm();
-
+
return $this->_html;
}
-
+
public function hookPayment($params)
{
if (!$this->active)
@@ -208,7 +208,7 @@ class PayPal extends PaymentModule
else
die($this->l('No valid payment method selected'));
}
-
+
public function hookShoppingCartExtra($params)
{
if (!$this->active)
@@ -220,7 +220,7 @@ class PayPal extends PaymentModule
return $this->display(__FILE__, 'express/shopping_cart.tpl');
}
}
-
+
public function hookPaymentReturn($params)
{
if (!$this->active)
@@ -228,7 +228,7 @@ class PayPal extends PaymentModule
return $this->display(__FILE__, 'confirmation.tpl');
}
-
+
public function hookRightColumn($params)
{
$this->context->smarty->assign('iso_code', Tools::strtolower($this->context->language));
@@ -240,7 +240,7 @@ class PayPal extends PaymentModule
{
return $this->hookRightColumn($params);
}
-
+
public function hookBackBeforePayment($params)
{
if (!$this->active)
@@ -258,7 +258,7 @@ class PayPal extends PaymentModule
Tools::redirect('modules/paypal/express/submit.php?confirm=1&token='.$token.'&payerID='.$payerID);
}
}
-
+
public function hookAdminOrder($params)
{
if (Tools::isSubmit('paypal'))
@@ -288,7 +288,7 @@ class PayPal extends PaymentModule
'.$message.'
';
}
-
+
if ($this->_needValidation((int)$params['id_order']) AND $this->_isPayPalAPIAvailable())
{
$this->_html .= '
@@ -302,7 +302,7 @@ class PayPal extends PaymentModule
$this->_postProcess();
$this->_html .= '';
}
-
+
if ($this->_needCapture((int)$params['id_order']) AND $this->_isPayPalAPIAvailable())
{
$this->_html .= '
@@ -316,7 +316,7 @@ class PayPal extends PaymentModule
$this->_postProcess();
$this->_html .= '';
}
-
+
if ($this->_canRefund((int)$params['id_order']) AND $this->_isPayPalAPIAvailable())
{
$this->_html .= '
@@ -331,10 +331,10 @@ class PayPal extends PaymentModule
$this->_postProcess();
$this->_html .= '';
}
-
+
return $this->_html;
}
-
+
public function hookCancelProduct($params)
{
if (Tools::isSubmit('generateDiscount'))
@@ -353,10 +353,10 @@ class PayPal extends PaymentModule
$id_transaction = $this->_getTransactionId((int)($order->id));
if (!$id_transaction)
return false;
-
+
$products = $order->getProducts();
$amt = $products[(int)($order_detail->id)]['product_price_wt'] * (int)($_POST['cancelQuantity'][(int)($order_detail->id)]);
-
+
$response = $this->_makeRefund($id_transaction, $order->id, (float)($amt));
$message = $this->l('Cancel products result:').' ';
foreach ($response AS $k => $value)
@@ -381,11 +381,11 @@ class PayPal extends PaymentModule
$currency = new Currency((int)($id_currency));
$iso_currency = $currency->iso_code;
$token = $cookie->paypal_token;
- $total = (float)($cart->getOrderTotal(true, Cart::BOTH));
+ $total = (float)($cart->getOrderTotal(true, PayPal::BOTH));
$paymentType = Configuration::get('PAYPAL_CAPTURE') == 1 ? 'Authorization' : 'Sale';
$serverName = urlencode($_SERVER['SERVER_NAME']);
$bn = ($type == 'express' ? 'ECS' : 'ECM');
- $notifyURL = urlencode(Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/ipn.php');
+ $notifyURL = urlencode(PayPal::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/ipn.php');
// Getting address
if (isset($cookie->id_cart) AND $cookie->id_cart)
@@ -402,7 +402,7 @@ class PayPal extends PaymentModule
// Making request
$request='&TOKEN='.urlencode($token).'&PAYERID='.urlencode($payerID).'&PAYMENTACTION='.$paymentType.'&AMT='.$total.'&CURRENCYCODE='.$iso_currency.'&IPADDRESS='.$serverName.'&NOTIFYURL='.$notifyURL.'&BUTTONSOURCE=PRESTASHOP_'.$bn.$requestAddress ;
- $discounts = (float)$cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS);
+ $discounts = (float)$cart->getOrderTotal(true, PayPal::ONLY_DISCOUNTS);
if ($discounts == 0)
{
$products = $cart->getProducts();
@@ -424,7 +424,7 @@ class PayPal extends PaymentModule
$products = $cart->getProducts();
$description = 0;
for ($i = 0; $i < sizeof($products); $i++)
- $description .= ($description == ''?'':', ').$products[$i]['cart_quantity']." x ".$products[$i]['name'].(isset($products[$i]['attributes'])?' - '.$products[$i]['attributes']:'').(isset($products[$i]['instructions'])?' - '.$products[$i]['instructions']:'') ;
+ $description .= ($description == ''?'':', ').$products[$i]['cart_quantity']." x ".$products[$i]['name'].(isset($products[$i]['attributes'])?' - '.$products[$i]['attributes']:'').(isset($products[$i]['instructions'])?' - '.$products[$i]['instructions']:'') ;
$request .= '&ORDERDESCRIPTION='.urlencode(substr($description, 0, 120));
}
@@ -446,6 +446,9 @@ class PayPal extends PaymentModule
$ppExpress->displayPayPalAPIError($ppExpress->l('PayPal return error.', 'submit'), $logs);
}
+
+
+
// Making log
$id_transaction = $result['TRANSACTIONID'];
if (Configuration::get('PAYPAL_CAPTURE'))
@@ -470,20 +473,22 @@ class PayPal extends PaymentModule
$id_order_state = Configuration::get('PS_OS_ERROR');
}
+
// Call payment validation method
- $this->validateOrder($id_cart, $id_order_state, (float)($cart->getOrderTotal(true, Cart::BOTH)), $this->displayName, $message, array('transaction_id' => $id_transaction, 'payment_status' => $result['PAYMENTSTATUS'], 'pending_reason' => $result['PENDINGREASON']), $id_currency, false, $cart->secure_key);
-
+ $this->validateOrder($id_cart, $id_order_state, (float)($cart->getOrderTotal(true, PayPal::BOTH)), $this->displayName, $message, array('transaction_id' => $id_transaction, 'payment_status' => $result['PAYMENTSTATUS'], 'pending_reason' => $result['PENDINGREASON']), $id_currency, false, $cart->secure_key);
+
// Clean cookie
unset($cookie->paypal_token);
-
+
// Displaying output
$order = new Order((int)($this->currentOrder));
Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)($id_cart).'&id_module='.(int)($this->id).'&id_order='.(int)($this->currentOrder).'&key='.$order->secure_key);
-
+
}
-
- public function validateOrder($id_cart, $id_order_state, $amountPaid, $paymentMethod = 'Unknown', $message = NULL,
- $extraVars = array(), $currency_special = NULL, $dont_touch_amount = false, $secure_key = false, Shop $shop = null)
+
+ public function validateOrder($id_cart, $id_order_state, $amountPaid, $paymentMethod = 'Unknown',
+ $message = NULL, $extraVars = array(), $currency_special = NULL, $dont_touch_amount = false,
+ $secure_key = false, Shop $shop = null)
{
if (!$this->active)
return;
@@ -493,41 +498,41 @@ class PayPal extends PaymentModule
{
$this->pcc->transaction_id = (isset($extraVars['transaction_id']) ?
$extraVars['transaction_id'] : '');
- }
+ }
parent::validateOrder($id_cart, $id_order_state, $amountPaid, $paymentMethod, $message, $extraVars, $currency_special, $dont_touch_amount, $secure_key);
-
+
if (array_key_exists('transaction_id', $extraVars) AND array_key_exists('payment_status', $extraVars))
$this->_saveTransaction($id_cart, $extraVars);
}
-
+
public function getPayPalURL()
{
return 'www'.(Configuration::get('PAYPAL_SANDBOX') ? '.sandbox' : '').'.paypal.com';
}
-
+
public function getPaypalIntegralEvolutionUrl()
{
if (Configuration::get('PAYPAL_SANDBOX'))
return 'https://'.$this->getPayPalURL().'/cgi-bin/acquiringweb';
return 'https://securepayments.paypal.com/acquiringweb?cmd=_hosted-payment';
}
-
+
public function getPaypalStandardUrl()
{
return 'https://'.$this->getPayPalURL().'/cgi-bin/webscr';
}
-
+
public function getAPIURL()
{
return 'api-3t'.(Configuration::get('PAYPAL_SANDBOX') ? '.sandbox' : '').'.paypal.com';
}
-
+
public function getAPIScript()
{
return '/nvp';
}
-
+
public function getL($key)
{
$translations = array(
@@ -557,7 +562,7 @@ class PayPal extends PaymentModule
return $key;
return $translations[$key];
}
-
+
public function getLogo($ppExpress = false, $vertical = false)
{
if ($ppExpress)
@@ -609,14 +614,14 @@ class PayPal extends PaymentModule
return _MODULE_DIR_.$this->name.'/img/integral_evolution'.($vertical ? '_vertical' : '').'.png';
return _MODULE_DIR_.$this->name.'/img/PayPal_mark_60x38.gif';
}
-
+
public function getCountryCode()
{
$address = new Address($this->context->cart->id_address_invoice);
$country = new Country($address->id_country);
return $country->iso_code;
}
-
+
public function displayPayPalAPIError($message, $log = false)
{
$send = true;
@@ -648,30 +653,30 @@ class PayPal extends PaymentModule
include_once(dirname(__FILE__).'/../../footer.php');
die;
}
-
+
private function _saveTransaction($id_cart, $extraVars)
{
$cart = new Cart((int)($id_cart));
if (Validate::isLoadedObject($cart) AND $cart->OrderExists())
{
$id_order = Db::getInstance()->getValue('
- SELECT `id_order`
- FROM `'._DB_PREFIX_.'orders`
+ SELECT `id_order`
+ FROM `'._DB_PREFIX_.'orders`
WHERE `id_cart` = '.(int)$cart->id);
-
+
Db::getInstance()->execute('
- INSERT INTO `'._DB_PREFIX_.'paypal_order` (`id_order`, `id_transaction`, `payment_method`, `payment_status`, `capture`)
+ INSERT INTO `'._DB_PREFIX_.'paypal_order` (`id_order`, `id_transaction`, `payment_method`, `payment_status`, `capture`)
VALUES ('.(int)$id_order.', \''.pSQL($extraVars['transaction_id']).'\', '.(int)Configuration::get('PAYPAL_PAYMENT_METHOD').', \''.pSQL($extraVars['payment_status']).((isset($extraVars['pending_reason']) AND $extraVars['pending_reason'] == 'authorization') ? '_authorization' : '').'\', '.(int)(Configuration::get('PAYPAL_CAPTURE')).')');
}
}
-
+
private function _canRefund($id_order)
{
if (!(int)$id_order)
return false;
$paypal_order = Db::getInstance()->getRow('
- SELECT *
- FROM `'._DB_PREFIX_.'paypal_order`
+ SELECT *
+ FROM `'._DB_PREFIX_.'paypal_order`
WHERE `id_order` = '.(int)$id_order);
if (!is_array($paypal_order) OR !sizeof($paypal_order))
return false;
@@ -679,27 +684,27 @@ class PayPal extends PaymentModule
return false;
return true;
}
-
+
private function _needValidation($id_order)
{
if (!(int)$id_order)
return false;
$order = Db::getInstance()->getRow('
- SELECT `payment_method`, `payment_status`
- FROM `'._DB_PREFIX_.'paypal_order`
+ SELECT `payment_method`, `payment_status`
+ FROM `'._DB_PREFIX_.'paypal_order`
WHERE `id_order` = '.(int)$id_order);
if (!$order)
return false;
return $order['payment_status'] == 'Pending' AND $order['payment_method'] == _PAYPAL_INTEGRAL_EVOLUTION_;
}
-
+
private function _needCapture($id_order)
{
if (!(int)$id_order)
return false;
$result = Db::getInstance()->getRow('
- SELECT `payment_method`, `payment_status`, `capture`
- FROM `'._DB_PREFIX_.'paypal_order`
+ SELECT `payment_method`, `payment_status`, `capture`
+ FROM `'._DB_PREFIX_.'paypal_order`
WHERE `id_order` = '.(int)($id_order).' AND `capture` = 1');
if (!isset($result['payment_method']))
return false;
@@ -707,11 +712,11 @@ class PayPal extends PaymentModule
return false;
return true;
}
-
+
private function _setConfigurationForm()
{
$this->_html .= '
- ';
}
-
+
private function _getSolutionTabHtml()
{
$paymentMethod = (int)(Tools::getValue('payment_method', Configuration::get('PAYPAL_PAYMENT_METHOD')));
$paypalExpress = (int)(Tools::isSubmit('paypal_express') ? 1 : Configuration::get('PAYPAL_EXPRESS_CHECKOUT'));
$paypalDebug = (int)(Tools::isSubmit('paypal_debug') ? 1 : Configuration::get('PAYPAL_DEBUG_MODE'));
-
+
$link = 'http://altfarm.mediaplex.com/ad/ck/3484-23403-8030-88?ID=PROCPRESTA';
$lang = $this->context->language;
if (strtolower($lang->iso_code) == 'es')
$link = 'http://altfarm.mediaplex.com/ad/ck/3484-34334-12439-1';
else if (strtolower($lang->iso_code) == 'it')
$link = 'https://www.paypal-business.it/paypalpro.asp';
-
+
return '
'.$this->l('Solution').'
'.$this->l('Choose a solution:').'
@@ -773,24 +778,24 @@ class PayPal extends PaymentModule
'.$this->l('To use any PayPal solution, you need to set up API parameters in the « Settings » Tab').'
';
}
-
+
private function _getSettingsTabHtml()
{
$lang = $this->context->language;
$sandboxMode = (int)(Tools::getValue('sandbox_mode', Configuration::get('PAYPAL_SANDBOX')));
$paypalCapture = (int)(Tools::getValue('paypal_capture', Configuration::get('PAYPAL_CAPTURE')));
-
+
$html = '
'.$this->l('Settings').'
'.$this->l('Sandbox mode (tests)').':
- '.$this->l('Active').'
+ '.$this->l('Active').'
'.$this->l('Inactive').'
'.$this->l('Payment type').':
- '.$this->l('Direct (sales)').'
+ '.$this->l('Direct (sales)').'
'.$this->l('Authorization / Manual Capture').' '.$this->l('(Payment shipping)').'
'.$this->l('PayPal account e-mail').':
@@ -826,12 +831,12 @@ class PayPal extends PaymentModule
';
return $html;
}
-
+
private function _getPersonalizationsTabHtml()
{
$lang = $this->context->language;
$template_paypal = Tools::getValue('template_paypal', Configuration::get('PAYPAL_TEMPLATE'));
-
+
return '
'.$this->l('Logos and personalizations').'
'.$this->l('Banner image URL').':
@@ -841,14 +846,14 @@ class PayPal extends PaymentModule
'.$this->l('Template chosen for PayPal Integral Evolution').':
- A
+ A
B
C
'.($lang->iso_code == 'fr' ? ''.$this->l('Click here to learn how to customize these templates').'
' : '').'
';
}
-
+
private function _setPayPalSubscription()
{
$this->_html .= '
@@ -865,7 +870,7 @@ class PayPal extends PaymentModule
'.$this->l('You need to configure your PayPal account before using this module.').'
';
}
-
+
private function _postProcess()
{
if (Tools::isSubmit('submitPayPal'))
@@ -879,7 +884,7 @@ class PayPal extends PaymentModule
$this->_errors[] = $this->l('E-mail invalid');
if (Tools::getValue('banner_url') != NULL AND !Validate::isUrl(Tools::getValue('banner_url')))
$this->_errors[] = $this->l('URL for banner is invalid');
- elseif (Tools::getValue('banner_url') != NULL AND strpos(Tools::getValue('banner_url'), 'https://') === false)
+ elseif (Tools::getValue('banner_url') != NULL AND strpos(Tools::getValue('banner_url'), 'https://') === false)
$this->_errors[] = $this->l('URL for banner must use HTTPS protocol');
if (!in_array(Tools::getValue('template_paypal'), $template_available))
$this->_errors[] = $this->l('PayPal template invalid.');
@@ -889,7 +894,7 @@ class PayPal extends PaymentModule
$this->_errors[] = $this->l('Cannot use this solution without API Credentials.');
if (Tools::isSubmit('paypal_express') AND (Tools::getValue('api_username') == NULL OR Tools::getValue('api_signature') == NULL))
$this->_errors[] = $this->l('Cannot use PayPal Express without API Credentials.');
-
+
if (!sizeof($this->_errors))
{
Configuration::updateValue('PAYPAL_SANDBOX', (int)(Tools::getValue('sandbox_mode')));
@@ -921,7 +926,7 @@ class PayPal extends PaymentModule
$this->_html = $this->displayError($error_msg);
}
}
-
+
if (Tools::isSubmit('submitPayPalValidation'))
{
if (!($response = $this->_updatePaymentStatusOfOrder((int)(Tools::getValue('id_order')))) OR !sizeof($response))
@@ -939,7 +944,7 @@ class PayPal extends PaymentModule
$this->_html .= ''.$this->l('Error from PayPal: ').$response['L_LONGMESSAGE0'].' (#'.$response['L_ERRORCODE0'].')
';
}
}
-
+
if (Tools::isSubmit('submitPayPalCapture'))
{
if (!($response = $this->_doCapture((int)(Tools::getValue('id_order')))) OR !sizeof($response))
@@ -957,7 +962,7 @@ class PayPal extends PaymentModule
$this->_html .= ''.$this->l('Error from PayPal: ').$response['L_LONGMESSAGE0'].' (#'.$response['L_ERRORCODE0'].')
';
}
}
-
+
if (Tools::isSubmit('submitPayPalRefund'))
{
if (!($response = $this->_doTotalRefund((int)(Tools::getValue('id_order')))) OR !sizeof($response))
@@ -976,27 +981,27 @@ class PayPal extends PaymentModule
}
}
}
-
+
private function _getTransactionId($id_order)
{
if (!(int)$id_order)
return false;
-
+
return Db::getInstance()->getValue('
- SELECT `id_transaction`
- FROM `'._DB_PREFIX_.'paypal_order`
+ SELECT `id_transaction`
+ FROM `'._DB_PREFIX_.'paypal_order`
WHERE `id_order` = '.(int)$id_order);
}
-
+
private function _makeRefund($id_transaction, $id_order, $amt = false)
{
include_once(_PS_MODULE_DIR_.'paypal/api/paypallib.php');
-
+
if (!$this->_isPayPalAPIAvailable())
die(Tools::displayError('Fatal Error: no API Credentials are available'));
if (!$id_transaction)
die(Tools::displayError('Fatal Error: id_transaction is null'));
-
+
if (!$amt)
$request = '&TRANSACTIONID='.urlencode($id_transaction).'&REFUNDTYPE=Full';
else
@@ -1011,7 +1016,7 @@ class PayPal extends PaymentModule
$paypalLib = new PaypalLib();
return $paypalLib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'RefundTransaction', $request);
}
-
+
private function _addNewPrivateMessage($id_order, $message)
{
if (!$id_order)
@@ -1026,7 +1031,7 @@ class PayPal extends PaymentModule
return $msg->add();
}
-
+
private function _doTotalRefund($id_order)
{
if (!$this->_isPayPalAPIAvailable())
@@ -1073,20 +1078,20 @@ class PayPal extends PaymentModule
return $response;
}
-
+
private function _doCapture($id_order)
{
include_once(_PS_MODULE_DIR_.'paypal/api/paypallib.php');
-
+
if (!$this->_isPayPalAPIAvailable())
return false;
if (!$id_order)
return false;
-
+
$id_transaction = $this->_getTransactionId((int)($id_order));
if (!$id_transaction)
return false;
-
+
$order = new Order((int)($id_order));
$currency = new Currency((int)($order->id_currency));
$request = '&AUTHORIZATIONID='.urlencode($id_transaction).'&AMT='.(float)($order->total_paid).'&CURRENCYCODE='.$currency->iso_code.'&COMPLETETYPE=Complete';
@@ -1111,11 +1116,11 @@ class PayPal extends PaymentModule
return $response;
}
-
+
private function _updatePaymentStatusOfOrder($id_order)
{
include_once(_PS_MODULE_DIR_.'paypal/api/paypallib.php');
-
+
if (!$this->_isPayPalAPIAvailable())
return false;
if (!$id_order)
@@ -1124,7 +1129,7 @@ class PayPal extends PaymentModule
$id_transaction = $this->_getTransactionId((int)($id_order));
if (!$id_transaction)
return false;
-
+
$request = '&TRANSACTIONID='.urlencode($id_transaction);
$paypalLib = new PaypalLib();
$response = $paypalLib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'GetTransactionDetails', $request);
@@ -1167,14 +1172,14 @@ class PayPal extends PaymentModule
}
return false;
}
-
+
private function _isPayPalAPIAvailable()
{
if (Configuration::get('PAYPAL_API_USER') != NULL AND Configuration::get('PAYPAL_API_PASSWORD') != NULL AND Configuration::get('PAYPAL_API_SIGNATURE') != NULL)
return true;
return false;
}
-
+
private function _checkAndUpdateFromOldVersion($install = false)
{
if (!Configuration::get('PAYPAL_NEW') AND ($this->active OR $install))
@@ -1253,12 +1258,86 @@ class PayPal extends PaymentModule
}
return false;
}
-
+
public function getOrder($id_transaction)
{
return Db::getInstance()->getValue('
- SELECT `id_order`
- FROM `'._DB_PREFIX_.'paypal_order`
+ SELECT `id_order`
+ FROM `'._DB_PREFIX_.'paypal_order`
WHERE `id_transaction` = \''.pSQL($id_transaction).'\'');
}
+
+
+
+ // Retrocompatibility to 1.3
+ const ONLY_PRODUCTS = 1;
+ const ONLY_DISCOUNTS = 2;
+ const BOTH = 3;
+ const BOTH_WITHOUT_SHIPPING = 4;
+ const ONLY_SHIPPING = 5;
+ const ONLY_WRAPPING = 6;
+ const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7;
+
+
+ /**
+ * getShopDomain returns domain name according to configuration and ignoring ssl
+ *
+ * @param boolean $http if true, return domain name with protocol
+ * @param boolean $entities if true,
+ * @return string domain
+ */
+ public static function getShopDomain($http = false, $entities = false)
+ {
+ if (!($domain = Configuration::get('PS_SHOP_DOMAIN')))
+ $domain = Tools::getHttpHost();
+ if ($entities)
+ $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8');
+ if ($http)
+ $domain = 'http://'.$domain;
+ return $domain;
+}
+
+ /**
+ * getShopDomainSsl returns domain name according to configuration and depending on ssl activation
+ *
+ * @param boolean $http if true, return domain name with protocol
+ * @param boolean $entities if true,
+ * @return string domain
+ */
+ public static function getShopDomainSsl($http = false, $entities = false)
+ {
+ if (!($domain = Configuration::get('PS_SHOP_DOMAIN_SSL')))
+ $domain = Tools::getHttpHost();
+ if ($entities)
+ $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8');
+ if ($http)
+ $domain = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').$domain;
+ return $domain;
+ }
+
+ public static function display($file, $template, $cacheId = NULL, $compileId = NULL)
+ {
+ if (substr(_PS_VERSION_, 0, 3) != '1.3')
+ return parent::display($file, $template);
+
+ global $smarty;
+ $previousTemplate = $smarty->currentTemplate;
+ $smarty->currentTemplate = substr(basename($template), 0, -4);
+ $smarty->assign('module_dir', __PS_BASE_URI__.'modules/'.basename($file, '.php').'/');
+ if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.basename($file, '.php').'/'.$template))
+ {
+ $smarty->assign('module_template_dir', _THEME_DIR_.'modules/'.basename($file, '.php').'/');
+ $result = $smarty->fetch(_PS_THEME_DIR_.'modules/'.basename($file, '.php').'/'.$template);
+ }
+ elseif (Tools::file_exists_cache(dirname(__FILE__).'/'.$template))
+ {
+ $smarty->assign('module_template_dir', __PS_BASE_URI__.'modules/'.basename($file, '.php').'/');
+ $result = $smarty->fetch(dirname(__FILE__).'/'.$template);
+ }
+ else
+ $result = Tools::displayError('No template found');
+ $smarty->currentTemplate = $previousTemplate;
+ return $result;
+ }
+
}
diff --git a/modules/paypal/standard/redirect.php b/modules/paypal/standard/redirect.php
index 4c24f12cd..f611b8bf2 100644
--- a/modules/paypal/standard/redirect.php
+++ b/modules/paypal/standard/redirect.php
@@ -66,18 +66,18 @@ $smarty->assign(array(
'address' => $address,
'country' => $country,
'state' => $state,
- 'amount' => (float)($cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING)),
+ 'amount' => (float)($cart->getOrderTotal(true, PayPal::BOTH_WITHOUT_SHIPPING)),
'customer' => $customer,
- 'total' => (float)($cart->getOrderTotal(true, Cart::BOTH)),
- 'shipping' => Tools::ps_round((float)($cart->getOrderShippingCost()) + (float)($cart->getOrderTotal(true, Cart::ONLY_WRAPPING)), 2),
- 'discount' => $cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS),
+ 'total' => (float)($cart->getOrderTotal(true, PayPal::BOTH)),
+ 'shipping' => Tools::ps_round((float)($cart->getOrderShippingCost()) + (float)($cart->getOrderTotal(true, PayPal::ONLY_WRAPPING)), 2),
+ 'discount' => $cart->getOrderTotal(true, PayPal::ONLY_DISCOUNTS),
'business' => $business,
'currency_module' => $currency_module,
'cart_id' => (int)($cart->id).'_'.pSQL($cart->secure_key),
'products' => $cart->getProducts(),
'paypal_id' => (int)($paypal->id),
'header' => $header,
- 'url' => Tools::getShopDomain(true, true).__PS_BASE_URI__
+ 'url' => PayPal::getShopDomain(true, true).__PS_BASE_URI__
));
diff --git a/modules/shopimporter/shopimporter.js b/modules/shopimporter/shopimporter.js
index 10275c5b7..4fc79c6f9 100644
--- a/modules/shopimporter/shopimporter.js
+++ b/modules/shopimporter/shopimporter.js
@@ -570,9 +570,9 @@ var shopImporter = {
onAfter:function(){
$('#steps').html('');
shopImporter.save = 1;
- if($('#import_module_name').attr('value') == 'importermagento')
+ if(type_connector == 'ws')
shopImporter.checkAndSaveConfigWS(shopImporter.save);
- else if ($('#import_module_name').attr('value') == 'importerosc')
+ else if (type_connector == 'db')
shopImporter.checkAndSaveConfig(shopImporter.save);
}
});
@@ -789,7 +789,7 @@ $(document).ready(function(){
$('#displayOptions').unbind('click').click(function(){
$('#displayOptions').show();
- if($('#import_module_name').attr('value') == 'importermagento')
+ if(type_connector == 'ws')
{
if($('#loginws').val() == '' || $('#apikey').val() == '' || $('#url').val() == '')
{
@@ -805,7 +805,7 @@ $(document).ready(function(){
return false;
}
- else if ($('#import_module_name').attr('value') == 'importerosc')
+ else if (type_connector == 'db')
{
moduleName = $('#import_module_name').val();
server = $('#server').val();
@@ -836,7 +836,7 @@ $(document).ready(function(){
moduleName = $('#import_module_name').val();
if (validateSpecificOptions(moduleName, shopImporter.specificOptions) == true)
{
- if($('#import_module_name').attr('value') == 'importermagento')
+ if(type_connector == 'ws')
{
$.scrollTo($('#steps'), 300 , {
onAfter:function(){
@@ -862,7 +862,7 @@ $(document).ready(function(){
return false;
}
});
- }else if ($('#import_module_name').attr('value') == 'importerosc')
+ }else if (type_connector == 'db')
{
$.scrollTo($('#steps'), 300 , {
onAfter:function(){
diff --git a/modules/shopimporter/shopimporter.php b/modules/shopimporter/shopimporter.php
index 1632d67bc..6a4de6005 100644
--- a/modules/shopimporter/shopimporter.php
+++ b/modules/shopimporter/shopimporter.php
@@ -413,7 +413,6 @@ class shopimporter extends ImportModule
-
';
return $html;
}
@@ -499,7 +498,7 @@ class shopimporter extends ImportModule
$json['hasError'] = true;
$json['error'] = $errors;
}
-
+
if ($save || Tools::isSubmit('syncLang') || Tools::isSubmit('syncLangWS'))
{
//add language if not exist in prestashop
@@ -551,21 +550,21 @@ class shopimporter extends ImportModule
$table = $this->supportedImports[strtolower($className)]['table'];
$object = new $className();
-
+
$rules = call_user_func(array($className, 'getValidationRules'), $className);
-
+
if ((sizeof($rules['requiredLang']) || sizeof($rules['sizeLang']) || sizeof($rules['validateLang']) || Tools::isSubmit('syncLangWS') || Tools::isSubmit('syncCurrency')))
{
$moduleName = Tools::getValue('moduleName');
if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php'))
{
-
+
require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php');
$importModule = new $moduleName();
$defaultLanguage = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
-
+
$languages = $importModule->getLangagues();
if (Tools::isSubmit('syncLangWS'))
@@ -573,10 +572,10 @@ class shopimporter extends ImportModule
$defaultIdLand = $importModule->getDefaultIdLang();
$defaultLanguageImport = new Language(Language::getIdByIso($languages[$defaultIdLand]['iso_code']));
if ($defaultLanguage->iso_code != $defaultLanguageImport->iso_code)
- $errors[] = $this->l('Default language doesn\'t match : ').' '.Configuration::get('PS_SHOP_NAME').' : '.$defaultLanguage->name.' â‰
+ $errors[] = $this->l('Default language doesn\'t match : ').' '.Configuration::get('PS_SHOP_NAME').' : '.$defaultLanguage->name.' â‰
'.$importModule->displayName.' : '.$defaultLanguageImport->name.' '.$this->l('Please change default language in your configuration');
}
-
+
if (Tools::isSubmit('syncCurrency'))
{
$defaultIdCurrency = $importModule->getDefaultIdCurrency();
@@ -585,7 +584,7 @@ class shopimporter extends ImportModule
$defaultCurrencyImport = new Currency((int)Currency::getIdByIsoCode($currencies[$defaultIdCurrency]['iso_code']));
else
$defaultCurrencyImport = new Currency((int)Currency::getIdByIsoCodeNum($currencies[$defaultIdCurrency]['iso_code_num']));
-
+
$defaultCurrency = new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT'));
if ($defaultCurrency->iso_code != $defaultCurrencyImport->iso_code)
$errors[] = $this->l('Default currency doesn\'t match : ').' '.Configuration::get('PS_SHOP_NAME').' : '.$defaultCurrency->name.' ≠'.$importModule->displayName.' : '.$defaultCurrencyImport->name.' '.$this->l('Please change default currency in your configuration');
@@ -596,7 +595,7 @@ class shopimporter extends ImportModule
else
die('{"hasError" : true, "error" : ["FATAL ERROR"], "datas" : []}');
}
-
+
foreach($fields as $key => $field)
{
$id = $this->supportedImports[strtolower($className)]['identifier'];
@@ -616,7 +615,7 @@ class shopimporter extends ImportModule
array_unshift($errors[sizeof($errors)-1], $field[$id]);
}
}
- if (sizeof($errors) > 0)
+ if (sizeof($errors) > 0)
{
$json['hasError'] = true;
$json['error'] = $errors;
@@ -652,14 +651,14 @@ class shopimporter extends ImportModule
if ($className == 'Category' AND (sizeof($fields) != (int)Tools::getValue('nbr_import')))
$this->updateCat();
}
- if (sizeof($errors) > 0 AND is_array($errors))
+ if (sizeof($errors) > 0 AND is_array($errors))
{
$json['hasError'] = true;
$json['error'] = $errors;
}
die(Tools::jsonEncode($json));
}
-
+
private function saveObject($className, $items)
{
$return = array();
@@ -667,13 +666,14 @@ class shopimporter extends ImportModule
//creating temporary fields for identifiers matching and password
if (array_key_exists('alterTable', $this->supportedImports[strtolower($className)]))
$this->alterTable(strtolower($className));
+ $matchIdLang = $this->getMatchIdLang(1);
foreach($items as $item)
{
$object = new $className;
$id = $item[$this->supportedImports[strtolower($className)]['identifier']];
if (array_key_exists('foreign_key', $this->supportedImports[strtolower($className)]))
$this->replaceForeignKey($item, $table);
- $matchIdLang = $this->getMatchIdLang(1);
+
foreach($item as $key => $val)
{
if ($key == 'passwd')
@@ -683,14 +683,16 @@ class shopimporter extends ImportModule
}
if (is_array($val) AND $key != 'images')
{
-
+ $tmp = array();
foreach($matchIdLang as $k => $v)
- if (($k != $v) AND array_key_exists($k, $val))
{
- $item[$key][$v] = $val[$k];
- unset($item[$key][$k]);
+ if (array_key_exists($k, $val))
+ {
+ $tmp[$v] = $val[$k];
}
- $object->$key = $item[$key];
+ }
+
+ $object->$key = $tmp;
}
else
$object->$key = $val;
@@ -863,7 +865,7 @@ class shopimporter extends ImportModule
foreach($item['images'] as $key => $image)
{
$tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'import');
- if (@copy($image, $tmpfile))
+ if (@copy(str_replace(' ', '%20', $image), $tmpfile))
{
$imagesTypes = ImageType::getImagesTypes($type);
@@ -1089,9 +1091,10 @@ class shopimporter extends ImportModule
$returnErrors[] = $this->l('the field').' '.call_user_func(array($className, 'displayFieldName'), $fieldLang, $className).' ('.$language['name'].') '.$this->l('is too long').' ('.$maxLength.' '.$this->l('chars max').')';
/* Checking for multilingual fields validity */
foreach ($rules['validateLang'] AS $fieldLang => $function)
+ {
foreach ($languages AS $language)
{
- if (array_key_exists($fieldLang, $fields) AND ($value = $fields[$fieldLang][$language['id_lang']]) !== false AND !empty($value))
+ if (array_key_exists($fieldLang, $fields) AND array_key_exists($language['id_lang'], $fields[$fieldLang]) AND ($value = $fields[$fieldLang][$language['id_lang']]) !== false AND !empty($value))
{
if (!Validate::$function($value))
if ($hasErrors == 2)
@@ -1107,6 +1110,7 @@ class shopimporter extends ImportModule
}
}
}
+ }
return $returnErrors;
}
@@ -1152,8 +1156,8 @@ class shopimporter extends ImportModule
}
else
$returnErrors[] = $this->l('the field').' '.call_user_func(array($className, 'displayFieldName'), $field, $className).' '.$this->l('is invalid');
-
-
+
+
return $returnErrors;
}
public function checkAndAddLang ($languages, $add = true)
@@ -1233,9 +1237,9 @@ class shopimporter extends ImportModule
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country_lang');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country');
case 'group' :
- Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group');
- Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'ps_group_lang');
- Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'group');
+ Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group');
+ Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'group_lang');
+ Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'group');
break;
case 'combination' :
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute');
diff --git a/modules/shoppingfluxexport/config.xml b/modules/shoppingfluxexport/config.xml
new file mode 100755
index 000000000..1b0724919
--- /dev/null
+++ b/modules/shoppingfluxexport/config.xml
@@ -0,0 +1,13 @@
+
+
+ shoppingfluxexport
+
+
+
+
+
+ Êtes-vous sur de vouloir supprimer ce module ?
+ 1
+ 1
+
+
\ No newline at end of file
diff --git a/modules/shoppingfluxexport/flux.php b/modules/shoppingfluxexport/flux.php
new file mode 100755
index 000000000..c7a021ad1
--- /dev/null
+++ b/modules/shoppingfluxexport/flux.php
@@ -0,0 +1,37 @@
+
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 9074 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+include(dirname(__FILE__).'/../../config/config.inc.php');
+include(dirname(__FILE__).'/../../init.php');
+
+include(dirname(__FILE__).'/shoppingfluxexport.php');
+@ini_set('display_errors', 'off');
+
+$f = new shoppingfluxexport();
+echo $f->generateFlux();
+
+
diff --git a/modules/shoppingfluxexport/fr.php b/modules/shoppingfluxexport/fr.php
new file mode 100644
index 000000000..090cb3686
--- /dev/null
+++ b/modules/shoppingfluxexport/fr.php
@@ -0,0 +1,8 @@
+shoppingfluxexport_fea9f8736d4903ba7394eae6c6c4a48b'] = 'Export Shopping Flux';
+$_MODULE['<{shoppingfluxexport}prestashop>shoppingfluxexport_532e375ed3b53b3c888a6bf214329e60'] = 'Export du catalogue pour Shopping Flux';
+$_MODULE['<{shoppingfluxexport}prestashop>shoppingfluxexport_5abb27355099ec51416a3f003fe63711'] = 'Êtes-vous sur de vouloir supprimer ce module ?';
+$_MODULE['<{shoppingfluxexport}prestashop>shoppingfluxexport_68a59c7fd2c1bf8103225a22a6088235'] = 'Adresse du fichier :';
diff --git a/modules/shoppingfluxexport/logo.gif b/modules/shoppingfluxexport/logo.gif
new file mode 100755
index 000000000..9768abdf1
Binary files /dev/null and b/modules/shoppingfluxexport/logo.gif differ
diff --git a/modules/shoppingfluxexport/shoppingfluxexport.php b/modules/shoppingfluxexport/shoppingfluxexport.php
new file mode 100755
index 000000000..e75186ad4
--- /dev/null
+++ b/modules/shoppingfluxexport/shoppingfluxexport.php
@@ -0,0 +1,208 @@
+
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 9074 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+if (!defined('_PS_VERSION_'))
+ exit;
+
+class shoppingfluxexport extends Module
+{
+
+ public function __construct()
+ {
+ $this->name = 'shoppingfluxexport';
+ $this->tab = 'advertising_marketing';
+ $this->version = '1.4.1';
+
+ parent::__construct();
+
+ $this->displayName = $this->l('Export Shopping Flux');
+ $this->description = $this->l('Export du catalogue pour Shopping Flux');
+ $this->confirmUninstall = $this->l('Êtes-vous sur de vouloir supprimer ce module ?');
+ }
+
+ public function install()
+ {
+ // Create Token
+ if (!Configuration::updateValue('SHOPPING_FLUX_TOKEN', md5(rand())))
+ return false;
+
+ // Install Module
+ if (!parent::install())
+ return false;
+
+ return true;
+ }
+
+ public function uninstall()
+ {
+ // Delete Token
+ if (!Configuration::deleteByName('SHOPPING_FLUX_TOKEN'))
+ return false;
+
+ // Uninstall Module
+ if (!parent::uninstall())
+ return false;
+
+ return true;
+ }
+
+ public function getContent()
+ {
+ if (isset($_POST['generateFlux']) && $_POST['generateFlux'] != NULL)
+ $this->generateFlux();
+
+ $uri = 'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/shoppingfluxexport/flux.php?token='.Configuration::get('SHOPPING_FLUX_TOKEN');
+
+ $this->_html = ''.$this->displayName.'
+
+ ';
+
+ return $this->_html;
+ }
+
+ private function clean($string)
+ {
+
+ $string = str_replace("\r\n", " ", $string);
+ $string = str_replace("|", " ", $string);
+
+ return $string;
+ }
+
+ public function generateFlux()
+ {
+ if (Tools::getValue('token') == '' || Tools::getValue('token') != Configuration::get('SHOPPING_FLUX_TOKEN'))
+ die('Invalid Token');
+
+ $titles = array(
+ 0 => 'id_produit',
+ 1 => 'nom_produit',
+ 2 => 'url_produit',
+ 3 => 'url_image',
+ 4 => 'description',
+ 5 => 'description_courte',
+ 6 => 'prix',
+ 7 => 'prix_barre',
+ 8 => 'frais_de_port',
+ 9 => 'delaiLiv',
+ 10 => 'marque',
+ 11 => 'rayon',
+ 12 => 'stock',
+ 13 => 'qte_stock',
+ 14 => 'EAN',
+ 15 => 'poids',
+ 16 => 'ecotaxe',
+ 17 => 'TVA',
+ 18 => 'Reference constructeur',
+ 19 => 'Reference fournisseur'
+ );
+
+ echo implode("|", $titles)."\r\n";
+
+ //For Shipping
+ $configuration = Configuration::getMultiple(array('PS_TAX_ADDRESS_TYPE','PS_CARRIER_DEFAULT','PS_COUNTRY_DEFAULT', 'PS_LANG_DEFAULT', 'PS_SHIPPING_FREE_PRICE', 'PS_SHIPPING_HANDLING', 'PS_SHIPPING_METHOD', 'PS_SHIPPING_FREE_WEIGHT'));
+
+ $products = Product::getSimpleProducts($configuration['PS_LANG_DEFAULT']);
+
+ $defaultCountry = new Country($configuration['PS_COUNTRY_DEFAULT'], Configuration::get('PS_LANG_DEFAULT'));
+ $id_zone = (int)$defaultCountry->id_zone;
+
+ $carrier = new Carrier((int)$configuration['PS_CARRIER_DEFAULT']);
+ $carrierTax = Tax::getCarrierTaxRate((int)$carrier->id, (int)$this->{$configuration['PS_TAX_ADDRESS_TYPE']});
+
+ foreach ($products as $key => $produit)
+ {
+ $product = new Product((int)($produit['id_product']), true, $configuration['PS_LANG_DEFAULT']);
+
+ //For links
+ $link = new Link();
+
+ //For images
+ $cover = $product->getCover($product->id);
+ $ids = $product->id.'-'.$cover['id_image'];
+
+ //For shipping
+
+ if ($product->getPrice(true, NULL, 2, NULL, false, true, 1) >= (float)($configuration['PS_SHIPPING_FREE_PRICE']) AND (float)($configuration['PS_SHIPPING_FREE_PRICE']) > 0)
+ $shipping = 0;
+ elseif (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $product->weight >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0)
+ $shipping = 0;
+ else
+ {
+ if (isset($configuration['PS_SHIPPING_HANDLING']) AND $carrier->shipping_handling)
+ $shipping = (float)($configuration['PS_SHIPPING_HANDLING']);
+
+ if ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT)
+ $shipping += $carrier->getDeliveryPriceByWeight($product->weight, $id_zone);
+ else
+ $shipping += $carrier->getDeliveryPriceByPrice($product->getPrice(true, NULL, 2, NULL, false, true, 1), $id_zone);
+
+ $shipping *= 1 + ($carrierTax / 100);
+ $shipping = (float)(Tools::ps_round((float)($shipping), 2));
+
+ }
+
+ $data = array();
+ $data[0] = $product->id;
+ $data[1] = $product->name;
+ $data[2] = $link->getProductLink($product);
+ $data[3] = $link->getImageLink($product->link_rewrite, $ids, 'large');
+ $data[4] = $product->description;
+ $data[5] = $product->description_short;
+ $data[6] = $product->getPrice(true, NULL, 2, NULL, false, true, 1);
+ $data[7] = $product->getPrice(true, NULL, 2, NULL, false, false, 1);
+ $data[8] = $shipping;
+ $data[9] = $carrier->delay[2];
+ $data[10] = $product->manufacturer_name;
+ $data[11] = $product->category;
+ $data[12] = ($product->quantity > 0) ? 'oui' : 'non';
+ $data[13] = $product->quantity;
+ $data[14] = $product->ean13;
+ $data[15] = $product->weight;
+ $data[16] = $product->ecotax;
+ $data[17] = $product->tax_rate;
+ $data[18] = $product->reference;
+ $data[19] = $product->supplier_reference;
+
+ foreach($data as $key => $value)
+ $data[$key] = $this->clean($value);
+
+ echo implode("|", $data)."\r\n";
+
+ }
+ }
+}
+
diff --git a/modules/statsforecast/statsforecast.php b/modules/statsforecast/statsforecast.php
index 63caa2004..c5483456f 100644
--- a/modules/statsforecast/statsforecast.php
+++ b/modules/statsforecast/statsforecast.php
@@ -80,12 +80,9 @@ class StatsForecast extends Module
$currency = $this->context->currency;
$employee = $this->context->employee;
- // @todo use PHP functions to get timestamp ...
- $result = $db->getRow('SELECT UNIX_TIMESTAMP(\'2009-06-05 00:00:00\') as t1, UNIX_TIMESTAMP(\''.$employee->stats_date_from.' 00:00:00\') as t2');
- $from = max($result['t1'], $result['t2']);
+ $from = max(strtotime(_PS_CREATION_DATE_.' 00:00:00'), strtotime($employee->stats_date_from.' 00:00:00'));
$to = strtotime($employee->stats_date_to.' 23:59:59');
- $result2 = $db->getRow('SELECT UNIX_TIMESTAMP(NOW()) as t1, UNIX_TIMESTAMP(\''.$employee->stats_date_to.' 23:59:59\') as t2');
- $to2 = min($result2['t1'], $result2['t2']);
+ $to2 = min(time(), $to);
$interval = ($to - $from) / 60 / 60 / 24;
$interval2 = ($to2 - $from) / 60 / 60 / 24;
$prop30 = $interval / $interval2;
@@ -99,18 +96,17 @@ class StatsForecast extends Module
if ($this->context->cookie->stats_granularity == 42)
$intervalAvg = $interval2 / 7;
- // @todo : to remove
- if (!defined('PS_BASE_URI'))
- define('PS_BASE_URI', '/');
- $result = $db->getRow('SELECT UNIX_TIMESTAMP(\'2009-06-05\') as t1, UNIX_TIMESTAMP(\''.$employee->stats_date_from.'\') as t2');
- $from = max($result['t1'], $result['t2']);
- $to = strtotime($employee->stats_date_to.'');
+ $dataTable = array();
+ if ($cookie->stats_granularity == 10)
+ for ($i = $from; $i <= $to2; $i = strtotime('+1 day', $i))
+ $dataTable[date('Y-m-d', $i)] = array('fix_date' => date('Y-m-d', $i), 'countOrders' => 0, 'countProducts' => 0, 'totalProducts' => 0);
$dateFromGAdd = ($this->context->cookie->stats_granularity != 42
- ? 'SUBSTRING(date_add, 1, '.(int)$this->context->cookie->stats_granularity.')'
+ ? 'LEFT(date_add, '.(int)$this->context->cookie->stats_granularity.')'
: 'IFNULL(MAKEDATE(YEAR(date_add),DAYOFYEAR(date_add)-WEEKDAY(date_add)), CONCAT(YEAR(date_add),"-01-01*"))');
+
$dateFromGInvoice = ($this->context->cookie->stats_granularity != 42
- ? 'SUBSTRING(invoice_date, 1, '.(int)$this->context->cookie->stats_granularity.')'
+ ? 'LEFT(invoice_date, '.(int)$this->context->cookie->stats_granularity.')'
: 'IFNULL(MAKEDATE(YEAR(invoice_date),DAYOFYEAR(invoice_date)-WEEKDAY(invoice_date)), CONCAT(YEAR(invoice_date),"-01-01*"))');
$sql = 'SELECT
@@ -128,17 +124,8 @@ class StatsForecast extends Module
ORDER BY fix_date';
$result = $db->executeS($sql, false);
- $dataTable = array();
- if ($this->context->cookie->stats_granularity == 10)
- {
- $dateEnd = strtotime($employee->stats_date_to.' 23:59:59');
- $dateToday = time();
- for ($i = strtotime($employee->stats_date_from.' 00:00:00'); $i <= $dateEnd && $i <= $dateToday; $i += 86400)
- $dataTable[$i] = array('fix_date' => date('Y-m-d', $i), 'countOrders' => 0, 'countProducts' => 0, 'totalProducts' => 0);
- }
-
while ($row = $db->nextRow($result))
- $dataTable[strtotime($row['fix_date'])] = $row;
+ $dataTable[$row['fix_date']] = $row;
$this->_html .= '
'.$this->displayName.'
diff --git a/modules/themeinstallator/themeinstallator.php b/modules/themeinstallator/themeinstallator.php
index dc39db163..147ccd9cd 100644
--- a/modules/themeinstallator/themeinstallator.php
+++ b/modules/themeinstallator/themeinstallator.php
@@ -319,6 +319,12 @@ class ThemeInstallator extends Module
*/
public function getContent()
{
+ /* PrestaShop demo mode */
+ if (_PS_MODE_DEMO_)
+ {
+ return ''.Tools::displayError('This functionnality has been disabled.').'
';
+
+ }
self::init_defines();
if (!Tools::isSubmit('cancelExport') AND $this->page == 'exportPage')
return self::getContentExport();
diff --git a/modules/tntcarrier/carrier.jpg b/modules/tntcarrier/carrier.jpg
new file mode 100644
index 000000000..92d5fabb3
Binary files /dev/null and b/modules/tntcarrier/carrier.jpg differ
diff --git a/modules/tntcarrier/classes/OrderInfoTnt.php b/modules/tntcarrier/classes/OrderInfoTnt.php
new file mode 100644
index 000000000..88af8e06a
--- /dev/null
+++ b/modules/tntcarrier/classes/OrderInfoTnt.php
@@ -0,0 +1,68 @@
+_idOrder = $id_order;
+ }
+
+ public function getInfo()
+ {
+ $info = Db::getInstance()->ExecuteS('SELECT o.shipping_number, a.lastname, a.firstname, a.address1, a.address2, a.postcode, a.city, a.phone, c.email, c.id_customer, a.company
+ FROM `'._DB_PREFIX_.'orders` as o, `'._DB_PREFIX_.'address` as a, `'._DB_PREFIX_.'customer` as c
+ WHERE o.id_order = "'.$this->_idOrder.'" AND a.id_address = o.id_address_delivery AND c.id_customer = o.id_customer');
+ if (!$info)
+ return false;
+ $weight = Db::getInstance()->ExecuteS('SELECT p.weight, o.product_quantity
+ FROM `'._DB_PREFIX_.'order_detail` as o, `'._DB_PREFIX_.'product` as p
+ WHERE o.id_order = "'.$this->_idOrder.'" AND p.id_product = o.product_id');
+ $option = Db::getInstance()->ExecuteS('SELECT t.option
+ FROM `'._DB_PREFIX_.'tnt_carrier_option` as t , `'._DB_PREFIX_.'orders` as o
+ WHERE t.id_carrier = o.id_carrier AND o.id_order = "'.$this->_idOrder.'"');
+ if ($option != null && strpos($option[0]['option'], "D") !== false)
+ $dropOff = Db::getInstance()->ExecuteS('SELECT d.code, d.name, d.address, d.zipcode, d.city
+ FROM `'._DB_PREFIX_.'tnt_carrier_drop_off` as d , `'._DB_PREFIX_.'orders` as o
+ WHERE d.id_cart = o.id_cart AND o.id_order = "'.$this->_idOrder.'"');
+ $w = 0;
+ $tooBig = false;
+ foreach ($weight as $key => $val)
+ {
+ while ($val['product_quantity'] > 0)
+ {
+ if ((int)($val['weight']) > 20)
+ return "Un ou plusieurs articles sont supérieurs à 20 Kg Vous devez contacter votre commercial TNT";
+ if ($w + $val['weight'] > 20)
+ {
+ $info[1]['weight'][] = (string)($w);
+ $w = $val['weight'];
+ }
+ else
+ $w += $val['weight'];
+ $val['product_quantity']--;
+ }
+ }
+ $info[1]['weight'][] = (string)($w);
+
+ if (date("N") == 5)
+ $next_day = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+3, date("Y")));
+ elseif (date("N") == 6)
+ $next_day = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+2, date("Y")));
+ else
+ $next_day = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+1, date("Y")));
+ $newDate = Tools::getValue('dateErrorOrder');
+ $info[2] = array('delivery_date' => ($newDate != '' ? $newDate : $next_day));
+ if ($option)
+ $info[3] = array('option' => $option[0]['option']);
+ if (isset($dropOff))
+ $info[4] = $dropOff[0];
+ else
+ $info[4] = null;
+ return $info;
+ }
+
+}
+
+?>
diff --git a/modules/tntcarrier/classes/PackageTnt.php b/modules/tntcarrier/classes/PackageTnt.php
new file mode 100644
index 000000000..0b02866a5
--- /dev/null
+++ b/modules/tntcarrier/classes/PackageTnt.php
@@ -0,0 +1,40 @@
+_idOrder = $id_order;
+ $this->_order = new Order((int)($this->_idOrder));
+ }
+
+ public function setShippingNumber($number)
+ {
+ if ($this->_order->shipping_number == '')
+ {
+ $this->_order->shipping_number = $number;
+ $this->_order->update();
+ }
+ $this->insertSql($number);
+ }
+
+ public function getShippingNumber()
+ {
+ $tab = Db::getInstance()->ExecuteS('SELECT `shipping_number` FROM `'._DB_PREFIX_.'tnt_carrier_shipping_number` WHERE `id_order` = "'.(int)($this->_idOrder).'"');
+ return ($tab);
+ }
+
+ public function insertSql($number)
+ {
+ Db::getInstance()->ExecuteS('INSERT INTO `'._DB_PREFIX_.'tnt_carrier_shipping_number` (`id_order`, `shipping_number`)
+ VALUES ("'.(int)($this->_idOrder).'", "'.$number.'")');
+ }
+
+ public function getOrder()
+ {
+ return ($this->_order);
+ }
+}
\ No newline at end of file
diff --git a/modules/tntcarrier/classes/TntWebService.php b/modules/tntcarrier/classes/TntWebService.php
new file mode 100644
index 000000000..0632b6394
--- /dev/null
+++ b/modules/tntcarrier/classes/TntWebService.php
@@ -0,0 +1,238 @@
+_login = Configuration::get('TNT_CARRIER_LOGIN');
+ $this->_password = Configuration::get('TNT_CARRIER_PASSWORD');
+ $this->_account = Configuration::get('TNT_CARRIER_NUMBER_ACCOUNT');
+
+ $this->_authheader = $this->genAuth();
+ $this->_authvars = new SoapVar($this->_authheader, XSD_ANYXML);
+ $this->_header = new SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security", $this->_authvars);
+ $this->_file = "http://www.tnt.fr/service/?wsdl";
+ }
+
+ public function genAuth()
+ {
+ return sprintf('
+
+
+ %s
+ %s
+
+ ', htmlspecialchars($this->_login), htmlspecialchars($this->_password));
+ }
+
+ public function faisabilite($dateExpedition, $codePostalDepart, $communeDepart, $codePostalArrivee, $communeArrivee, $typeDestinataire)
+ {
+ $soapclient = new SoapClient($this->_file, array('trace'=>1));
+ $soapclient->__setSOAPHeaders(array($this->_header));
+
+ $sender = array("zipCode" => $codePostalDepart, "city" => $communeDepart);
+ $receiver = array("zipCode" => $codePostalArrivee, "city" => $communeArrivee, "type" => $typeDestinataire);
+ $parameters = array("accountNumber" => $this->_account, "shippingDate" => $dateExpedition, "sender" => $sender, "receiver" => $receiver);
+ $services = $soapclient->feasibility(array('parameters' => $parameters));
+ return ($services);
+ }
+
+ public function putCityInNormeTnt($city)
+ {
+ $city = iconv("utf-8", 'ASCII//TRANSLIT', $city);
+ $city = mb_strtoupper($city, 'utf-8');
+ $table = array('`' => '','\''=> '', '^' => '','À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
+ 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',
+ 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B');
+ $city = strtr($city, $table);
+ $old = array("SAINT", "-");
+ $new = array("ST", " ");
+ return (str_replace($old, $new, $city));
+ }
+
+ public function getPackage($info)
+ {
+ $soapclient = new SoapClient($this->_file, array('trace'=>1));
+ $soapclient->__setSOAPHeaders(array($this->_header));
+
+ $sender = array(
+ 'type' => (Configuration::get('TNT_CARRIER_SHIPPING_COLLECT') ? "ENTERPRISE" : "DEPOT"), //ENTREPRISE OR DEPOT
+ 'typeId' => (Configuration::get('TNT_CARRIER_SHIPPING_COLLECT') ? "" : Configuration::get('TNT_CARRIER_SHIPPING_PEX')) , // code PEX if DEPOT is ON
+ 'name' => Configuration::get('TNT_CARRIER_SHIPPING_COMPANY'), // raison social
+ 'address1' => Configuration::get('TNT_CARRIER_SHIPPING_ADDRESS1'),
+ 'address2' => Configuration::get('TNT_CARRIER_SHIPPING_ADDRESS2'),
+ 'zipCode' => Configuration::get('TNT_CARRIER_SHIPPING_ZIPCODE'),
+ 'city' => $this->putCityInNormeTnt(Configuration::get('TNT_CARRIER_SHIPPING_CITY')),
+ 'contactLastName' => Configuration::get('TNT_CARRIER_SHIPPING_LASTNAME'),
+ 'contactFirstName' => Configuration::get('TNT_CARRIER_SHIPPING_FIRSTNAME'),
+ 'emailAddress' => Configuration::get('TNT_CARRIER_SHIPPING_EMAIL'),
+ 'phoneNumber' => Configuration::get('TNT_CARRIER_SHIPPING_PHONE'),
+ 'faxNumber' => '' //may be later
+ );
+
+ if ($info[4] == null)
+ $receiver = array(
+ 'type' => ($info[0]['company'] != '' ? "ENTERPRISE" : 'INDIVIDUAL'), // ENTREPRISE DEPOT DROPOFFPOINT INDIVIDUAL
+ 'typeId' => '', // IF DEPOT => code PEX else if DROPOFFPOINT => XETT
+ 'name' => ($info[0]['company'] != '' ? $info[0]['company'] : ''),
+ 'address1' => $info[0]['address1'],
+ 'address2' => $info[0]['address2'],
+ 'zipCode' => $info[0]['postcode'],
+ 'city' => $this->putCityInNormeTnt($info[0]['city']),
+ 'instructions' => '',
+ 'contactLastName' => $info[0]['lastname'],
+ 'contactFirstName' => $info[0]['firstname'],
+ 'emailAddress' => $info[0]['email'],
+ 'phoneNumber' => $info[0]['phone'],
+ 'accessCode' => '',
+ 'floorNumber' => '',
+ 'buildingId' => '',
+ 'sendNotification' => ''
+ );
+ else
+ $receiver = array(
+ 'type' => 'DROPOFFPOINT', // ENTREPRISE DEPOT DROPOFFPOINT INDIVIDUAL
+ 'typeId' => $info[4]['code'], // IF DEPOT => code PEX else if DROPOFFPOINT => XETT
+ 'name' => $info[4]['name'],
+ 'address1' => $info[4]['address'],
+ 'address2' => '',
+ 'zipCode' => $info[4]['zipcode'],
+ 'city' => $info[4]['city'],
+ 'instructions' => '',
+ 'contactLastName' => $info[0]['lastname'],
+ 'contactFirstName' => $info[0]['firstname'],
+ 'emailAddress' => $info[0]['email'],
+ 'phoneNumber' => $info[0]['phone'],
+ 'accessCode' => '',
+ 'floorNumber' => '',
+ 'buildingId' => '',
+ 'sendNotification' => ''
+ );
+
+ foreach ($info[1]['weight'] as $k => $v)
+ {
+ $parcelRequest[$k] = array(
+ 'sequenceNumber' => $k + 1, // package number, there's only one at this moment
+ 'customerReference' => $info[0]['id_customer'], // customer ref
+ 'weight' => $v,
+ 'insuranceAmount' => '',
+ 'priorityGuarantee' => '',
+ 'comment' => ''
+ );
+ }
+
+ $parcelsRequest = array('parcelRequest' => $parcelRequest);
+
+ $pickUpRequest = array(
+ 'media' => "EMAIL",
+ 'faxNumber' => "",
+ 'emailAddress' => Configuration::get('TNT_CARRIER_SHIPPING_EMAIL'),
+ 'notifySuccess' => "1",
+ 'service' => "",
+ 'lastName' => "",
+ 'firstName' => "",
+ 'phoneNumber' => Configuration::get('TNT_CARRIER_SHIPPING_PHONE'),
+ 'closingTime' => Configuration::get('TNT_CARRIER_SHIPPING_CLOSING'),
+ 'instructions' => ""
+ );
+
+ if (Configuration::get('TNT_CARRIER_SHIPPING_COLLECT') == 1)
+ {
+ $paremeters = array(
+ 'pickUpRequest' => $pickUpRequest,
+ 'shippingDate' => $info[2]['delivery_date'],
+ 'accountNumber' => Configuration::get('TNT_CARRIER_NUMBER_ACCOUNT'),
+ 'sender' => $sender,
+ 'receiver' => $receiver,
+ 'serviceCode' => $info[3]['option'],
+ 'quantity' => count($info[1]['weight']), //number of package; count($parcelsRequest)
+ 'parcelsRequest' => $parcelsRequest,
+ 'saturdayDelivery' => '0',//Configuration::get('TNT_CARRIER_SHIPPING_DELIVERY'),
+ //'paybackInfo' => $paybackInfo,
+ 'labelFormat' => (!Configuration::get('TNT_CARRIER_PRINT_STICKER') ? "STDA4" : Configuration::get('TNT_CARRIER_PRINT_STICKER'))
+ );
+ }
+ else
+ {
+ $paremeters = array(
+ 'shippingDate' => $info[2]['delivery_date'],
+ 'accountNumber' => Configuration::get('TNT_CARRIER_NUMBER_ACCOUNT'),
+ 'sender' => $sender,
+ 'receiver' => $receiver,
+ 'serviceCode' => $info[3]['option'],
+ 'quantity' => count($info[1]['weight']), //number of package; count($parcelsRequest)
+ 'parcelsRequest' => $parcelsRequest,
+ 'saturdayDelivery' => '0',//Configuration::get('TNT_CARRIER_SHIPPING_DELIVERY'),
+ //'paybackInfo' => $paybackInfo,
+ 'labelFormat' => (!Configuration::get('TNT_CARRIER_PRINT_STICKER') ? "STDA4" : Configuration::get('TNT_CARRIER_PRINT_STICKER'))
+ );
+ }
+ $package = $soapclient->expeditionCreation(array('parameters' => $paremeters));
+ return $package;
+ }
+
+ public function followPackage($transport)
+ {
+ $soapclient = new SoapClient($this->_file, array('trace'=>1));
+ $soapclient->__setSOAPHeaders(array($this->_header));
+
+ $reponse = $soapclient->trackingByConsignment(array('parcelNumber' => $transport));
+
+ if (isset($reponse->Parcel) && $reponse->Parcel)
+ {
+ $colis = $reponse->Parcel;
+ $expediteur = $colis->sender;
+ $destinataire = $colis->receiver;
+ $evenements = $colis->events;
+
+ $requestDate = new DateTime($evenements->requestDate);
+ $processDate = new DateTime($evenements->processDate);
+ $arrivalDate = new DateTime($evenements->arrivalDate);
+ $deliveryDepartureDate = new DateTime($evenements->deliveryDepartureDate);
+ $deliveryDate = new DateTime($evenements->deliveryDate);
+ }
+
+ $packageParam = array(
+ 'number' => (isset($colis->consignmentNumber) ? $colis->consignmentNumber : ''),
+ 'status' => (isset($colis->shortStatus) ? $colis->shortStatus : ''),
+ 'account_number' => (isset($colis->accountNumber) ? $colis->accountNumber : ''),
+ 'service' => (isset($colis->service) ? $colis->service : ''),
+ 'reference' => (isset($colis->reference) ? $colis->reference : ''),
+ 'weight' => (isset($colis->weight) ? $colis->weight : ''),
+ 'expediteur_name' => (isset($expediteur->name) ? $expediteur->name : ''),
+ 'expediteur_addr1' => (isset($expediteur->address1) ? $expediteur->address1 : ''),
+ 'expediteur_addr2' => (isset($expediteur->address2) ? $expediteur->address2 : ''),
+ 'expediteur_zipcode' => (isset($expediteur->zipCode) ? $expediteur->zipCode : ''),
+ 'expediteur_city' => (isset($expediteur->city) ? $expediteur->city : ''),
+ 'destinataire_name' => (isset($destinataire->name) ? $destinataire->name : ''),
+ 'destinataire_addr1' => (isset($destinataire->address1) ? $destinataire->address1 : ''),
+ 'destinataire_addr2' => (isset($destinataire->address2) ? $destinataire->address2 : ''),
+ 'destinataire_zipcode' => (isset($destinataire->zipCode) ? $destinataire->zipCode : ''),
+ 'destinataire_city' => (isset($destinataire->city) ? $destinataire->city : ''),
+ 'request' => (isset($evenements->requestDate) ? $evenements->requestDate : ''),
+ 'requestDate' => (isset($requestDate) && isset($evenements->requestDate) ? $requestDate : ''),
+ 'process' => (isset($evenements->processDate) ? $evenements->processDate : ''),
+ 'process_date' => (isset($processDate) && isset($evenements->processDate) ? $processDate : ''),
+ 'process_center' => (isset($evenements->processCenter) ? $evenements->processCenter : ''),
+ 'arrival' => (isset($evenements->arrivalDepartureDate) ? $evenements->arrivalDepartureDate : ''),
+ 'arrival_date' => (isset($arrivalDate) ? $arrivalDate : ''),
+ 'arrival_center' => (isset($evenements->arrivalCenter) ? $evenements->arrivalCenter : ''),
+ 'delivery_departure' => (isset($evenements->deliveryDepartureDate) ? $evenements->deliveryDepartureDate : ''),
+ 'delivery_departure_date' => (isset($deliveryDepartureDate) ? $deliveryDepartureDate : ''),
+ 'delivery_departure_center' => (isset($evenements->deliveryDepartureCenter) ? $evenements->deliveryDepartureCenter : ''),
+ 'delivery' => (isset($evenements->deliveryDate) ? $evenements->deliveryDate : ''),
+ 'delivery_date' => (isset($deliveryDate) ? $deliveryDate : ''),
+ 'long_status' => (isset($colis->longStatus) ? $colis->longStatus : ''),
+ 'linkPicture' => (isset($colis->primaryPODUrl) ? $colis->primaryPODUrl : '')
+ );
+ return $packageParam;
+ }
+}
+?>
\ No newline at end of file
diff --git a/modules/tntcarrier/classes/index.php b/modules/tntcarrier/classes/index.php
new file mode 100644
index 000000000..477abec6f
--- /dev/null
+++ b/modules/tntcarrier/classes/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 6594 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../../../");
+exit;
diff --git a/modules/tntcarrier/classes/serviceCache.php b/modules/tntcarrier/classes/serviceCache.php
new file mode 100644
index 000000000..7531b9b60
--- /dev/null
+++ b/modules/tntcarrier/classes/serviceCache.php
@@ -0,0 +1,58 @@
+_dateBefore = date("Y-m-d H:i:s", mktime(date("H"), date("i") - 15, date("s"), date("m") , date("d"), date("Y")));
+ $this->_dateNow = date('Y-m-d H:i:s');
+ $this->_idCard = $id_card;
+ $this->_zipCode = $zipcode;
+ }
+
+ public function getFaisabilityAtThisTime()
+ {
+ if (Db::getInstance()->getValue('SELECT * FROM `'._DB_PREFIX_.'tnt_carrier_cache_service` WHERE `date` >= "'.$this->_dateBefore.'" AND `date` <= "'.$this->_dateNow.'" AND id_card = "'.(int)($this->_idCard).'" AND zipcode = "'.$this->_zipCode.'"'))
+ return true;
+ return false;
+ }
+
+ public function deletePreviousServices()
+ {
+ Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'tnt_carrier_cache_service` WHERE `id_card` = "'.(int)($this->_idCard).'"');
+ }
+
+ public static function deleteServices($idCard)
+ {
+ Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'tnt_carrier_cache_service` WHERE `id_card` = "'.(int)($idCard).'"');
+ }
+
+ public function putInCache($service, $serviceRelais)
+ {
+ if (isset($service))
+ {
+ if (is_array($service->Service))
+ foreach ($service->Service as $k => $v)
+ Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'tnt_carrier_cache_service` (`id_card`, `code`, `date`, `zipcode`) VALUES ("'.(int)($this->_idCard).'", "'.$v->serviceCode.'","'.$this->_dateNow.'", "'.$this->_zipCode.'")');
+ else
+ Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'tnt_carrier_cache_service` (`id_card`, `code`, `date`, `zipcode`) VALUES ("'.(int)($this->_idCard).'", "'.$service->Service->serviceCode.'","'.$this->_dateNow.'", "'.$this->_zipCode.'")');
+ }
+ if (isset($serviceRelais))
+ {
+ foreach ($serviceRelais as $v)
+ Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'tnt_carrier_cache_service` (`id_card`, `code`, `date`, `zipcode`) VALUES ("'.(int)($this->_idCard).'", "'.$v->serviceCode.'","'.$this->_dateNow.'", "'.$this->_zipCode.'")');
+ }
+ }
+
+ public function getServices()
+ {
+ return (Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tnt_carrier_cache_service` WHERE id_card = "'.(int)($this->_idCard).'"'));
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/modules/tntcarrier/config.xml b/modules/tntcarrier/config.xml
new file mode 100644
index 000000000..f0d26a86b
--- /dev/null
+++ b/modules/tntcarrier/config.xml
@@ -0,0 +1,12 @@
+
+
+ tntcarrier
+
+
+
+
+
+ 1
+ 1
+ fr
+
\ No newline at end of file
diff --git a/modules/tntcarrier/css/index.php b/modules/tntcarrier/css/index.php
new file mode 100644
index 000000000..477abec6f
--- /dev/null
+++ b/modules/tntcarrier/css/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 6594 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../../../");
+exit;
diff --git a/modules/tntcarrier/css/tntB2CRelaisColis.css b/modules/tntcarrier/css/tntB2CRelaisColis.css
new file mode 100644
index 000000000..488149a6f
--- /dev/null
+++ b/modules/tntcarrier/css/tntB2CRelaisColis.css
@@ -0,0 +1,371 @@
+.tntRCHeader {
+ background-color: #ffffff;
+ background-image: url(../img/logo_24_relaiscolis.jpg);
+ background-position: 10px center;
+ background-repeat: no-repeat;
+ border-color: gray;
+ border-style: solid;
+ border-width: 1px;
+ color: #a0a0a0;
+ display: bloc;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 30pt;
+ font-style: italic;
+ height: 75px;
+ padding-right: 10px;
+ padding-top: 25px;
+ text-align: right;
+ width: 490px;
+}
+
+#tntRCdetailRelaisEntete .tntRCHeader
+{
+ width:590px;
+}
+
+.tntRCSubHeader {
+ background-color: #ffffff;
+ border-width: 0px;
+ color: #a0a0a0;
+ display: bloc;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 16pt;
+ font-weight: bold;
+ padding-bottom: 3px;
+ padding-top: 3px;
+ width: 500px;
+}
+
+.tntRCBody {
+ background-color: #ffffff;
+ border-color: gray;
+ border-style: solid;
+ border-width: 1px;
+ color: #000000;
+ display: bloc;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 12pt;
+ padding-bottom: 10px;
+ padding-left: 10px;
+ padding-top: 10px;
+ width: 490px;
+}
+
+.tntRCBodySearch {
+ background-color: #ffffff;
+ border-color: gray;
+ border-style: solid;
+ border-width: 1px;
+ color: #a0a0a0;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 10pt;
+ font-weight: bold;
+ padding-left: 3px;
+ padding-top: 8px;
+ padding-bottom: 8px;
+ width: 497px;
+}
+
+.tntRCError {
+ background-color: #ff6600;
+ color: #ffffff;
+ display: bloc;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 12pt;
+ font-weight: bold;
+ width: 480px;
+}
+
+.tntRCGray {
+ background-color: #a0a0a0;
+ border-width: 0px;
+ display: bloc;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 10pt;
+ heigth: 12px;
+ width: 480px;
+}
+
+.tntRCInput {
+ background-color: #ffffff;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 10pt;
+ font-weight: normal;
+ text-align: center;
+ width: 50px;
+}
+
+.tntRCWhite {
+ background-color: #ffffff;
+ border-width: 0px;
+ display: bloc;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 14pt;
+ width: 500px;
+}
+
+.tntRCrelaisColis {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 10px;
+ color: #000000;
+ border-bottom-style: solid;
+ border-bottom-color: #a0a0a0;
+ border-bottom-width: 1px;
+ background-color: #ffffff;
+ padding-bottom: 3px;
+ vertical-align: middle;
+}
+
+.tntRCtitreMode {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 28px;
+ color: #a0a0a0;
+ font-style: italic;
+ background-color: #ffffff;
+}
+
+.tntRCchoix {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 14px;
+ color: #a0a0a0;
+ font-weight: bold;
+ background-color: #ffffff;
+}
+.tntRCdetailGros {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 14pt;
+ color: #a0a0a0;
+ background-color: #ffffff;
+}
+
+.tntRCnoirPetit {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 12pt;
+ color: #000000;
+ background-color: #ffffff;
+}
+
+.tntRCdetailPetit {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 12pt;
+ color: #a0a0a0;
+ background-color: #ffffff;
+ font-weight: bold;
+}
+
+.tntRCentree {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 12pt;
+ color: #000000;
+ background-color: #ffffff;
+ vertical-align: middle;
+}
+
+.tntRCgris {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 10pt;
+ color: #ffffff;
+ background-color: #a0a0a0;
+ font-weight: bold;
+}
+
+table.tntRCHoraire td {
+ border: 1px solid gray;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 10pt;
+ vertical-align: middle;
+}
+
+.tntRCHoraireJour{
+ color: #a0a0a0;
+ text-align: right;
+ padding-right: 10px;
+ height: 36px;
+ width: 79px;
+ font-weight: bold;
+}
+
+.tntRCHoraireHeure {
+ color: #000000;
+ padding-left: 10px;
+ width: 84px;
+}
+
+.tntRCblanc {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 12px;
+ color: #000000;
+ background-color: #ffffff;
+ padding-top: 4px;
+ padding-bottom: 3px;
+}
+ .tntRCblancpetit {
+ font-family: arial,helvetica,sans-serif;
+ font-size: 12px;
+ color: #000000;
+ background-color: #ffffff;
+ padding-top: 4px;
+ padding-bottom: 3px;
+}
+ .tntRCfermeture {
+ padding-left: 585px;
+}
+
+ .tntRCBack2Communes {
+ background-color: #ffffff;
+ color: #a0a0a0;
+ font-family: arial,helvetica,sans-serif;
+ font-style: italic;
+ font-size: 11pt;
+ font-weight: bold;
+ padding-top: 18px;
+ text-align: right;
+}
+
+ .tntRCBack2Communes a {
+ color: #a0a0a0;
+ text-decoration: none;
+ padding-right: 5px;
+}
+
+ .tntRCBack2Communes a img{
+ border: 0;
+ padding-right: 5px;
+ vertical-align: text-bottom;
+}
+
+ .tntRCBoutonLoupe {
+ background-color: #ffffff;
+ border: 0px;
+ color: #000000;
+ font-family: arial,helvetica,sans-serif;
+ font-size: 12px;
+ padding-top: 4px;
+ padding-bottom: 3px;
+ text-decoration: none;
+ vertical-align: middle;
+}
+ .jqmWindow {
+ background-color: #FFF;
+ border: 1px solid black;
+ color: #333;
+ display: none;
+ padding: 12px;
+ position: fixed;
+ left: 50%;
+ margin-left: -300px;
+ margin-top: -240px;
+ width: 500px;
+}
+
+ div.tntRCfermeture .jqmClose em{display:none;}
+ div.tntRCfermeture .jqmClose {
+ background: transparent url(../modules/tntcarrier/img/close_icon_double.png) 0 0 no-repeat;
+ display: block;
+ width: 20px;
+ height: 20px;
+}
+
+ div.tntRCfermeture a.jqmClose:hover{ background-position: 0 -20px; }
+
+ .jqmOverlay {
+ background-color: #000;
+ overflow: hidden;
+}
+
+ * html .jqmWindow {
+ position: absolute;
+ top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
+}
+
+ img.tntRCButton {
+ border: 0px;
+ vertical-align: middle;
+ text-decoration: none;
+}
+
+ sup.tntRCSup {
+
+}
+
+ table.horairesRC td {
+ width : 100%;
+ margin: 0px;
+ padding: 0px;
+ }
+
+ table.horairesRCPopup {
+ width : 100%;
+ margin: 0px;
+ padding: 0px;
+ }
+
+ table.horairesRCPopup tr.selected td {
+ background-color: #eeeeee;
+ color: #ff6600;
+ }
+
+ td.horaireRCPopup {
+ width : 60%;
+ }
+
+ td.horairesRCJourPopup {
+ width : 40%;
+ font-weight: bold;
+ color: #808080;
+ }
+
+ td.horairesRCJour {
+ font-weight: bold;
+ color: #808080;
+ }
+ table.horairesRC tr.selected td {
+ background-color: #eeeeee;
+ color: #ff6600;
+ }
+
+ div.ag {
+ background-image: url(/img/google/agenceTnt.png);
+ background-repeat: no-repeat;
+ padding-left:60px;
+ }
+
+ div.rc {
+ background-image: url(/img/google/relaisColis.png);
+ background-repeat: no-repeat;
+ padding-left:50px;
+ }
+
+
+#googleMapTnt .lien_reset {
+ color : #ff6600;
+ font-family: arial,helvetica,sans-serif;
+ font-weight: bold;
+ font-size : 15px;
+ text-decoration:none;
+}
+
+#googleMapTnt a {
+ color: #f60;
+ outline-color: #f60 !important;
+ outline: none;
+}
+
+#googleMapTnt a:hover {
+ text-decoration: none;
+}
+
+#googleMapTnt .exemplePresentation {
+ display: inline;
+ margin-top: 10px;
+}
+
+ #tntB2CRelaisColis {
+ width: 610px;
+}
+
+.detailRelais
+{
+ background: url("../img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png") repeat-x scroll 0 bottom #FCFDFD;
+ height:400px;
+}
\ No newline at end of file
diff --git a/modules/tntcarrier/css/ui.dialog.css b/modules/tntcarrier/css/ui.dialog.css
new file mode 100644
index 000000000..3c91bfad6
--- /dev/null
+++ b/modules/tntcarrier/css/ui.dialog.css
@@ -0,0 +1,158 @@
+/*
+ * jQuery UI screen structure and presentation
+ * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI
+ * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
+ * Visit ThemeRoller.com
+*/
+
+/*
+ * Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size.
+ * As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px.
+ * body {font-size: 62.5%;}
+*/
+
+
+/*dialog*/
+#googleMapTnt .ui-dialog {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;
+ font-size: 11px;
+ background: #fcfdfd url(../img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png) 0 bottom repeat-x;
+ color: #222222;
+ border: 3px solid #808080;
+ position: relative;
+}
+#googleMapTnt .ui-resizable-handle {
+ position: absolute;
+ font-size: 0.1px;
+ z-index: 99999;
+}
+#googleMapTnt .ui-resizable .ui-resizable-handle {
+ display: block;
+}
+#googleMapTnt .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
+#googleMapTnt .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
+#googleMapTnt .ui-resizable-n {
+ cursor: n-resize;
+ height: 7px;
+ width: 100%;
+ top: -5px;
+ left: 0px;
+}
+#googleMapTnt .ui-resizable-s {
+ cursor: s-resize;
+ height: 7px;
+ width: 100%;
+ bottom: -5px;
+ left: 0px;
+}
+#googleMapTnt .ui-resizable-e {
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0px;
+ height: 100%;
+}
+#googleMapTnt .ui-resizable-w {
+ cursor: w-resize;
+ width: 7px;
+ left: -5px;
+ top: 0px;
+ height: 100%;
+}
+#googleMapTnt .ui-resizable-se {
+ cursor: se-resize;
+ width: 13px;
+ height: 13px;
+ right: 0px;
+ bottom: 0px;
+ background: url(../img/ui-dialog/469bdd_11x11_icon_resize_se.gif) no-repeat 0 0;
+}
+#googleMapTnt .ui-resizable-sw {
+ cursor: sw-resize;
+ width: 9px;
+ height: 9px;
+ left: 0px;
+ bottom: 0px;
+}
+#googleMapTnt .ui-resizable-nw {
+ cursor: nw-resize;
+ width: 9px;
+ height: 9px;
+ left: 0px;
+ top: 0px;
+}
+#googleMapTnt .ui-resizable-ne {
+ cursor: ne-resize;
+ width: 9px;
+ height: 9px;
+ right: 0px;
+ top: 0px;
+}
+#googleMapTnt .ui-dialog-titlebar {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ padding: 5px 15px 5px 10px;
+ color: #2e6e9e;
+ border-bottom: 1px solid #c5dbec;
+ font-size: 10px;
+ font-weight: bold;
+ position: relative;
+}
+#googleMapTnt .ui-dialog-title {}
+#googleMapTnt .ui-dialog-titlebar-close {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ background: url(../img/ui-dialog/6da8d5_11x11_icon_close.gif) 0 0 no-repeat;
+ position: absolute;
+ right: 8px;
+ top: 7px;
+ width: 11px;
+ height: 11px;
+ z-index: 100;
+}
+#googleMapTnt .ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover {
+ background: url(../img/ui-dialog/217bc0_11x11_icon_close.gif) 0 0 no-repeat;
+}
+#googleMapTnt .ui-dialog-titlebar-close:active {
+ background: url(../img/ui-dialog/f9bd01_11x11_icon_close.gif) 0 0 no-repeat;
+}
+#googleMapTnt .ui-dialog-titlebar-close span {
+ display: none;
+}
+#googleMapTnt .ui-dialog-content {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ color: #222222;
+ padding: 15px 17px;
+}
+#googleMapTnt .ui-dialog-buttonpane {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ text-align: left;
+ border-top: 1px solid #a6c9e2;
+ background: #fcfdfd;
+}
+#googleMapTnt .ui-dialog-buttonpane button {
+ margin: 5px 0 5px 8px;
+ color: #2e6e9e;
+ background: #dfeffc url(../img/ui-dialog/dfeffc_40x100_textures_02_glass_85.png) 0 50% repeat-x;
+ font-size: 1;
+ border: 10px solid #c5dbec;
+ cursor: pointer;
+ padding: 2px 6px 3px 6px;
+ line-height: 14px;
+}
+#googleMapTnt .ui-dialog-buttonpane button:hover {
+ color: #1d5987;
+ background: #d0e5f5 url(../img/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+ border: 1px solid #79b7e7;
+}
+#googleMapTnt .ui-dialog-buttonpane button:active {
+ color: #e17009;
+ background: #f5f8f9 url(../img/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png) 0 50% repeat-x;
+ border: 1px solid #79b7e7;
+}
+/* This file skins dialog */
+#googleMapTnt .ui-dialog.ui-draggable .ui-dialog-titlebar,
+#googleMapTnt .ui-dialog.ui-draggable .ui-dialog-titlebar {
+ cursor: move;
+}
diff --git a/modules/tntcarrier/css/ui.tabs.css b/modules/tntcarrier/css/ui.tabs.css
new file mode 100644
index 000000000..2f1954ca4
--- /dev/null
+++ b/modules/tntcarrier/css/ui.tabs.css
@@ -0,0 +1,62 @@
+/*UI tabs*/
+.ui-tabs-nav {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
+ font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;
+ font-size: 10px;
+ float: left;
+ position: relative;
+ z-index: 1;
+ /*border-right: 1px solid #c5dbec;*/
+ bottom: -1px;
+}
+.ui-tabs-nav ul {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
+}
+
+.ui-tabs-nav li {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
+ float: left;
+ border: 1px solid #c5dbec;
+ border-right: none;
+}
+
+.ui-tabs-nav li a {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
+ float: left;
+ font-size: 10px;
+ font-weight: bold;
+ text-decoration: none;
+ padding: .2em 1em;
+ color: #2e6e9e;
+ background: #dfeffc url(../img/ui-dialog/dfeffc_40x100_textures_02_glass_85.png) 0 50% repeat-x;
+}
+
+.ui-tabs-nav li a:hover {
+ background: #d0e5f5 url(../img/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+ color: #1d5987;
+}
+
+.ui-tabs-nav li.ui-tabs-selected {
+ border-bottom-color: #f5f8f9;
+}
+
+.ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover {
+ background: #f5f8f9 url(../img/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png) 0 50% repeat-x;
+ color: #e17009;
+}
+
+.ui-tabs-panel {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
+ /*font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;*/
+ clear:left;
+ border: 1px solid #c5dbec;
+ background: #fcfdfd url(../img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png) 0 bottom repeat-x;
+ /*color: #222222;*/
+ padding: 1em 1em;
+ width: 315px;
+ font-size: 10px;
+}
+
+.ui-tabs-hide {
+ display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
\ No newline at end of file
diff --git a/modules/tntcarrier/follow.php b/modules/tntcarrier/follow.php
new file mode 100644
index 000000000..a8018ca38
--- /dev/null
+++ b/modules/tntcarrier/follow.php
@@ -0,0 +1,27 @@
+followPackage($_GET['code']);
+}
+catch( SoapFault $e )
+{
+ $erreur = $e->faultstring;
+ echo $erreur;
+}
+catch( Exception $e )
+{
+ $erreur = "Problem : follow failed";
+}
+$config['date'] = '%d/%m/%y';
+$config['time'] = '%I:%M %p';
+$smarty->assign('erreur', $erreur);
+$smarty->assign('config',$config);
+$smarty->assign( 'follow', $follow );
+$smarty->display('tpl/follow.tpl' );
+?>
\ No newline at end of file
diff --git a/modules/tntcarrier/fr.php b/modules/tntcarrier/fr.php
new file mode 100644
index 000000000..5704dbbb5
--- /dev/null
+++ b/modules/tntcarrier/fr.php
@@ -0,0 +1,90 @@
+tntcarrier_58ec6a48b4720ef0aa2adfded1ccf8a3'] = 'TNT Express';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_9b7637001f5d2bcb42efb4ab6b3e93da'] = 'Offre aux clients, différentes methodes de livraison';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_416900392875e9effb318da8648fbdcb'] = 'doit ou doivent etre configuré(s) pour utiliser le module correctement';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_632cae5cf3af08786414932a8e6f96a0'] = 'Pseudonyme TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_3b4f51300711a1eb61770d1696702402'] = 'Mot de passe TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_0e3b102c1a4938889716cea423a95001'] = 'Numéro de compte TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_e81d9f25acf7fa457ab32527a882ed50'] = 'Transporteur TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_d968787921c136e1cf9f766562aec8bc'] = 'Les paramètres suivants vous ont été fournis par TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_af7c2efe81330e4c9089f2c90781282e'] = 'Si vous n\'êtes pas encore inscrit, cliquez sur';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_6c92285fa6d3e827b198d120ea3ac674'] = 'ici';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_8af703b2bf59cc9742883ae7f4cb0e5b'] = 'Paramètres du compte';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_927e079056c2709236d4167bbb96e799'] = 'Réglages d\'expédition';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_82fe86ee1a21af1c1db5c8c4c5e5a188'] = 'Paramètres du service';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_160f61d02d22b76b47b4305094bf36a6'] = 'Compte TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiant';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_dc647eb65e6711e155375218212b3964'] = 'Mot de passe';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_05e642d027a22d12780ccf91bf9d7d34'] = 'Numéro de compte';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_8005dfbbaf4c9333592f26e82ddfd0af'] = 'Remplissez le formulaire avec les données';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Expédition';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_4d8ff211a4a8a140e293736f92ac39d5'] = 'Aimeriez-vous que TNT ramasse votre colis ?';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_581bf6fa6cd6d4bf4b0bbe2cfe6e404c'] = 'Non (via un dépôt)';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_f5234754269687df652c9f6f2f80cc10'] = 'Choisissez votre emplacement dépositaire';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_e7a7e191423e6a9ce3b59fd51ecbde87'] = 'Le code pex';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_e7b47c58815acf1d3afa59a84b5db7fb'] = 'Nom de l\'entreprise';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom de famille';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_e9f79aa2b1f455a52497a126d9442582'] = 'Adresse ligne 1';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_3d4d4cac03e194ab20154382cd544e0f'] = 'Adresse ligne 2';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_d30f507473129e70c4b962ceccf175cf'] = 'Zip / Code Postal';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_d0585aac6bb77bb49423b2effca0e067'] = 'Votre ville';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_f775ad1fbb08939178d4df9c457601f2'] = 'Votre adresse email';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_67c19a5276428fb9e49c557b1a3526d5'] = 'Votre numéro de téléphone';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_6222760252f52bb4dc70835d238d5484'] = 'Votre heure de clôture';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_cf67059a7bd51c3543def1ee4bdc4fe1'] = 'Livraison le samedi';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Aucun';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_dc86b23a40568ae3ece2d3008ca61442'] = 'Format de l\'étiquette pour l\'impression (Cette étiquette doit être collée sur l\'emballage)';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_2976cd63d00184e3f0a45c1337cd31f0'] = 'Impression A4';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_2f95a5450ee306f7faca792e379ccb34'] = 'sans imprimer le logo de TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_44fca4829aecbdf69a2200ea0a10a8aa'] = 'avec une impression inverse';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_a67ee8b3121d0ceb601e9f0600db9692'] = 'sans imprimer le logo TNT et avec une impression inverse';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_1c85ce46031e67c95be9aa05b859f955'] = 'Nouveau service';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_49ee3087348e8d44e1feda1917443987'] = 'Nom';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_ca0dbad92a874b2f69b549293387925e'] = 'Code';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_7ec0def44906b0cd2848459349eea638'] = 'Frais additionnels (€)';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_cb456215c3333db0551bd0788bc258c7'] = 'Activé';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_de95b43bceeb4b998aed4aed5cef1ae7'] = 'modifier';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_099af53f601532dbd31e0ea99ffdeb64'] = 'supprimer';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_7b9cf007806ed854cd12ab800c8a982b'] = 'Lieu';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_b06cdf3c0c75a1a58b82761f87f458e4'] = 'Etat du module transporteur TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_4c7b2960da33c41e9bbea499696702ca'] = 'Le module transporteur TNT est configuré et en ligne';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_efce38300739e2fd6cef1acd9ce68a1c'] = 'Le module transporteur TNT n\'est pas encore configuré, s\'il vous plait :';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_a8341741d73ef0a3ca5e8a7facc9a738'] = 'Assurez vous d\'avoir un compte TNT';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_3dab1e2673a4acc557135ccf795d4e31'] = 'Assurez vous d\'avoir une adresse correcte d\'expedition';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_057c674e4d23b04c0cbe1bfe81a0bec1'] = 'Assurez vous que certains services sont actifs';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_9d5b24e0e3516fcef94916366fadae67'] = 'Nouvelle option Poids';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_02f6a536789c7b8399ddbd1652d85d9c'] = 'Poids Min';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_03b4258831663af9e7f48bc6bc574e6c'] = 'Poids Max';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_7dce122004969d56ae2e0245cb754d35'] = 'Modifier';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_0619bef93192e574f288fe2e55c3a7f7'] = 'Poids min';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_d8c74112ba3622be2e79d4d4dc24eaf4'] = 'Poids max';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_508ccf43328cac4c93d1de242d2ddffb'] = 'Frais additionnels';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_69d865b41dc0e6611be76776c4a9456d'] = 'Vous devez donner un nom au service';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_e71361626c48f42620b92cc81fd41ba2'] = 'Vous devez donner un code au service';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_d2f2575c30fa33e53905ae05bc02f281'] = 'Vous devez donner une description au service';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_4a015051e9e879952cf4215d344ec101'] = 'Service enregistré';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_74d87a5cbf64f95c490b2cf85710a4eb'] = 'Le(s) numéro(s) d\'expédition(s)';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_2fd7870126dd86cedc2be112e7e59ebc'] = 'L\'étiquette';
+$_MODULE['<{tntcarrier}prestashop>tntcarrier_d5aad80114d8aa47f31a6f5050ef6835'] = 'Expédition';
+$_MODULE['<{tntcarrier}prestashop>formerror_c3f15ecc6da0827a8da712cb43a0b596'] = 'information d\'expédition';
+$_MODULE['<{tntcarrier}prestashop>formerror_7f090bbab1cc7f9c08bf4e54d932d3c0'] = 'Modifier';
+$_MODULE['<{tntcarrier}prestashop>service_ca0dbad92a874b2f69b549293387925e'] = 'Code';
+$_MODULE['<{tntcarrier}prestashop>service_41350c4c9683f48b15d04adc3f76925b'] = '08h00 express';
+$_MODULE['<{tntcarrier}prestashop>service_4b0977efd9aa11417b7139f35ed777a0'] = '09h00 express';
+$_MODULE['<{tntcarrier}prestashop>service_9b75b9fc3e87626793da04f05b8388ac'] = '10:00 express';
+$_MODULE['<{tntcarrier}prestashop>service_5a3019af5fd97f13e43cb4d946b7c112'] = '12:00 express';
+$_MODULE['<{tntcarrier}prestashop>service_b144fa061545497bebee8c414efc99a9'] = 'Express';
+$_MODULE['<{tntcarrier}prestashop>service_7a93a32c1929f10098c9bc055dbe5555'] = 'Express (P)';
+$_MODULE['<{tntcarrier}prestashop>service_c24eb7cd3484f223c03e64f2728a61ae'] = 'Option code (facultatif)';
+$_MODULE['<{tntcarrier}prestashop>service_b5410e878f792a03b81e7803a626caaa'] = 'Colis relais';
+$_MODULE['<{tntcarrier}prestashop>service_6cefaa978ccec960693d10cefeb2c2bf'] = 'Livraison à domicile';
+$_MODULE['<{tntcarrier}prestashop>service_9582039a366d19cb0b957bd4220dd6f7'] = 'Service entreprise ';
+$_MODULE['<{tntcarrier}prestashop>shippingnumber_c3f15ecc6da0827a8da712cb43a0b596'] = 'L\'information d\'expédition';
diff --git a/modules/tntcarrier/img/5-puce-choix-gris2.gif b/modules/tntcarrier/img/5-puce-choix-gris2.gif
new file mode 100644
index 000000000..609487a29
Binary files /dev/null and b/modules/tntcarrier/img/5-puce-choix-gris2.gif differ
diff --git a/modules/tntcarrier/img/Thumbs.db b/modules/tntcarrier/img/Thumbs.db
new file mode 100644
index 000000000..0698e65d0
Binary files /dev/null and b/modules/tntcarrier/img/Thumbs.db differ
diff --git a/modules/tntcarrier/img/bt-CodePostal-1.jpg b/modules/tntcarrier/img/bt-CodePostal-1.jpg
new file mode 100644
index 000000000..3f3b462d4
Binary files /dev/null and b/modules/tntcarrier/img/bt-CodePostal-1.jpg differ
diff --git a/modules/tntcarrier/img/bt-CodePostal-2.jpg b/modules/tntcarrier/img/bt-CodePostal-2.jpg
new file mode 100644
index 000000000..395a31b95
Binary files /dev/null and b/modules/tntcarrier/img/bt-CodePostal-2.jpg differ
diff --git a/modules/tntcarrier/img/bt-Continuer-1.jpg b/modules/tntcarrier/img/bt-Continuer-1.jpg
new file mode 100644
index 000000000..573666983
Binary files /dev/null and b/modules/tntcarrier/img/bt-Continuer-1.jpg differ
diff --git a/modules/tntcarrier/img/bt-Continuer-2.jpg b/modules/tntcarrier/img/bt-Continuer-2.jpg
new file mode 100644
index 000000000..04a1f19ac
Binary files /dev/null and b/modules/tntcarrier/img/bt-Continuer-2.jpg differ
diff --git a/modules/tntcarrier/img/bt-OK-1.jpg b/modules/tntcarrier/img/bt-OK-1.jpg
new file mode 100644
index 000000000..8a49e76b6
Binary files /dev/null and b/modules/tntcarrier/img/bt-OK-1.jpg differ
diff --git a/modules/tntcarrier/img/bt-OK-2.jpg b/modules/tntcarrier/img/bt-OK-2.jpg
new file mode 100644
index 000000000..7974b961b
Binary files /dev/null and b/modules/tntcarrier/img/bt-OK-2.jpg differ
diff --git a/modules/tntcarrier/img/bt-Retour.gif b/modules/tntcarrier/img/bt-Retour.gif
new file mode 100644
index 000000000..4d8de068b
Binary files /dev/null and b/modules/tntcarrier/img/bt-Retour.gif differ
diff --git a/modules/tntcarrier/img/close_icon_double.png b/modules/tntcarrier/img/close_icon_double.png
new file mode 100644
index 000000000..2e58b6b66
Binary files /dev/null and b/modules/tntcarrier/img/close_icon_double.png differ
diff --git a/modules/tntcarrier/img/exception.gif b/modules/tntcarrier/img/exception.gif
new file mode 100644
index 000000000..2938eac5b
Binary files /dev/null and b/modules/tntcarrier/img/exception.gif differ
diff --git a/modules/tntcarrier/img/exception2.gif b/modules/tntcarrier/img/exception2.gif
new file mode 100644
index 000000000..7fa3778bf
Binary files /dev/null and b/modules/tntcarrier/img/exception2.gif differ
diff --git a/modules/tntcarrier/img/google/Thumbs.db b/modules/tntcarrier/img/google/Thumbs.db
new file mode 100644
index 000000000..502aaa322
Binary files /dev/null and b/modules/tntcarrier/img/google/Thumbs.db differ
diff --git a/modules/tntcarrier/img/google/agenceTnt.png b/modules/tntcarrier/img/google/agenceTnt.png
new file mode 100644
index 000000000..05b3570a7
Binary files /dev/null and b/modules/tntcarrier/img/google/agenceTnt.png differ
diff --git a/modules/tntcarrier/img/google/red-pushpin-s.png b/modules/tntcarrier/img/google/red-pushpin-s.png
new file mode 100644
index 000000000..162aa0fa7
Binary files /dev/null and b/modules/tntcarrier/img/google/red-pushpin-s.png differ
diff --git a/modules/tntcarrier/img/google/red-pushpin.png b/modules/tntcarrier/img/google/red-pushpin.png
new file mode 100644
index 000000000..203512d5c
Binary files /dev/null and b/modules/tntcarrier/img/google/red-pushpin.png differ
diff --git a/modules/tntcarrier/img/google/relaisColis.png b/modules/tntcarrier/img/google/relaisColis.png
new file mode 100644
index 000000000..eb52b7d62
Binary files /dev/null and b/modules/tntcarrier/img/google/relaisColis.png differ
diff --git a/modules/tntcarrier/img/index.php b/modules/tntcarrier/img/index.php
new file mode 100644
index 000000000..477abec6f
--- /dev/null
+++ b/modules/tntcarrier/img/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 6594 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../../../");
+exit;
diff --git a/modules/tntcarrier/img/lg_tnt.gif b/modules/tntcarrier/img/lg_tnt.gif
new file mode 100644
index 000000000..c33e6e844
Binary files /dev/null and b/modules/tntcarrier/img/lg_tnt.gif differ
diff --git a/modules/tntcarrier/img/livreur.gif b/modules/tntcarrier/img/livreur.gif
new file mode 100644
index 000000000..2d45a42a1
Binary files /dev/null and b/modules/tntcarrier/img/livreur.gif differ
diff --git a/modules/tntcarrier/img/logo-tnt-petit.jpg b/modules/tntcarrier/img/logo-tnt-petit.jpg
new file mode 100644
index 000000000..b90c6dc4f
Binary files /dev/null and b/modules/tntcarrier/img/logo-tnt-petit.jpg differ
diff --git a/modules/tntcarrier/img/logo_24_chezmoi.jpg b/modules/tntcarrier/img/logo_24_chezmoi.jpg
new file mode 100644
index 000000000..de9ec6a32
Binary files /dev/null and b/modules/tntcarrier/img/logo_24_chezmoi.jpg differ
diff --git a/modules/tntcarrier/img/logo_24_relaiscolis.jpg b/modules/tntcarrier/img/logo_24_relaiscolis.jpg
new file mode 100644
index 000000000..f32ea64c5
Binary files /dev/null and b/modules/tntcarrier/img/logo_24_relaiscolis.jpg differ
diff --git a/modules/tntcarrier/img/logo_24h_chezmoi_RVB.gif b/modules/tntcarrier/img/logo_24h_chezmoi_RVB.gif
new file mode 100644
index 000000000..aef322ce9
Binary files /dev/null and b/modules/tntcarrier/img/logo_24h_chezmoi_RVB.gif differ
diff --git a/modules/tntcarrier/img/logo_24h_relaiscolis_RVB.gif b/modules/tntcarrier/img/logo_24h_relaiscolis_RVB.gif
new file mode 100644
index 000000000..b50b0cf56
Binary files /dev/null and b/modules/tntcarrier/img/logo_24h_relaiscolis_RVB.gif differ
diff --git a/modules/tntcarrier/img/logos_24.jpg b/modules/tntcarrier/img/logos_24.jpg
new file mode 100644
index 000000000..5da054fee
Binary files /dev/null and b/modules/tntcarrier/img/logos_24.jpg differ
diff --git a/modules/tntcarrier/img/loupe.gif b/modules/tntcarrier/img/loupe.gif
new file mode 100644
index 000000000..317184d42
Binary files /dev/null and b/modules/tntcarrier/img/loupe.gif differ
diff --git a/modules/tntcarrier/img/notes.gif b/modules/tntcarrier/img/notes.gif
new file mode 100644
index 000000000..3375cbf94
Binary files /dev/null and b/modules/tntcarrier/img/notes.gif differ
diff --git a/modules/tntcarrier/img/picto-delai.gif b/modules/tntcarrier/img/picto-delai.gif
new file mode 100644
index 000000000..3364dedcd
Binary files /dev/null and b/modules/tntcarrier/img/picto-delai.gif differ
diff --git a/modules/tntcarrier/img/picto_localiser.png b/modules/tntcarrier/img/picto_localiser.png
new file mode 100644
index 000000000..0631c121a
Binary files /dev/null and b/modules/tntcarrier/img/picto_localiser.png differ
diff --git a/modules/tntcarrier/img/tnt_logo.gif b/modules/tntcarrier/img/tnt_logo.gif
new file mode 100644
index 000000000..a170e265d
Binary files /dev/null and b/modules/tntcarrier/img/tnt_logo.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_arrows_leftright.gif b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_arrows_leftright.gif
new file mode 100644
index 000000000..1d52948d9
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_arrows_leftright.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_arrows_updown.gif b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_arrows_updown.gif
new file mode 100644
index 000000000..7f4437d37
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_arrows_updown.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_close.gif b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_close.gif
new file mode 100644
index 000000000..9e4ad7d09
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_close.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_doc.gif b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_doc.gif
new file mode 100644
index 000000000..5609c8b65
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_doc.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_folder_closed.gif b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_folder_closed.gif
new file mode 100644
index 000000000..ff367cf4d
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_folder_closed.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_folder_open.gif b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_folder_open.gif
new file mode 100644
index 000000000..7a93891b0
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_folder_open.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_minus.gif b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_minus.gif
new file mode 100644
index 000000000..0f1df159f
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_minus.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_plus.gif b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_plus.gif
new file mode 100644
index 000000000..6875dfb81
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_11x11_icon_plus.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_down.gif b/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_down.gif
new file mode 100644
index 000000000..f3d9ef702
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_down.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_left.gif b/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_left.gif
new file mode 100644
index 000000000..0d1c30b07
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_left.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_right.gif b/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_right.gif
new file mode 100644
index 000000000..5f25ff41c
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_right.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_up.gif b/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_up.gif
new file mode 100644
index 000000000..aabad1ea4
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/217bc0_7x7_arrow_up.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_arrows_leftright.gif b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_arrows_leftright.gif
new file mode 100644
index 000000000..8eb1a4f58
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_arrows_leftright.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_arrows_updown.gif b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_arrows_updown.gif
new file mode 100644
index 000000000..14997c504
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_arrows_updown.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_doc.gif b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_doc.gif
new file mode 100644
index 000000000..26a26f631
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_doc.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_minus.gif b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_minus.gif
new file mode 100644
index 000000000..cc89f2189
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_minus.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_plus.gif b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_plus.gif
new file mode 100644
index 000000000..b92ab3a58
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_plus.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_resize_se.gif b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_resize_se.gif
new file mode 100644
index 000000000..240a3dd06
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_11x11_icon_resize_se.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_down.gif b/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_down.gif
new file mode 100644
index 000000000..3019c30e7
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_down.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_left.gif b/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_left.gif
new file mode 100644
index 000000000..363f1c676
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_left.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_right.gif b/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_right.gif
new file mode 100644
index 000000000..8fcedce30
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_right.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_up.gif b/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_up.gif
new file mode 100644
index 000000000..83ba7aff1
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/469bdd_7x7_arrow_up.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_arrows_leftright.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_arrows_leftright.gif
new file mode 100644
index 000000000..51eb183ea
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_arrows_leftright.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_arrows_updown.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_arrows_updown.gif
new file mode 100644
index 000000000..adc7dcfc9
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_arrows_updown.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_close.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_close.gif
new file mode 100644
index 000000000..73c1d7201
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_close.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_doc.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_doc.gif
new file mode 100644
index 000000000..42dc16c76
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_doc.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_folder_closed.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_folder_closed.gif
new file mode 100644
index 000000000..a57741271
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_folder_closed.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_folder_open.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_folder_open.gif
new file mode 100644
index 000000000..74afe4be1
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_folder_open.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_minus.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_minus.gif
new file mode 100644
index 000000000..69fcad2ee
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_minus.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_plus.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_plus.gif
new file mode 100644
index 000000000..7193add21
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_11x11_icon_plus.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_down.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_down.gif
new file mode 100644
index 000000000..8bf915ebf
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_down.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_left.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_left.gif
new file mode 100644
index 000000000..9cb0eee53
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_left.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_right.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_right.gif
new file mode 100644
index 000000000..5fdf8e9b9
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_right.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_up.gif b/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_up.gif
new file mode 100644
index 000000000..284bc54b0
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/6da8d5_7x7_arrow_up.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/Thumbs.db b/modules/tntcarrier/img/ui-dialog/Thumbs.db
new file mode 100644
index 000000000..f95870bdd
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/Thumbs.db differ
diff --git a/modules/tntcarrier/img/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png b/modules/tntcarrier/img/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png
new file mode 100644
index 000000000..d4eaa1d6e
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png differ
diff --git a/modules/tntcarrier/img/ui-dialog/dfeffc_40x100_textures_02_glass_85.png b/modules/tntcarrier/img/ui-dialog/dfeffc_40x100_textures_02_glass_85.png
new file mode 100644
index 000000000..17d6b368b
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/dfeffc_40x100_textures_02_glass_85.png differ
diff --git a/modules/tntcarrier/img/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png b/modules/tntcarrier/img/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png
new file mode 100644
index 000000000..9b24a0a5f
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_arrows_leftright.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_arrows_leftright.gif
new file mode 100644
index 000000000..06da38391
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_arrows_leftright.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_arrows_updown.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_arrows_updown.gif
new file mode 100644
index 000000000..457012ffc
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_arrows_updown.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_close.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_close.gif
new file mode 100644
index 000000000..eda2b06e2
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_close.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_doc.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_doc.gif
new file mode 100644
index 000000000..5b182927c
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_doc.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_folder_closed.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_folder_closed.gif
new file mode 100644
index 000000000..e5228409a
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_folder_closed.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_folder_open.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_folder_open.gif
new file mode 100644
index 000000000..802424348
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_folder_open.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_minus.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_minus.gif
new file mode 100644
index 000000000..08cbbbb02
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_minus.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_plus.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_plus.gif
new file mode 100644
index 000000000..95ed13c5b
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_11x11_icon_plus.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_down.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_down.gif
new file mode 100644
index 000000000..77146b690
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_down.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_left.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_left.gif
new file mode 100644
index 000000000..6e44126ea
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_left.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_right.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_right.gif
new file mode 100644
index 000000000..8b9bfe44e
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_right.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_up.gif b/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_up.gif
new file mode 100644
index 000000000..988dad9bb
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/f9bd01_7x7_arrow_up.gif differ
diff --git a/modules/tntcarrier/img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png b/modules/tntcarrier/img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png
new file mode 100644
index 000000000..305c0bc49
Binary files /dev/null and b/modules/tntcarrier/img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png differ
diff --git a/modules/tntcarrier/index.php b/modules/tntcarrier/index.php
new file mode 100644
index 000000000..b559f9855
--- /dev/null
+++ b/modules/tntcarrier/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 7233 $
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
\ No newline at end of file
diff --git a/modules/tntcarrier/js/index.php b/modules/tntcarrier/js/index.php
new file mode 100644
index 000000000..477abec6f
--- /dev/null
+++ b/modules/tntcarrier/js/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 6594 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../../../");
+exit;
diff --git a/modules/tntcarrier/js/jquery-ui.js b/modules/tntcarrier/js/jquery-ui.js
new file mode 100644
index 000000000..08b44d366
--- /dev/null
+++ b/modules/tntcarrier/js/jquery-ui.js
@@ -0,0 +1,286 @@
+/*
+ * jQuery UI 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(C){var I=C.fn.remove,D=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);C.ui={version:"1.6",plugin:{add:function(K,L,N){var M=C.ui[K].prototype;for(var J in N){M.plugins[J]=M.plugins[J]||[];M.plugins[J].push([L,N[J]])}},call:function(J,L,K){var N=J.plugins[L];if(!N){return }for(var M=0;M').addClass(J).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");C.ui.cssCache[J]=!!((!(/auto|default/).test(K.css("cursor"))||(/^[1-9]/).test(K.css("height"))||(/^[1-9]/).test(K.css("width"))||!(/none/).test(K.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(K.css("backgroundColor"))));try{C("body").get(0).removeChild(K.get(0))}catch(L){}return C.ui.cssCache[J]},hasScroll:function(M,K){if(C(M).css("overflow")=="hidden"){return false}var J=(K&&K=="left")?"scrollLeft":"scrollTop",L=false;if(M[J]>0){return true}M[J]=1;L=(M[J]>0);M[J]=0;return L},isOverAxis:function(K,J,L){return(K>J)&&(K<(J+L))},isOver:function(O,K,N,M,J,L){return C.ui.isOverAxis(O,N,J)&&C.ui.isOverAxis(K,M,L)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(D){var F=C.attr,E=C.fn.removeAttr,H="http://www.w3.org/2005/07/aaa",A=/^aria-/,B=/^wairole:/;C.attr=function(K,J,L){var M=L!==undefined;return(J=="role"?(M?F.call(this,K,J,"wairole:"+L):(F.apply(this,arguments)||"").replace(B,"")):(A.test(J)?(M?K.setAttributeNS(H,J.replace(A,"aaa:"),L):F.call(this,K,J.replace(A,"aaa:"))):F.apply(this,arguments)))};C.fn.removeAttr=function(J){return(A.test(J)?this.each(function(){this.removeAttributeNS(H,J.replace(A,""))}):E.call(this,J))}}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")});return I.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var J;if((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!J.length?C(document):J}});C.extend(C.expr[":"],{data:function(K,L,J){return C.data(K,J[3])},tabbable:function(L,M,K){var N=L.nodeName.toLowerCase();function J(O){return !(C(O).is(":hidden")||C(O).parents(":hidden").length)}return(L.tabIndex>=0&&(("a"==N&&L.href)||(/input|select|textarea|button/.test(N)&&"hidden"!=L.type&&!L.disabled))&&J(L))}});function G(M,N,O,L){function K(Q){var P=C[M][N][Q]||[];return(typeof P=="string"?P.split(/,?\s+/):P)}var J=K("getter");if(L.length==1&&typeof L[0]=="string"){J=J.concat(K("getterSetter"))}return(C.inArray(O,J)!=-1)}C.widget=function(K,J){var L=K.split(".")[0];K=K.split(".")[1];C.fn[K]=function(P){var N=(typeof P=="string"),O=Array.prototype.slice.call(arguments,1);if(N&&P.substring(0,1)=="_"){return this}if(N&&G(L,K,P,O)){var M=C.data(this[0],K);return(M?M[P].apply(M,O):undefined)}return this.each(function(){var Q=C.data(this,K);(!Q&&!N&&C.data(this,K,new C[L][K](this,P)));(Q&&N&&C.isFunction(Q[P])&&Q[P].apply(Q,O))})};C[L]=C[L]||{};C[L][K]=function(O,N){var M=this;this.widgetName=K;this.widgetEventPrefix=C[L][K].eventPrefix||K;this.widgetBaseClass=L+"-"+K;this.options=C.extend({},C.widget.defaults,C[L][K].defaults,C.metadata&&C.metadata.get(O)[K],N);this.element=C(O).bind("setData."+K,function(Q,P,R){return M._setData(P,R)}).bind("getData."+K,function(Q,P){return M._getData(P)}).bind("remove",function(){return M.destroy()});this._init()};C[L][K].prototype=C.extend({},C.widget.prototype,J);C[L][K].getterSetter="option"};C.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName)},option:function(L,M){var K=L,J=this;if(typeof L=="string"){if(M===undefined){return this._getData(L)}K={};K[L]=M}C.each(K,function(N,O){J._setData(N,O)})},_getData:function(J){return this.options[J]},_setData:function(J,K){this.options[J]=K;if(J=="disabled"){this.element[K?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(K,L,M){var J=(K==this.widgetEventPrefix?K:this.widgetEventPrefix+K);L=L||C.event.fix({type:J,target:this.element[0]});return this.element.triggerHandler(J,[L,M],this.options[K])}};C.widget.defaults={disabled:false};C.ui.mouse={_mouseInit:function(){var J=this;this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;return false}});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(L){(this._mouseStarted&&this._mouseUp(L));this._mouseDownEvent=L;var K=this,M=(L.which==1),J=(typeof this.options.cancel=="string"?C(L.target).parents().add(L.target).filter(this.options.cancel).length:false);if(!M||J||!this._mouseCapture(L)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){K.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(L)&&this._mouseDelayMet(L)){this._mouseStarted=(this._mouseStart(L)!==false);if(!this._mouseStarted){L.preventDefault();return true}}this._mouseMoveDelegate=function(N){return K._mouseMove(N)};this._mouseUpDelegate=function(N){return K._mouseUp(N)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);if(!C.browser.safari){L.preventDefault()}return true},_mouseMove:function(J){if(C.browser.msie&&!J.button){return this._mouseUp(J)}if(this._mouseStarted){this._mouseDrag(J);return J.preventDefault()}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))}return !this._mouseStarted},_mouseUp:function(J){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=true;this._mouseStop(J)}return false},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)},_mouseDelayMet:function(J){return this.mouseDelayMet},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:function(J){},_mouseCapture:function(J){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);/*
+ * jQuery UI Draggable 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(B);if(!this.handle){return false}return true},_mouseStart:function(B){var C=this.options;this.helper=this._createHelper(B);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:B.pageX-this.offset.left,top:B.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});if(C.cursorAt){this._adjustOffsetFromHelper(C.cursorAt)}this.originalPosition=this._generatePosition(B);if(C.containment){this._setContainment()}this._propagate("start",B);this._cacheHelperProportions();if(A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,B)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(B,true);return true},_mouseDrag:function(B,C){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");if(!C){this.position=this._propagate("drag",B)||this.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},_mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C)}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){B._propagate("stop",C);B._clear()})}else{this._propagate("stop",C);this._clear()}return false},_getHandle:function(B){var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==B.target){C=true}});return C},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C])):(D.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((D.appendTo=="parent"?this.element[0].parentNode:D.appendTo))}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute")}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if((this.offsetParent[0]==document.body&&A.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.element.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(D,F){if(!F){F=this.position}var C=D=="absolute"?1:-1;var B=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],E=(/(html|body)/i).test(B[0].tagName);return{top:(F.top+this.offset.relative.top*C+this.offset.parent.top*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(E?0:B.scrollTop()))*C+this.margins.top*C),left:(F.left+this.offset.relative.left*C+this.offset.parent.left*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():(E?0:B.scrollLeft()))*C+this.margins.left*C)}},_generatePosition:function(D){var G=this.options,C=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],H=(/(html|body)/i).test(C[0].tagName);var B={top:(D.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(H?0:C.scrollTop()))),left:(D.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():H?0:C.scrollLeft()))};if(!this.originalPosition){return B}if(this.containment){if(B.leftthis.containment[2]){B.left=this.containment[2]}if(B.top>this.containment[3]){B.top=this.containment[3]}}if(G.grid){var F=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/G.grid[1])*G.grid[1];B.top=this.containment?(!(Fthis.containment[3])?F:(!(Fthis.containment[2])?E:(!(E ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(B,C){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","opacity",{start:function(C,D){var B=A(D.helper);if(B.css("opacity")){D.options._opacity=B.css("opacity")}B.css("opacity",D.options.opacity)},stop:function(B,C){if(C.options._opacity){A(C.helper).css("opacity",C.options._opacity)}}});A.ui.plugin.add("draggable","scroll",{start:function(C,D){var E=D.options;var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(D,E){var F=E.options,B=false;var C=A(this).data("draggable");if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY=0;N--){var L=E.snapElements[N].left,J=L+E.snapElements[N].width,I=E.snapElements[N].top,S=I+E.snapElements[N].height;if(!((L-Q=N&&L<=J)||(K>=N&&K<=J)||(LJ))&&((D>=F&&D<=B)||(C>=F&&C<=B)||(DB));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(E,G){var B=A.ui.ddmanager.droppables[E.options.scope];var F=G?G.type:null;var H=(E.currentItem||E.element).find(":data(droppable)").andSelf();droppablesLoop:for(var D=0;D').css({position:C.css("position"),width:C.outerWidth(),height:C.outerHeight(),top:C.css("top"),left:C.css("left")}));var K=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:K.css("marginLeft"),marginTop:K.css("marginTop"),marginRight:K.css("marginRight"),marginBottom:K.css("marginBottom")});K.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(B.browser.safari&&O.preventDefault){K.css("resize","none")}O.proportionallyResize=K.css({position:"static",zoom:1,display:"block"});this.element.css({margin:K.css("margin")});this._proportionallyResize()}if(!O.handles){O.handles=!B(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}}if(O.handles.constructor==String){O.zIndex=O.zIndex||1000;if(O.handles=="all"){O.handles="n,e,s,w,se,sw,ne,nw"}var P=O.handles.split(",");O.handles={};var H={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var S=0;S'].join("")).css(L);O.handles[T]=".ui-resizable-"+T;this.element.append(F.css(D?U:{}).css(O.knobHandles?E:{}).addClass(O.knobHandles?"ui-resizable-knob-handle":"").addClass(O.knobHandles))}if(O.knobHandles){this.element.addClass("ui-resizable-knob").css(!B.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(Z){Z=Z||this.element;for(var W in O.handles){if(O.handles[W].constructor==String){O.handles[W]=B(O.handles[W],this.element).show()}if(O.transparent){O.handles[W].css({opacity:0})}if(this.element.is(".ui-wrapper")&&O._nodeName.match(/textarea|input|select|button/i)){var X=B(O.handles[W],this.element),Y=0;Y=/sw|ne|nw|se|n|s/.test(W)?X.outerHeight():X.outerWidth();var V=["padding",/ne|nw|n/.test(W)?"Top":/se|sw|s/.test(W)?"Bottom":/^e$/.test(W)?"Right":"Left"].join("");if(!O.transparent){Z.css(V,Y)}this._proportionallyResize()}if(!B(O.handles[W]).length){continue}}};this._renderAxis(this.element);O._handles=B(".ui-resizable-handle",N.element);if(O.disableSelection){O._handles.disableSelection()}O._handles.mouseover(function(){if(!O.resizing){if(this.className){var V=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}N.axis=O.axis=V&&V[1]?V[1]:"se"}});if(O.autoHide){O._handles.hide();B(N.element).addClass("ui-resizable-autohide").hover(function(){B(this).removeClass("ui-resizable-autohide");O._handles.show()},function(){if(!O.resizing){B(this).addClass("ui-resizable-autohide");O._handles.hide()}})}this._mouseInit()},destroy:function(){var E=this.element,D=E.children(".ui-resizable").get(0);this._mouseDestroy();var C=function(F){B(F).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};C(E);if(E.is(".ui-wrapper")&&D){E.parent().append(B(D).css({position:E.css("position"),width:E.outerWidth(),height:E.outerHeight(),top:E.css("top"),left:E.css("left")})).end().remove();C(D)}},_mouseCapture:function(D){if(this.options.disabled){return false}var E=false;for(var C in this.options.handles){if(B(this.options.handles[C])[0]==D.target){E=true}}if(!E){return false}return true},_mouseStart:function(D){var E=this.options,C=this.element.position(),F=this.element,I=B.browser.msie&&B.browser.version<7;E.resizing=true;E.documentScroll={top:B(document).scrollTop(),left:B(document).scrollLeft()};if(F.is(".ui-draggable")||(/absolute/).test(F.css("position"))){var K=B.browser.msie&&!E.containment&&(/absolute/).test(F.css("position"))&&!(/relative/).test(F.parent().css("position"));var L=K?this.documentScroll.top:0,H=K?this.documentScroll.left:0;F.css({position:"absolute",top:(C.top+L),left:(C.left+H)})}if(B.browser.opera&&(/relative/).test(F.css("position"))){F.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var M=A(this.helper.css("left")),G=A(this.helper.css("top"));if(E.containment){M+=B(E.containment).scrollLeft()||0;G+=B(E.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:M,top:G};this.size=E.helper||I?{width:F.outerWidth(),height:F.outerHeight()}:{width:F.width(),height:F.height()};this.originalSize=E.helper||I?{width:F.outerWidth(),height:F.outerHeight()}:{width:F.width(),height:F.height()};this.originalPosition={left:M,top:G};this.sizeDiff={width:F.outerWidth()-F.width(),height:F.outerHeight()-F.height()};this.originalMousePosition={left:D.pageX,top:D.pageY};E.aspectRatio=(typeof E.aspectRatio=="number")?E.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);if(E.preserveCursor){var J=B(".ui-resizable-"+this.axis).css("cursor");B("body").css("cursor",J=="auto"?this.axis+"-resize":J)}this._propagate("start",D);return true},_mouseDrag:function(C){var F=this.helper,E=this.options,K={},N=this,H=this.originalMousePosition,L=this.axis;var O=(C.pageX-H.left)||0,M=(C.pageY-H.top)||0;var G=this._change[L];if(!G){return false}var J=G.apply(this,[C,O,M]),I=B.browser.msie&&B.browser.version<7,D=this.sizeDiff;if(E._aspectRatio||C.shiftKey){J=this._updateRatio(J,C)}J=this._respectSize(J,C);this._propagate("resize",C);F.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!E.helper&&E.proportionallyResize){this._proportionallyResize()}this._updateCache(J);this.element.triggerHandler("resize",[C,this.ui()],this.options["resize"]);return false},_mouseStop:function(F){this.options.resizing=false;var G=this.options,K=this;if(G.helper){var E=G.proportionallyResize,C=E&&(/textarea/i).test(E.get(0).nodeName),D=C&&B.ui.hasScroll(E.get(0),"left")?0:K.sizeDiff.height,I=C?0:K.sizeDiff.width;var L={width:(K.size.width-I),height:(K.size.height-D)},H=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(parseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!G.animate){this.element.css(B.extend(L,{top:J,left:H}))}if(G.helper&&!G.animate){this._proportionallyResize()}}if(G.preserveCursor){B("body").css("cursor","auto")}this._propagate("stop",F);if(G.helper){this.helper.remove()}return false},_updateCache:function(C){var D=this.options;this.offset=this.helper.offset();if(C.left){this.position.left=C.left}if(C.top){this.position.top=C.top}if(C.height){this.size.height=C.height}if(C.width){this.size.width=C.width}},_updateRatio:function(F,E){var G=this.options,H=this.position,D=this.size,C=this.axis;if(F.height){F.width=(D.height*G.aspectRatio)}else{if(F.width){F.height=(D.width/G.aspectRatio)}}if(C=="sw"){F.left=H.left+(D.width-F.width);F.top=null}if(C=="nw"){F.top=H.top+(D.height-F.height);F.left=H.left+(D.width-F.width)}return F},_respectSize:function(J,E){var H=this.helper,G=this.options,O=G._aspectRatio||E.shiftKey,N=this.axis,Q=J.width&&G.maxWidth&&G.maxWidthJ.width,P=J.height&&G.minHeight&&G.minHeight>J.height;if(F){J.width=G.minWidth}if(P){J.height=G.minHeight}if(Q){J.width=G.maxWidth}if(K){J.height=G.maxHeight}var D=this.originalPosition.left+this.originalSize.width,M=this.position.top+this.size.height;var I=/sw|nw|w/.test(N),C=/nw|ne|n/.test(N);if(F&&I){J.left=D-G.minWidth}if(Q&&I){J.left=D-G.maxWidth}if(P&&C){J.top=M-G.minHeight}if(K&&C){J.top=M-G.maxHeight}var L=!J.width&&!J.height;if(L&&!J.left&&J.top){J.top=null}else{if(L&&!J.top&&J.left){J.left=null}}return J},_proportionallyResize:function(){var G=this.options;if(!G.proportionallyResize){return }var E=G.proportionallyResize,D=this.helper||this.element;if(!G.borderDif){var C=[E.css("borderTopWidth"),E.css("borderRightWidth"),E.css("borderBottomWidth"),E.css("borderLeftWidth")],F=[E.css("paddingTop"),E.css("paddingRight"),E.css("paddingBottom"),E.css("paddingLeft")];G.borderDif=B.map(C,function(H,J){var I=parseInt(H,10)||0,K=parseInt(F[J],10)||0;return I+K})}E.css({height:(D.height()-G.borderDif[0]-G.borderDif[2])+"px",width:(D.width()-G.borderDif[1]-G.borderDif[3])+"px"})},_renderProxy:function(){var D=this.element,G=this.options;this.elementOffset=D.offset();if(G.helper){this.helper=this.helper||B('
');var C=B.browser.msie&&B.browser.version<7,E=(C?1:0),F=(C?2:-1);this.helper.addClass(G.helper).css({width:D.outerWidth()+F,height:D.outerHeight()+F,position:"absolute",left:this.elementOffset.left-E+"px",top:this.elementOffset.top-E+"px",zIndex:++G.zIndex});this.helper.appendTo("body");if(G.disableSelection){this.helper.disableSelection()}}else{this.helper=D}},_change:{e:function(E,D,C){return{width:this.originalSize.width+D}},w:function(F,D,C){var H=this.options,E=this.originalSize,G=this.originalPosition;return{left:G.left+D,width:E.width-D}},n:function(F,D,C){var H=this.options,E=this.originalSize,G=this.originalPosition;return{top:G.top+C,height:E.height-C}},s:function(E,D,C){return{height:this.originalSize.height+C}},se:function(E,D,C){return B.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[E,D,C]))},sw:function(E,D,C){return B.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[E,D,C]))},ne:function(E,D,C){return B.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[E,D,C]))},nw:function(E,D,C){return B.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[E,D,C]))}},_propagate:function(D,C){B.ui.plugin.call(this,D,[C,this.ui()]);if(D!="resize"){this.element.triggerHandler(["resize",D].join(""),[C,this.ui()],this.options[D])}},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));B.extend(B.ui.resizable,{version:"1.6",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input",containment:false,disableSelection:true,distance:1,delay:0,ghost:false,grid:false,knobHandles:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,preserveCursor:true,preventDefault:true,proportionallyResize:false,transparent:false}});B.ui.plugin.add("resizable","alsoResize",{start:function(D,E){var G=E.options,C=B(this).data("resizable"),F=function(H){B(H).each(function(){B(this).data("resizable-alsoresize",{width:parseInt(B(this).width(),10),height:parseInt(B(this).height(),10),left:parseInt(B(this).css("left"),10),top:parseInt(B(this).css("top"),10)})})};if(typeof (G.alsoResize)=="object"&&!G.alsoResize.parentNode){if(G.alsoResize.length){G.alsoResize=G.alsoResize[0];F(G.alsoResize)}else{B.each(G.alsoResize,function(H,I){F(H)})}}else{F(G.alsoResize)}},resize:function(E,G){var H=G.options,D=B(this).data("resizable"),F=D.originalSize,J=D.originalPosition;var I={height:(D.size.height-F.height)||0,width:(D.size.width-F.width)||0,top:(D.position.top-J.top)||0,left:(D.position.left-J.left)||0},C=function(K,L){B(K).each(function(){var O=B(this).data("resizable-alsoresize"),N={},M=L&&L.length?L:["width","height","top","left"];B.each(M||["width","height","top","left"],function(P,R){var Q=(O[R]||0)+(I[R]||0);if(Q&&Q>=0){N[R]=Q||null}});B(this).css(N)})};if(typeof (H.alsoResize)=="object"&&!H.alsoResize.parentNode){B.each(H.alsoResize,function(K,L){C(K,L)})}else{C(H.alsoResize)}},stop:function(C,D){B(this).removeData("resizable-alsoresize-start")}});B.ui.plugin.add("resizable","animate",{stop:function(G,L){var H=L.options,M=B(this).data("resizable");var F=H.proportionallyResize,C=F&&(/textarea/i).test(F.get(0).nodeName),D=C&&B.ui.hasScroll(F.get(0),"left")?0:M.sizeDiff.height,J=C?0:M.sizeDiff.width;var E={width:(M.size.width-J),height:(M.size.height-D)},I=(parseInt(M.element.css("left"),10)+(M.position.left-M.originalPosition.left))||null,K=(parseInt(M.element.css("top"),10)+(M.position.top-M.originalPosition.top))||null;M.element.animate(B.extend(E,K&&I?{top:K,left:I}:{}),{duration:H.animateDuration,easing:H.animateEasing,step:function(){var N={width:parseInt(M.element.css("width"),10),height:parseInt(M.element.css("height"),10),top:parseInt(M.element.css("top"),10),left:parseInt(M.element.css("left"),10)};if(F){F.css({width:N.width,height:N.height})}M._updateCache(N);M._propagate("animate",G)}})}});B.ui.plugin.add("resizable","containment",{start:function(D,N){var H=N.options,P=B(this).data("resizable"),J=P.element;var E=H.containment,I=(E instanceof B)?E.get(0):(/parent/.test(E))?J.parent().get(0):E;if(!I){return }P.containerElement=B(I);if(/document/.test(E)||E==document){P.containerOffset={left:0,top:0};P.containerPosition={left:0,top:0};P.parentData={element:B(document),left:0,top:0,width:B(document).width(),height:B(document).height()||document.body.parentNode.scrollHeight}}else{var L=B(I),G=[];B(["Top","Right","Left","Bottom"]).each(function(R,Q){G[R]=A(L.css("padding"+Q))});P.containerOffset=L.offset();P.containerPosition=L.position();P.containerSize={height:(L.innerHeight()-G[3]),width:(L.innerWidth()-G[1])};var M=P.containerOffset,C=P.containerSize.height,K=P.containerSize.width,F=(B.ui.hasScroll(I,"left")?I.scrollWidth:K),O=(B.ui.hasScroll(I)?I.scrollHeight:C);P.parentData={element:I,left:M.left,top:M.top,width:F,height:O}}},resize:function(E,N){var G=N.options,Q=B(this).data("resizable"),D=Q.containerSize,M=Q.containerOffset,K=Q.size,L=Q.position,O=G._aspectRatio||E.shiftKey,C={top:0,left:0},F=Q.containerElement;if(F[0]!=document&&(/static/).test(F.css("position"))){C=M}if(L.left<(G.helper?M.left:0)){Q.size.width=Q.size.width+(G.helper?(Q.position.left-M.left):(Q.position.left-C.left));if(O){Q.size.height=Q.size.width/G.aspectRatio}Q.position.left=G.helper?M.left:0}if(L.top<(G.helper?M.top:0)){Q.size.height=Q.size.height+(G.helper?(Q.position.top-M.top):Q.position.top);if(O){Q.size.width=Q.size.height*G.aspectRatio}Q.position.top=G.helper?M.top:0}Q.offset.left=Q.parentData.left+Q.position.left;Q.offset.top=Q.parentData.top+Q.position.top;var J=Math.abs((G.helper?Q.offset.left-C.left:(Q.offset.left-C.left))+Q.sizeDiff.width),P=Math.abs((G.helper?Q.offset.top-C.top:(Q.offset.top-M.top))+Q.sizeDiff.height);var I=Q.containerElement.get(0)==Q.element.parent().get(0),H=/relative|absolute/.test(Q.containerElement.css("position"));if(I&&H){J-=Q.parentData.left}if(J+Q.size.width>=Q.parentData.width){Q.size.width=Q.parentData.width-J;if(O){Q.size.height=Q.size.width/G.aspectRatio}}if(P+Q.size.height>=Q.parentData.height){Q.size.height=Q.parentData.height-P;if(O){Q.size.width=Q.size.height*G.aspectRatio}}},stop:function(D,K){var E=K.options,M=B(this).data("resizable"),I=M.position,J=M.containerOffset,C=M.containerPosition,F=M.containerElement;var G=B(M.helper),N=G.offset(),L=G.outerWidth()-M.sizeDiff.width,H=G.outerHeight()-M.sizeDiff.height;if(E.helper&&!E.animate&&(/relative/).test(F.css("position"))){B(this).css({left:N.left-C.left-J.left,width:L,height:H})}if(E.helper&&!E.animate&&(/static/).test(F.css("position"))){B(this).css({left:N.left-C.left-J.left,width:L,height:H})}}});B.ui.plugin.add("resizable","ghost",{start:function(E,F){var G=F.options,C=B(this).data("resizable"),H=G.proportionallyResize,D=C.size;if(!H){C.ghost=C.element.clone()}else{C.ghost=H.clone()}C.ghost.css({opacity:0.25,display:"block",position:"relative",height:D.height,width:D.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof G.ghost=="string"?G.ghost:"");C.ghost.appendTo(C.helper)},resize:function(D,E){var F=E.options,C=B(this).data("resizable"),G=F.proportionallyResize;if(C.ghost){C.ghost.css({position:"relative",height:C.size.height,width:C.size.width})}},stop:function(D,E){var F=E.options,C=B(this).data("resizable"),G=F.proportionallyResize;if(C.ghost&&C.helper){C.helper.get(0).removeChild(C.ghost.get(0))}}});B.ui.plugin.add("resizable","grid",{resize:function(C,K){var F=K.options,M=B(this).data("resizable"),I=M.size,G=M.originalSize,H=M.originalPosition,L=M.axis,J=F._aspectRatio||C.shiftKey;F.grid=typeof F.grid=="number"?[F.grid,F.grid]:F.grid;var E=Math.round((I.width-G.width)/(F.grid[0]||1))*(F.grid[0]||1),D=Math.round((I.height-G.height)/(F.grid[1]||1))*(F.grid[1]||1);if(/^(se|s|e)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D}else{if(/^(ne)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D;M.position.top=H.top-D}else{if(/^(sw)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D;M.position.left=H.left-E}else{M.size.width=G.width+E;M.size.height=G.height+D;M.position.top=H.top-D;M.position.left=H.left-E}}}}});var A=function(C){return parseInt(C,10)||0}})(jQuery);/*
+ * jQuery UI Selectable 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(A){A.widget("ui.selectable",A.extend({},A.ui.mouse,{_init:function(){var B=this;this.element.addClass("ui-selectable");this.dragged=false;var C;this.refresh=function(){C=A(B.options.filter,B.element[0]);C.each(function(){var D=A(this);var E=D.offset();A.data(this,"selectable-item",{element:this,$element:D,left:E.left,top:E.top,right:E.left+D.width(),bottom:E.top+D.height(),startselected:false,selected:D.hasClass("ui-selected"),selecting:D.hasClass("ui-selecting"),unselecting:D.hasClass("ui-unselecting")})})};this.refresh();this.selectees=C.addClass("ui-selectee");this._mouseInit();this.helper=A(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(E){var C=this;this.opos=[E.pageX,E.pageY];if(this.options.disabled){return }var D=this.options;this.selectees=A(D.filter,this.element[0]);this.element.triggerHandler("selectablestart",[E,{"selectable":this.element[0],"options":D}],D.start);A("body").append(this.helper);this.helper.css({"z-index":100,"position":"absolute","left":E.clientX,"top":E.clientY,"width":0,"height":0});if(D.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var F=A.data(this,"selectable-item");F.startselected=true;if(!E.metaKey){F.$element.removeClass("ui-selected");F.selected=false;F.$element.addClass("ui-unselecting");F.unselecting=true;C.element.triggerHandler("selectableunselecting",[E,{selectable:C.element[0],unselecting:F.element,options:D}],D.unselecting)}});var B=false;A(E.target).parents().andSelf().each(function(){if(A.data(this,"selectable-item")){B=true}});return this.options.keyboard?!B:true},_mouseDrag:function(I){var C=this;this.dragged=true;if(this.options.disabled){return }var E=this.options;var D=this.opos[0],H=this.opos[1],B=I.pageX,G=I.pageY;if(D>B){var F=B;B=D;D=F}if(H>G){var F=G;G=H;H=F}this.helper.css({left:D,top:H,width:B-D,height:G-H});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!J||J.element==C.element[0]){return }var K=false;if(E.tolerance=="touch"){K=(!(J.left>B||J.rightG||J.bottomD&&J.rightH&&J.bottom=0;B--){this.items[B].item.removeData("sortable-item")}},_mouseCapture:function(E,F){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(E);var D=null,C=this,B=A(E.target).parents().each(function(){if(A.data(this,"sortable-item")==C){D=A(this);return false}});if(A.data(E.target,"sortable-item")==C){D=A(E.target)}if(!D){return false}if(this.options.handle&&!F){var G=false;A(this.options.handle,D).find("*").andSelf().each(function(){if(this==E.target){G=true}});if(!G){return false}}this.currentItem=D;this._removeCurrentsFromItems();return true},_mouseStart:function(D,E,B){var F=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(D);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");A.extend(this.offset,{click:{left:D.pageX-this.offset.left,top:D.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});if(F.cursorAt){this._adjustOffsetFromHelper(F.cursorAt)}this.originalPosition=this._generatePosition(D);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(F.containment){this._setContainment()}this._propagate("start",D);if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!B){for(var C=this.containers.length-1;C>=0;C--){this.containers[C]._propagate("activate",D,this)}}if(A.ui.ddmanager){A.ui.ddmanager.current=this}if(A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,D)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(D);return true},_mouseDrag:function(E){this.position=this._generatePosition(E);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}A.ui.plugin.call(this,"sort",[E,this._ui()]);this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var C=this.items.length-1;C>=0;C--){var D=this.items[C],B=D.item[0],F=this._intersectsWithPointer(D);if(!F){continue}if(B!=this.currentItem[0]&&this.placeholder[F==1?"next":"prev"]()[0]!=B&&!A.ui.contains(this.placeholder[0],B)&&(this.options.type=="semi-dynamic"?!A.ui.contains(this.element[0],B):true)){this.direction=F==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(D)){this.options.sortIndicator.call(this,E,D)}else{break}this._propagate("change",E);break}}this._contactContainers(E);if(A.ui.ddmanager){A.ui.ddmanager.drag(this,E)}this._trigger("sort",E,this._ui());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(C,D){if(!C){return }if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,C)}if(this.options.revert){var B=this;var E=B.placeholder.offset();B.reverting=true;A(this.helper).animate({left:E.left-this.offset.parent.left-B.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:E.top-this.offset.parent.top-B.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){B._clear(C)})}else{this._clear(C,D)}return false},cancel:function(){if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._propagate("deactivate",null,this);if(this.containers[B].containerCache.over){this.containers[B]._propagate("out",null,this);this.containers[B].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}A.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){A(this.domPosition.prev).after(this.currentItem)}else{A(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};A(B).each(function(){var E=(A(D.item||this).attr(D.attribute||"id")||"").match(D.expression||(/(.+)[-=_](.+)/));if(E){C.push((D.key||E[1]+"[]")+"="+(D.key&&D.expression?E[1]:E[2]))}});return C.join("&")},toArray:function(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};B.each(function(){C.push(A(D.item||this).attr(D.attribute||"id")||"")});return C},_intersectsWith:function(K){var D=this.positionAbs.left,C=D+this.helperProportions.width,J=this.positionAbs.top,I=J+this.helperProportions.height;var E=K.left,B=E+K.width,L=K.top,H=L+K.height;var M=this.offset.click.top,G=this.offset.click.left;var F=(J+M)>L&&(J+M)E&&(D+G)K[this.floating?"width":"height"])){return F}else{return(E0?"down":"up")},_getDragHorizontalDirection:function(){var B=this.positionAbs.left-this.lastPositionAbs.left;return B!=0&&(B>0?"right":"left")},refresh:function(B){this._refreshItems(B);this.refreshPositions()},_getItemsAsjQuery:function(G){var C=this;var B=[];var E=[];if(this.options.connectWith&&G){for(var F=this.options.connectWith.length-1;F>=0;F--){var I=A(this.options.connectWith[F]);for(var D=I.length-1;D>=0;D--){var H=A.data(I[D],"sortable");if(H&&H!=this&&!H.options.disabled){E.push([A.isFunction(H.options.items)?H.options.items.call(H.element):A(H.options.items,H.element).not(".ui-sortable-helper"),H])}}}}E.push([A.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):A(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var F=E.length-1;F>=0;F--){E[F][0].each(function(){B.push(this)})}return A(B)},_removeCurrentsFromItems:function(){var D=this.currentItem.find(":data(sortable-item)");for(var C=0;C=0;E--){var J=A(this.options.connectWith[E]);for(var D=J.length-1;D>=0;D--){var G=A.data(J[D],"sortable");if(G&&G!=this&&!G.options.disabled){F.push([A.isFunction(G.options.items)?G.options.items.call(G.element[0],B,{item:this.currentItem}):A(G.options.items,G.element),G]);this.containers.push(G)}}}}for(var E=F.length-1;E>=0;E--){var I=F[E][1];var C=F[E][0];for(var D=0,K=C.length;D=0;D--){var E=this.items[D];if(E.instance!=this.currentContainer&&this.currentContainer&&E.item[0]!=this.currentItem[0]){continue}var C=this.options.toleranceElement?A(this.options.toleranceElement,E.item):E.item;if(!B){if(this.options.accurateIntersection){E.width=C.outerWidth();E.height=C.outerHeight()}else{E.width=C[0].offsetWidth;E.height=C[0].offsetHeight}}var F=C.offset();E.left=F.left;E.top=F.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var D=this.containers.length-1;D>=0;D--){var F=this.containers[D].element.offset();this.containers[D].containerCache.left=F.left;this.containers[D].containerCache.top=F.top;this.containers[D].containerCache.width=this.containers[D].element.outerWidth();this.containers[D].containerCache.height=this.containers[D].element.outerHeight()}}},_createPlaceholder:function(D){var B=D||this,E=B.options;if(!E.placeholder||E.placeholder.constructor==String){var C=E.placeholder;E.placeholder={element:function(){var F=A(document.createElement(B.currentItem[0].nodeName)).addClass(C||B.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!C){F.style.visibility="hidden";document.body.appendChild(F);F.innerHTML=B.currentItem[0].innerHTML.replace(/name\=\"[^\"\']+\"/g,"").replace(/jQuery[0-9]+\=\"[^\"\']+\"/g,"");document.body.removeChild(F)}return F},update:function(F,G){if(C&&!E.forcePlaceholderSize){return }if(!G.height()){G.height(B.currentItem.innerHeight()-parseInt(B.currentItem.css("paddingTop")||0,10)-parseInt(B.currentItem.css("paddingBottom")||0,10))}if(!G.width()){G.width(B.currentItem.innerWidth()-parseInt(B.currentItem.css("paddingLeft")||0,10)-parseInt(B.currentItem.css("paddingRight")||0,10))}}}}B.placeholder=A(E.placeholder.element.call(B.element,B.currentItem));B.currentItem.after(B.placeholder);E.placeholder.update(B,B.placeholder)},_contactContainers:function(D){for(var C=this.containers.length-1;C>=0;C--){if(this._intersectsWith(this.containers[C].containerCache)){if(!this.containers[C].containerCache.over){if(this.currentContainer!=this.containers[C]){var H=10000;var G=null;var E=this.positionAbs[this.containers[C].floating?"left":"top"];for(var B=this.items.length-1;B>=0;B--){if(!A.ui.contains(this.containers[C].element[0],this.items[B].item[0])){continue}var F=this.items[B][this.containers[C].floating?"left":"top"];if(Math.abs(F-E)this.containment[2]){B.left=this.containment[2]-this.helperProportions.width}if(B.top+this.helperProportions.height>this.containment[3]){B.top=this.containment[3]-this.helperProportions.height}}if(G.grid){var F=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/G.grid[1])*G.grid[1];B.top=this.containment?(!(Fthis.containment[3])?F:(!(Fthis.containment[2])?E:(!(E=0;B--){if(A.ui.contains(this.containers[B].element[0],this.currentItem[0])){this.containers[B]._propagate("update",C,this,D);this.containers[B]._propagate("receive",C,this,D)}}}for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._propagate("deactivate",C,this,D);if(this.containers[B].containerCache.over){this.containers[B]._propagate("out",C,this);this.containers[B].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this._propagate("beforeStop",C,null,D);this._propagate("stop",C,null,D);return false}this._propagate("beforeStop",C,null,D);this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.options.helper!="original"){this.helper.remove()}this.helper=null;this._propagate("stop",C,null,D);return true},_propagate:function(F,B,C,D){A.ui.plugin.call(this,F,[B,this._ui(C)]);var E=!D?this.element.triggerHandler(F=="sort"?F:"sort"+F,[B,this._ui(C)],this.options[F]):true;if(E===false){this.cancel()}},plugins:{},_ui:function(C){var B=C||this;return{helper:B.helper,placeholder:B.placeholder||A([]),position:B.position,absolutePosition:B.positionAbs,item:B.currentItem,sender:C?C.element:null}}}));A.extend(A.ui.sortable,{getter:"serialize toArray",version:"1.6",defaults:{accurateIntersection:true,appendTo:"parent",cancel:":input",delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,helper:"original",items:"> *",scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,sortIndicator:A.ui.sortable.prototype._rearrange,tolerance:"default",zIndex:1000}});A.ui.plugin.add("sortable","cursor",{start:function(D,E){var C=A("body"),B=A(this).data("sortable");if(C.css("cursor")){B.options._cursor=C.css("cursor")}C.css("cursor",B.options.cursor)},beforeStop:function(C,D){var B=A(this).data("sortable");if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("sortable","opacity",{start:function(D,E){var C=E.helper,B=A(this).data("sortable");if(C.css("opacity")){B.options._opacity=C.css("opacity")}C.css("opacity",B.options.opacity)},beforeStop:function(C,D){var B=A(this).data("sortable");if(B.options._opacity){A(D.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("sortable","scroll",{start:function(C,D){var B=A(this).data("sortable"),E=B.options;if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},sort:function(D,E){var C=A(this).data("sortable"),F=C.options,B=false;if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY').insertBefore(H.headers);E(' ').appendTo(H.headers);H.headers.addClass("ui-accordion-header")}var J;if(H.fillSpace){J=this.element.parent().height();H.headers.each(function(){J-=E(this).outerHeight()});var I=0;H.headers.next().each(function(){I=Math.max(I,E(this).innerHeight()-E(this).height())}).height(J-I)}else{if(H.autoHeight){J=0;H.headers.next().each(function(){J=Math.max(J,E(this).outerHeight())}).height(J)}}this.element.attr("role","tablist");var G=this;H.headers.attr("role","tab").bind("keydown",function(L){return G._keydown(L)}).next().attr("role","tabpanel");H.headers.not(H.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!H.active.length){H.headers.eq(0).attr("tabIndex","0")}else{H.active.attr("aria-expanded","true").attr("tabIndex","0").parent().andSelf().addClass(H.selectedClass)}if(!E.browser.safari){H.headers.find("a").attr("tabIndex","-1")}if(H.event){this.element.bind((H.event)+".accordion",F)}},destroy:function(){this.options.headers.parent().andSelf().removeClass(this.options.selectedClass);this.options.headers.prev(".ui-accordion-left").remove();this.options.headers.children(".ui-accordion-right").remove();this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}E.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")},_keydown:function(J){if(this.options.disabled||J.altKey||J.ctrlKey){return }var K=E.ui.keyCode;var I=this.options.headers.length;var G=this.options.headers.index(J.target);var H=false;switch(J.keyCode){case K.RIGHT:case K.DOWN:H=this.options.headers[(G+1)%I];break;case K.LEFT:case K.UP:H=this.options.headers[(G-1+I)%I];break;case K.SPACE:case K.ENTER:return F.call(this.element[0],{target:J.target})}if(H){E(J.target).attr("tabIndex","-1");E(H).attr("tabIndex","0");H.focus();return false}return true},activate:function(G){F.call(this.element[0],{target:C(this.options.headers,G)[0]})}});function B(H,G){return function(){return H.apply(G,arguments)}}function D(I){if(!E.data(this,"accordion")){return }var G=E.data(this,"accordion");var H=G.options;H.running=I?0:--H.running;if(H.running){return }if(H.clearStyle){H.toShow.add(H.toHide).css({height:"",overflow:""})}G._trigger("change",null,H.data)}function A(G,N,K,L,O){var Q=E.data(this,"accordion").options;Q.toShow=G;Q.toHide=N;Q.data=K;var H=B(D,this);E.data(this,"accordion")._trigger("changestart",null,Q.data);Q.running=N.size()===0?G.size():N.size();if(Q.animated){var J={};if(!Q.alwaysOpen&&L){J={toShow:E([]),toHide:N,complete:H,down:O,autoHeight:Q.autoHeight}}else{J={toShow:G,toHide:N,complete:H,down:O,autoHeight:Q.autoHeight}}if(!Q.proxied){Q.proxied=Q.animated}if(!Q.proxiedDuration){Q.proxiedDuration=Q.duration}Q.animated=E.isFunction(Q.proxied)?Q.proxied(J):Q.proxied;Q.duration=E.isFunction(Q.proxiedDuration)?Q.proxiedDuration(J):Q.proxiedDuration;var P=E.ui.accordion.animations,I=Q.duration,M=Q.animated;if(!P[M]){P[M]=function(R){this.slide(R,{easing:M,duration:I||700})}}P[M](J)}else{if(!Q.alwaysOpen&&L){G.toggle()}else{N.hide();G.show()}H(true)}N.prev().attr("aria-expanded","false").attr("tabIndex","-1");G.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()}function F(L){var J=E.data(this,"accordion").options;if(J.disabled){return false}if(!L.target&&!J.alwaysOpen){J.active.parent().andSelf().toggleClass(J.selectedClass);var I=J.active.next(),M={options:J,newHeader:E([]),oldHeader:J.active,newContent:E([]),oldContent:I},G=(J.active=E([]));A.call(this,G,I,M);return false}var K=E(L.target);K=E(K.parents(J.header)[0]||K);var H=K[0]==J.active[0];if(J.running||(J.alwaysOpen&&H)){return false}if(!K.is(J.header)){return }J.active.parent().andSelf().toggleClass(J.selectedClass);if(!H){K.parent().andSelf().addClass(J.selectedClass)}var G=K.next(),I=J.active.next(),M={options:J,newHeader:H&&!J.alwaysOpen?E([]):K,oldHeader:J.active,newContent:H&&!J.alwaysOpen?E([]):G,oldContent:I},N=J.headers.index(J.active[0])>J.headers.index(K[0]);J.active=H?E([]):K;A.call(this,G,I,M,H,N);return false}function C(H,G){return G?typeof G=="number"?H.filter(":eq("+G+")"):H.not(H.not(G)):G===false?E([]):H.filter(":eq(0)")}E.extend(E.ui.accordion,{version:"1.6",defaults:{autoHeight:true,alwaysOpen:true,animated:"slide",event:"click",header:"a",navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()},running:0,selectedClass:"selected"},animations:{slide:function(G,J){G=E.extend({easing:"swing",duration:300},G,J);if(!G.toHide.size()){G.toShow.animate({height:"show"},G);return }var I=G.toHide.height(),L=G.toShow.height(),N=L/I,K=G.toShow.outerHeight()-G.toShow.height(),H=G.toShow.css("marginBottom"),M=G.toShow.css("overflow");tmargin=G.toShow.css("marginTop");G.toShow.css({height:0,overflow:"hidden",marginTop:0,marginBottom:-K}).show();G.toHide.filter(":hidden").each(G.complete).end().filter(":visible").animate({height:"hide"},{step:function(O){var P=(I-O)*N;if(E.browser.msie||E.browser.opera){P=Math.ceil(P)}G.toShow.height(P)},duration:G.duration,easing:G.easing,complete:function(){if(!G.autoHeight){G.toShow.css("height","auto")}G.toShow.css({marginTop:tmargin,marginBottom:H,overflow:M});G.complete()}})},bounceslide:function(G){this.slide(G,{easing:G.down?"easeOutBounce":"swing",duration:G.down?1000:200})},easeslide:function(G){this.slide(G,{easing:"easeinout",duration:700})}}})})(jQuery);/*
+ * jQuery UI Dialog 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ * ui.resizable.js
+ */
+(function(B){var A={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};B.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;var M=this,N=this.options,F=this.element.removeAttr("title").addClass("ui-dialog-content").wrap("
").wrap("
"),I=(this.uiDialogContainer=F.parent()).addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"}),E=(this.uiDialogTitlebar=B("
")).addClass("ui-dialog-titlebar").mousedown(function(){M.moveToTop()}).prependTo(I),J=B(' ').addClass("ui-dialog-titlebar-close").attr("role","button").appendTo(E),G=(this.uiDialogTitlebarCloseText=B(" ")).text(N.closeText).appendTo(J),L=N.title||" ",D=B.ui.dialog.getTitleId(this.element),C=B(" ").addClass("ui-dialog-title").attr("id",D).html(L).prependTo(E),K=(this.uiDialog=I.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(N.dialogClass).css({position:"absolute",width:N.width,height:N.height,overflow:"hidden",zIndex:N.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(O){(N.closeOnEscape&&O.keyCode&&O.keyCode==B.ui.keyCode.ESCAPE&&M.close())}).attr({role:"dialog","aria-labelledby":D}).mouseup(function(){M.moveToTop()}),H=(this.uiDialogButtonPane=B("
")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(K),J=B(".ui-dialog-titlebar-close",E).hover(function(){B(this).addClass("ui-dialog-titlebar-close-hover")},function(){B(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(O){O.stopPropagation()}).click(function(){M.close();return false});E.find("*").add(E).disableSelection();(N.draggable&&B.fn.draggable&&this._makeDraggable());(N.resizable&&B.fn.resizable&&this._makeResizable());this._createButtons(N.buttons);this._isOpen=false;(N.bgiframe&&B.fn.bgiframe&&K.bgiframe());(N.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(){if(false===this._trigger("beforeclose",null,{options:this.options})){return }(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide).unbind("keypress.ui-dialog");this._trigger("close",null,{options:this.options});B.ui.dialog.overlay.resize();this._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(F){if((this.options.modal&&!F)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",null,{options:this.options})}var E=this.options.zIndex,D=this.options;B(".ui-dialog:visible").each(function(){E=Math.max(E,parseInt(B(this).css("z-index"),10)||D.zIndex)});(this.overlay&&this.overlay.$el.css("z-index",++E));var C={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++E);this.element.attr(C);this._trigger("focus",null,{options:this.options})},open:function(){if(this._isOpen){return }this.overlay=this.options.modal?new B.ui.dialog.overlay(this):null;(this.uiDialog.next().length&&this.uiDialog.appendTo("body"));this._position(this.options.position);this.uiDialog.show(this.options.show);(this.options.autoResize&&this._size());this.moveToTop(true);(this.options.modal&&this.uiDialog.bind("keypress.ui-dialog",function(E){if(E.keyCode!=B.ui.keyCode.TAB){return }var D=B(":tabbable",this),F=D.filter(":first")[0],C=D.filter(":last")[0];if(E.target==C&&!E.shiftKey){setTimeout(function(){F.focus()},1)}else{if(E.target==F&&E.shiftKey){setTimeout(function(){C.focus()},1)}}}));this.uiDialog.find(":tabbable:first").focus();this._trigger("open",null,{options:this.options});this._isOpen=true},_createButtons:function(F){var E=this,C=false,D=this.uiDialogButtonPane;D.empty().hide();B.each(F,function(){return !(C=true)});if(C){D.show();B.each(F,function(G,H){B(' ').text(G).click(function(){H.apply(E.element[0],arguments)}).appendTo(D)})}},_makeDraggable:function(){var C=this,D=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content",helper:D.dragHelper,handle:".ui-dialog-titlebar",start:function(){C.moveToTop();(D.dragStart&&D.dragStart.apply(C.element[0],arguments))},drag:function(){(D.drag&&D.drag.apply(C.element[0],arguments))},stop:function(){(D.dragStop&&D.dragStop.apply(C.element[0],arguments));B.ui.dialog.overlay.resize()}})},_makeResizable:function(F){F=(F===undefined?this.options.resizable:F);var C=this,E=this.options,D=typeof F=="string"?F:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",helper:E.resizeHelper,maxWidth:E.maxWidth,maxHeight:E.maxHeight,minWidth:E.minWidth,minHeight:E.minHeight,start:function(){(E.resizeStart&&E.resizeStart.apply(C.element[0],arguments))},resize:function(){(E.autoResize&&C._size.apply(C));(E.resize&&E.resize.apply(C.element[0],arguments))},handles:D,stop:function(){(E.autoResize&&C._size.apply(C));(E.resizeStop&&E.resizeStop.apply(C.element[0],arguments));B.ui.dialog.overlay.resize()}})},_position:function(H){var D=B(window),E=B(document),F=E.scrollTop(),C=E.scrollLeft(),G=F;if(B.inArray(H,["center","top","right","bottom","left"])>=0){H=[H=="right"||H=="left"?H:"center",H=="top"||H=="bottom"?H:"middle"]}if(H.constructor!=Array){H=["center","middle"]}if(H[0].constructor==Number){C+=H[0]}else{switch(H[0]){case"left":C+=0;break;case"right":C+=D.width()-this.uiDialog.outerWidth();break;default:case"center":C+=(D.width()-this.uiDialog.outerWidth())/2}}if(H[1].constructor==Number){F+=H[1]}else{switch(H[1]){case"top":F+=0;break;case"bottom":F+=(B.browser.opera?window.innerHeight:D.height())-this.uiDialog.outerHeight();break;default:case"middle":F+=((B.browser.opera?window.innerHeight:D.height())-this.uiDialog.outerHeight())/2}}F=Math.max(F,G);this.uiDialog.css({top:F,left:C})},_setData:function(D,E){(A[D]&&this.uiDialog.data(A[D],E));switch(D){case"buttons":this._createButtons(E);break;case"closeText":this.uiDialogTitlebarCloseText.text(E);break;case"draggable":(E?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(E);break;case"position":this._position(E);break;case"resizable":var C=this.uiDialog,F=this.uiDialog.is(":data(resizable)");(F&&!E&&C.resizable("destroy"));(F&&typeof E=="string"&&C.resizable("option","handles",E));(F||this._makeResizable(E));break;case"title":B(".ui-dialog-title",this.uiDialogTitlebar).html(E||" ");break;case"width":this.uiDialog.width(E);break}B.widget.prototype._setData.apply(this,arguments)},_size:function(){var D=this.uiDialogContainer,G=this.uiDialogTitlebar,E=this.element,F=(parseInt(E.css("margin-top"),10)||0)+(parseInt(E.css("margin-bottom"),10)||0),C=(parseInt(E.css("margin-left"),10)||0)+(parseInt(E.css("margin-right"),10)||0);E.height(D.height()-G.outerHeight()-F);E.width(D.width()-C)}});B.extend(B.ui.dialog,{version:"1.6",defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1000},getter:"isOpen",uuid:0,getTitleId:function(C){return"ui-dialog-title-"+(C.attr("id")||++this.uuid)},overlay:function(C){this.$el=B.ui.dialog.overlay.create(C)}});B.extend(B.ui.dialog.overlay,{instances:[],events:B.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(C){return C+".dialog-overlay"}).join(" "),create:function(D){if(this.instances.length===0){setTimeout(function(){B("a, :input").bind(B.ui.dialog.overlay.events,function(){var F=false;var H=B(this).parents(".ui-dialog");if(H.length){var E=B(".ui-dialog-overlay");if(E.length){var G=parseInt(E.css("z-index"),10);E.each(function(){G=Math.max(G,parseInt(B(this).css("z-index"),10))});F=parseInt(H.css("z-index"),10)>G}else{F=true}}return F})},1);B(document).bind("keydown.dialog-overlay",function(E){(D.options.closeOnEscape&&E.keyCode&&E.keyCode==B.ui.keyCode.ESCAPE&&D.close())});B(window).bind("resize.dialog-overlay",B.ui.dialog.overlay.resize)}var C=B("
").appendTo(document.body).addClass("ui-dialog-overlay").css(B.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},D.options.overlay));(D.options.bgiframe&&B.fn.bgiframe&&C.bgiframe());this.instances.push(C);return C},destroy:function(C){this.instances.splice(B.inArray(this.instances,C),1);if(this.instances.length===0){B("a, :input").add([document,window]).unbind(".dialog-overlay")}C.remove()},height:function(){if(B.browser.msie&&B.browser.version<7){var D=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var C=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(D").addClass("ui-slider-handle").appendTo(B.element);if(this.id){D.attr("id",this.id)}return D[0]})}var C=function(D){this.element=A(D);this.element.data("mouse",this);this.options=B.options;this.element.bind("mousedown",function(){if(B.currentHandle){this.blur(B.currentHandle)}B._focus(this,true)});this._mouseInit()};A.extend(C.prototype,A.ui.mouse,{_mouseCapture:function(){return true},_mouseStart:function(D){return B._start.call(B,D,this.element[0])},_mouseDrag:function(D){return B._drag.call(B,D,this.element[0])},_mouseStop:function(D){return B._stop.call(B,D,this.element[0])},trigger:function(D){this._mouseDown(D)}});A(this.handle).each(function(){new C(this)}).wrap(' ').parent().bind("click",function(){return false}).bind("focus",function(D){B._focus(this.firstChild)}).bind("blur",function(D){B._blur(this.firstChild)}).bind("keydown",function(D){if(!B.options.noKeyboard){return B._keydown(D.keyCode,this.firstChild)}});this.element.bind("mousedown.slider",function(D){if(A(D.target).is(".ui-slider-handle")){return }B._click.apply(B,[D]);B.currentHandle.data("mouse").trigger(D);B.firstValue=B.firstValue+1});A.each(this.options.handles||[],function(D,E){B.moveTo(E.start,D,true)});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true)}this.previousHandle=A(this.handle[0]);if(this.handle.length==2&&this.options.range){this._createRange()}},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){var B=A(this).data("mouse");B&&B._mouseDestroy()})}this.generated&&this.generated.remove()},_start:function(B,C){var D=this.options;if(D.disabled){return false}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this._focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:B.pageY-this.handleOffset.top,left:B.pageX-this.handleOffset.left};this.firstValue=this.value();this._propagate("start",B);this._drag(B,C);return true},_drag:function(C,E){var F=this.options;var B={top:C.pageY-this.offset.top-this.clickOffset.top,left:C.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this._focus(this.previousHandle,true)}B.left=this._translateLimits(B.left,"x");B.top=this._translateLimits(B.top,"y");if(F.stepping.x){var D=this._convertValue(B.left,"x");D=this._round(D/F.stepping.x)*F.stepping.x;B.left=this._translateValue(D,"x")}if(F.stepping.y){var D=this._convertValue(B.top,"y");D=this._round(D/F.stepping.y)*F.stepping.y;B.top=this._translateValue(D,"y")}B.left=this._translateRange(B.left,"x");B.top=this._translateRange(B.top,"y");if(F.axis!="vertical"){this.currentHandle.css({left:B.left})}if(F.axis!="horizontal"){this.currentHandle.css({top:B.top})}this.currentHandle.data("mouse").sliderValue={x:this._round(this._convertValue(B.left,"x"))||0,y:this._round(this._convertValue(B.top,"y"))||0};if(this.rangeElement){this._updateRange()}this._propagate("slide",C);return false},_stop:function(B){this._propagate("stop",B);if(this.firstValue!=this.value()){this._propagate("change",B)}this._focus(this.currentHandle,true);return false},_round:function(B){return this.options.round?parseInt(B,10):parseFloat(B)},_setData:function(B,C){A.widget.prototype._setData.apply(this,arguments);if(/min|max|steps/.test(B)){this._initBoundaries()}if(B=="range"){C?this.handle.length==2&&this._createRange():this._removeRange()}},_initBoundaries:function(){var B=this.element[0],C=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};A.extend(C,{axis:C.axis||(B.offsetWidth").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this._updateRange()},_removeRange:function(){this.rangeElement.remove();this.rangeElement=null},_updateRange:function(){var C=this.options.axis=="vertical"?"top":"left";var B=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(C,(this._round(A(this.handle[0]).css(C))||0)+this._handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(B,(this._round(A(this.handle[1]).css(C))||0)-(this._round(A(this.handle[0]).css(C))||0))},_getRange:function(){return this.rangeElement?this._convertValue(this._round(this.rangeElement.css(this.options.axis=="vertical"?"height":"width")),this.options.axis=="vertical"?"y":"x"):null},_handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(D,B){if(this.handle.length==1){this.currentHandle=this.handle}if(!B){B=this.options.axis=="vertical"?"y":"x"}var C=A(D!=undefined&&D!==null?this.handle[D]||D:this.currentHandle);if(C.data("mouse").sliderValue){return this._round(C.data("mouse").sliderValue[B])}else{return this._round(((this._round(C.css(B=="x"?"left":"top"))/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(D,B)))*this.options.realMax[B])+this.options.min[B])}},_convertValue:function(C,B){return this.options.min[B]+(C/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)))*this.options.realMax[B]},_translateValue:function(C,B){return((C-this.options.min[B])/this.options.realMax[B])*(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B))},_translateRange:function(D,B){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&D>=this._translateValue(this.value(1),B)){D=this._translateValue(this.value(1,B)-this._oneStep(B),B)}if(this.currentHandle[0]==this.handle[1]&&D<=this._translateValue(this.value(0),B)){D=this._translateValue(this.value(0,B)+this._oneStep(B),B)}}if(this.options.handles){var C=this.options.handles[this._handleIndex()];if(Dthis._translateValue(C.max,B)){D=this._translateValue(C.max,B)}}}return D},_translateLimits:function(C,B){if(C>=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)){C=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)}if(C<=0){C=0}return C},_handleSize:function(C,B){return A(C!=undefined&&C!==null?this.handle[C]:this.currentHandle)[0]["offset"+(B=="x"?"Width":"Height")]},_oneStep:function(B){return this.options.stepping[B]||1},_pageStep:function(B){return 10},moveTo:function(F,E,G){var H=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(E==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(E==undefined&&!this.currentHandle){E=0}if(E!=undefined){this.currentHandle=this.previousHandle=A(this.handle[E]||E)}if(F.x!==undefined&&F.y!==undefined){var B=F.x,I=F.y}else{var B=F,I=F}if(B!==undefined&&B.constructor!=Number){var D=/^\-\=/.test(B),C=/^\+\=/.test(B);if(D||C){B=this.value(null,"x")+this._round(B.replace(D?"=":"+=",""))}else{B=isNaN(this._round(B))?undefined:this._round(B)}}if(I!==undefined&&I.constructor!=Number){var D=/^\-\=/.test(I),C=/^\+\=/.test(I);if(D||C){I=this.value(null,"y")+this._round(I.replace(D?"=":"+=",""))}else{I=isNaN(this._round(I))?undefined:this._round(I)}}if(H.axis!="vertical"&&B!==undefined){if(H.stepping.x){B=this._round(B/H.stepping.x)*H.stepping.x}B=this._translateValue(B,"x");B=this._translateLimits(B,"x");B=this._translateRange(B,"x");H.animate?this.currentHandle.stop().animate({left:B},(Math.abs(parseInt(this.currentHandle.css("left"),10)-B))*(!isNaN(parseInt(H.animate,10))?H.animate:5)):this.currentHandle.css({left:B})}if(H.axis!="horizontal"&&I!==undefined){if(H.stepping.y){I=this._round(I/H.stepping.y)*H.stepping.y}I=this._translateValue(I,"y");I=this._translateLimits(I,"y");I=this._translateRange(I,"y");H.animate?this.currentHandle.stop().animate({top:I},(Math.abs(parseInt(this.currentHandle.css("top"),10)-I))*(!isNaN(parseInt(H.animate,10))?H.animate:5)):this.currentHandle.css({top:I})}if(this.rangeElement){this._updateRange()}this.currentHandle.data("mouse").sliderValue={x:this._round(this._convertValue(B,"x"))||0,y:this._round(this._convertValue(I,"y"))||0};if(!G){this._propagate("start",null);this._propagate("slide",null);this._propagate("stop",null);this._propagate("change",null)}},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="slide"?C:"slide"+C,[B,this.ui()],this.options[C])},plugins:{},ui:function(B){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?this._round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:this._round(this.value(null,"x")),y:this._round(this.value(null,"y"))},range:this._getRange()}}});A.extend(A.ui.slider,{getter:"value",version:"1.6",defaults:{animate:false,distance:1,handle:".ui-slider-handle",round:true}})})(jQuery);/*
+ * jQuery UI Tabs 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(A){A.widget("ui.tabs",{_init:function(){this._tabify(true)},destroy:function(){var B=this.options;this.element.unbind(".tabs").removeClass(B.navClass).removeData("tabs");this.$tabs.each(function(){var C=A.data(this,"href.tabs");if(C){this.href=C}var D=A(this).unbind(".tabs");A.each(["href","load","cache"],function(E,F){D.removeData(F+".tabs")})});this.$lis.add(this.$panels).each(function(){if(A.data(this,"destroy.tabs")){A(this).remove()}else{A(this).removeClass([B.selectedClass,B.deselectableClass,B.disabledClass,B.panelClass,B.hideClass].join(" "))}});if(B.cookie){this._cookie(null,B.cookie)}},_setData:function(B,C){if((/^selected/).test(B)){this.select(C)}else{this.options[B]=C;this._tabify()}},length:function(){return this.$tabs.length},_tabId:function(B){return B.title&&B.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+A.data(B)},_sanitizeSelector:function(B){return B.replace(/:/g,"\\:")},_cookie:function(){var B=this.cookie||(this.cookie="ui-tabs-"+A.data(this.element[0]));return A.cookie.apply(null,[B].concat(A.makeArray(arguments)))},_tabify:function(N){this.$lis=A("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return A("a",this)[0]});this.$panels=A([]);var O=this,C=this.options;this.$tabs.each(function(Q,P){if(P.hash&&P.hash.replace("#","")){O.$panels=O.$panels.add(O._sanitizeSelector(P.hash))}else{if(A(P).attr("href")!="#"){A.data(P,"href.tabs",P.href);A.data(P,"load.tabs",P.href);var S=O._tabId(P);P.href="#"+S;var R=A("#"+S);if(!R.length){R=A(C.panelTemplate).attr("id",S).addClass(C.panelClass).insertAfter(O.$panels[Q-1]||O.element);R.data("destroy.tabs",true)}O.$panels=O.$panels.add(R)}else{C.disabled.push(Q+1)}}});if(N){this.element.addClass(C.navClass);this.$panels.addClass(C.panelClass);if(C.selected===undefined){if(location.hash){this.$tabs.each(function(Q,P){if(P.hash==location.hash){C.selected=Q;return false}})}else{if(C.cookie){var I=parseInt(O._cookie(),10);if(I&&O.$tabs[I]){C.selected=I}}else{if(O.$lis.filter("."+C.selectedClass).length){C.selected=O.$lis.index(O.$lis.filter("."+C.selectedClass)[0])}}}}C.selected=C.selected===null||C.selected!==undefined?C.selected:0;C.disabled=A.unique(C.disabled.concat(A.map(this.$lis.filter("."+C.disabledClass),function(Q,P){return O.$lis.index(Q)}))).sort();if(A.inArray(C.selected,C.disabled)!=-1){C.disabled.splice(A.inArray(C.selected,C.disabled),1)}this.$panels.addClass(C.hideClass);this.$lis.removeClass(C.selectedClass);if(C.selected!==null){this.$panels.eq(C.selected).removeClass(C.hideClass);var E=[C.selectedClass];if(C.deselectable){E.push(C.deselectableClass)}this.$lis.eq(C.selected).addClass(E.join(" "));var J=function(){O._trigger("show",null,O.ui(O.$tabs[C.selected],O.$panels[C.selected]))};if(A.data(this.$tabs[C.selected],"load.tabs")){this.load(C.selected,J)}else{J()}}A(window).bind("unload",function(){O.$tabs.unbind(".tabs");O.$lis=O.$tabs=O.$panels=null})}else{C.selected=this.$lis.index(this.$lis.filter("."+C.selectedClass)[0])}if(C.cookie){this._cookie(C.selected,C.cookie)}for(var G=0,M;M=this.$lis[G];G++){A(M)[A.inArray(G,C.disabled)!=-1&&!A(M).hasClass(C.selectedClass)?"addClass":"removeClass"](C.disabledClass)}if(C.cache===false){this.$tabs.removeData("cache.tabs")}var B,H;if(C.fx){if(C.fx.constructor==Array){B=C.fx[0];H=C.fx[1]}else{B=H=C.fx}}function D(P,Q){P.css({display:""});if(A.browser.msie&&Q.opacity){P[0].style.removeAttribute("filter")}}var K=H?function(P,Q){Q.animate(H,H.duration||"normal",function(){Q.removeClass(C.hideClass);D(Q,H);O._trigger("show",null,O.ui(P,Q[0]))})}:function(P,Q){Q.removeClass(C.hideClass);O._trigger("show",null,O.ui(P,Q[0]))};var L=B?function(Q,P,R){P.animate(B,B.duration||"normal",function(){P.addClass(C.hideClass);D(P,B);if(R){K(Q,R,P)}})}:function(Q,P,R){P.addClass(C.hideClass);if(R){K(Q,R)}};function F(R,T,P,S){var Q=[C.selectedClass];if(C.deselectable){Q.push(C.deselectableClass)}T.addClass(Q.join(" ")).siblings().removeClass(Q.join(" "));L(R,P,S)}this.$tabs.unbind(".tabs").bind(C.event+".tabs",function(){var S=A(this).parents("li:eq(0)"),P=O.$panels.filter(":visible"),R=A(O._sanitizeSelector(this.hash));if((S.hasClass(C.selectedClass)&&!C.deselectable)||S.hasClass(C.disabledClass)||A(this).hasClass(C.loadingClass)||O._trigger("select",null,O.ui(this,R[0]))===false){this.blur();return false}C.selected=O.$tabs.index(this);if(C.deselectable){if(S.hasClass(C.selectedClass)){O.options.selected=null;S.removeClass([C.selectedClass,C.deselectableClass].join(" "));O.$panels.stop();L(this,P);this.blur();return false}else{if(!P.length){O.$panels.stop();var Q=this;O.load(O.$tabs.index(this),function(){S.addClass([C.selectedClass,C.deselectableClass].join(" "));K(Q,R)});this.blur();return false}}}if(C.cookie){O._cookie(C.selected,C.cookie)}O.$panels.stop();if(R.length){var Q=this;O.load(O.$tabs.index(this),P.length?function(){F(Q,S,P,R)}:function(){S.addClass(C.selectedClass);K(Q,R)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(A.browser.msie){this.blur()}return false});if(C.event!="click"){this.$tabs.bind("click.tabs",function(){return false})}},add:function(E,D,C){if(C==undefined){C=this.$tabs.length}var G=this.options;var I=A(G.tabTemplate.replace(/#\{href\}/g,E).replace(/#\{label\}/g,D));I.data("destroy.tabs",true);var H=E.indexOf("#")==0?E.replace("#",""):this._tabId(A("a:first-child",I)[0]);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).addClass(G.hideClass).data("destroy.tabs",true)}F.addClass(G.panelClass);if(C>=this.$lis.length){I.appendTo(this.element);F.appendTo(this.element[0].parentNode)}else{I.insertBefore(this.$lis[C]);F.insertBefore(this.$panels[C])}G.disabled=A.map(G.disabled,function(K,J){return K>=C?++K:K});this._tabify();if(this.$tabs.length==1){I.addClass(G.selectedClass);F.removeClass(G.hideClass);var B=A.data(this.$tabs[0],"load.tabs");if(B){this.load(C,B)}}this._trigger("add",null,this.ui(this.$tabs[C],this.$panels[C]))},remove:function(B){var D=this.options,E=this.$lis.eq(B).remove(),C=this.$panels.eq(B).remove();if(E.hasClass(D.selectedClass)&&this.$tabs.length>1){this.select(B+(B+1=B?--G:G});this._tabify();this._trigger("remove",null,this.ui(E.find("a")[0],C[0]))},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }var D=this.$lis.eq(B).removeClass(C.disabledClass);if(A.browser.safari){D.css("display","inline-block");setTimeout(function(){D.css("display","block")},0)}C.disabled=A.grep(C.disabled,function(F,E){return F!=B});this._trigger("enable",null,this.ui(this.$tabs[B],this.$panels[B]))},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.$lis.eq(C).addClass(D.disabledClass);D.disabled.push(C);D.disabled.sort();this._trigger("disable",null,this.ui(this.$tabs[C],this.$panels[C]))}},select:function(B){if(typeof B=="string"){B=this.$tabs.index(this.$tabs.filter("[href$="+B+"]")[0])}this.$tabs.eq(B).trigger(this.options.event+".tabs")},load:function(G,K){var L=this,D=this.options,E=this.$tabs.eq(G),J=E[0],H=K==undefined||K===false,B=E.data("load.tabs");K=K||function(){};if(!B||!H&&A.data(J,"cache.tabs")){K();return }var M=function(N){var O=A(N),P=O.find("*:last");return P.length&&P.is(":not(img)")&&P||O};var C=function(){L.$tabs.filter("."+D.loadingClass).removeClass(D.loadingClass).each(function(){if(D.spinner){M(this).parent().html(M(this).data("label.tabs"))}});L.xhr=null};if(D.spinner){var I=M(J).html();M(J).wrapInner(" ").find("em").data("label.tabs",I).html(D.spinner)}var F=A.extend({},D.ajaxOptions,{url:B,success:function(P,N){A(L._sanitizeSelector(J.hash)).html(P);C();if(D.cache){A.data(J,"cache.tabs",true)}L._trigger("load",null,L.ui(L.$tabs[G],L.$panels[G]));try{D.ajaxOptions.success(P,N)}catch(O){}K()}});if(this.xhr){this.xhr.abort();C()}E.addClass(D.loadingClass);L.xhr=A.ajax(F)},url:function(C,B){this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs",B)},ui:function(C,B){return{options:this.options,tab:C,panel:B,index:this.$tabs.index(C)}}});A.extend(A.ui.tabs,{version:"1.6",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,deselectable:false,deselectableClass:"ui-tabs-deselectable",disabled:[],disabledClass:"ui-tabs-disabled",event:"click",fx:null,hideClass:"ui-tabs-hide",idPrefix:"ui-tabs-",loadingClass:"ui-tabs-loading",navClass:"ui-tabs-nav",panelClass:"ui-tabs-panel",panelTemplate:"
",selectedClass:"ui-tabs-selected",spinner:"Loading…",tabTemplate:'#{label} '}});A.extend(A.ui.tabs.prototype,{rotation:null,rotate:function(C,F){F=F||false;var B=this,E=this.options.selected;function G(){B.rotation=setInterval(function(){E=++E')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('
'))}},_connectDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName)){return }var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){input[isRTL?"before":"after"](''+appendText+" ")}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");var trigger=$(this._get(inst,"buttonImageOnly")?$(" ").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$(' ').addClass(this._triggerClass).html(buttonImage==""?buttonText:$(" ").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](trigger);trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return }divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$(' ');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){$target.siblings("."+this._appendClass).remove().end().siblings("."+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;$target.siblings("button."+this._triggerClass).each(function(){this.disabled=false}).end().siblings("img."+this._triggerClass).css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){$target.children("."+this._disableClass).remove()}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;$target.siblings("button."+this._triggerClass).each(function(){this.disabled=true}).end().siblings("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);var offset=inline.offset();var relOffset={left:0,top:0};inline.parents().each(function(){if($(this).css("position")=="relative"){relOffset=$(this).offset();return false}});$target.prepend('
')}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return }var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1]*$(".ui-datepicker",inst.dpDiv[0])[0].offsetWidth);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};inst.dpDiv.empty().append(this._generateHTML(inst));var numMonths=this._getNumberOfMonths(inst);inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var pos=inst.input?this._findPos(inst.input[0]):null;var browserWidth=window.innerWidth||(document.documentElement?document.documentElement.clientWidth:document.body.clientWidth);var browserHeight=window.innerHeight||(document.documentElement?document.documentElement.clientHeight:document.body.clientHeight);var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(inst,"isRTL")||(offset.left+inst.dpDiv.width()-scrollX)>browserWidth){offset.left=Math.max((isFixed?0:scrollX),pos[0]+(inst.input?inst.input.width():0)-(isFixed?scrollX:0)-inst.dpDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))}else{offset.left-=(isFixed?scrollX:0)}if((offset.top+inst.dpDiv.height()-scrollY)>browserHeight){offset.top=Math.max((isFixed?0:scrollY),pos[1]-(isFixed?scrollY:0)-(this._inDialog?0:inst.dpDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))}else{offset.top-=(isFixed?scrollY:0)}return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return }var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect&&inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;inst.settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker");$("."+this._promptClass,inst.dpDiv).remove()},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);this._adjustInstDate(inst,offset,period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_changeFirstDay:function(id,day){var target=$(id);var inst=this._getInst(target[0]);inst.settings.firstDay=day;this._updateDatepicker(inst)},_selectDay:function(id,month,year,td){if($(td).hasClass(this._unselectableClass)){return }var target=$(id);var inst=this._getInst(target[0]);var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect){inst.stayOpen=!inst.stayOpen;if(inst.stayOpen){$(".ui-datepicker td",inst.dpDiv).removeClass(this._currentClass);$(td).addClass(this._currentClass)}}inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}else{if(rangeSelect){inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}else{if(rangeSelect){inst.selectedDay=inst.currentDay=inst.rangeStart.getDate();inst.selectedMonth=inst.currentMonth=inst.rangeStart.getMonth();inst.selectedYear=inst.currentYear=inst.rangeStart.getFullYear();inst.rangeStart=null;if(inst.inline){this._updateDatepicker(inst)}}}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"mandatory")){return }inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(this._get(inst,"rangeSelect")&&dateStr){dateStr=(inst.rangeStart?this._formatDate(inst,inst.rangeStart):dateStr)+this._get(inst,"rangeSeparator")+dateStr}if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof (inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=(isArray(date)?(!date[0]&&!date[1]?"":this.formatDate(altFormat,date[0],this._getFormatConfig(inst))+this._get(inst,"rangeSeparator")+this.formatDate(altFormat,date[1]||date[0],this._getFormatConfig(inst))):this.formatDate(altFormat,date,this._getFormatConfig(inst)));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDatenew Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)0&&iValue="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j0&&iValue-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat0){var settings=this._getFormatConfig(inst);if(dates.length>1){date=this.parseDate(dateFormat,dates[1],settings)||defaultDate;inst.endDay=date.getDate();inst.endMonth=date.getMonth();inst.endYear=date.getFullYear()}try{date=this.parseDate(dateFormat,dates[0],settings)||defaultDate}catch(event){this.log(event);date=defaultDate}}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates[0]?date.getDate():0);inst.currentMonth=(dates[0]?date.getMonth():0);inst.currentYear=(dates[0]?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(this._get(inst,"rangeSelect")){if(endDate){endDate=this._determineDate(endDate,null);inst.endDay=endDate.getDate();inst.endMonth=endDate.getMonth();inst.endYear=endDate.getFullYear()}else{inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst)+(!this._get(inst,"rangeSelect")?"":this._get(inst,"rangeSeparator")+this._formatDate(inst,inst.endDay,inst.endMonth,inst.endYear)))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));if(this._get(inst,"rangeSelect")){return[inst.rangeStart||startDate,(!inst.endYear?inst.rangeStart||startDate:this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)))]}else{return startDate}},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var showStatus=this._get(inst,"showStatus");var initStatus=this._get(inst,"initStatus")||" ";var isRTL=this._get(inst,"isRTL");var clear=(this._get(inst,"mandatory")?"":'");var controls=''+(isRTL?"":clear)+'
"+(isRTL?clear:"")+"
";var prompt=this._get(inst,"prompt");var closeAtTop=this._get(inst,"closeAtTop");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var showBigPrevNext=this._get(inst,"showBigPrevNext");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prevBigText=(showBigPrevNext?this._get(inst,"prevBigText"):"");prevBigText=(!navigationAsDateFormat?prevBigText:this.formatDate(prevBigText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepBigMonths,1)),this._getFormatConfig(inst)));var prev=''+(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?(showBigPrevNext?"
"+prevBigText+" ":"")+"
"+prevText+" ":(hideIfNoPrevNext?"":(showBigPrevNext?"
"+prevBigText+" ":"")+"
"+prevText+" "))+"
";var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var nextBigText=(showBigPrevNext?this._get(inst,"nextBigText"):"");nextBigText=(!navigationAsDateFormat?nextBigText:this.formatDate(nextBigText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepBigMonths,1)),this._getFormatConfig(inst)));var next=''+(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?"
"+nextText+" "+(showBigPrevNext?"
"+nextBigText+" ":""):(hideIfNoPrevNext?"":"
"+nextText+" "+(showBigPrevNext?"
"+nextBigText+" ":"")))+"
";var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var html=(closeAtTop&&!inst.inline?controls:"")+''+(isRTL?next:prev)+(this._isInRange(inst,gotoDate)?'
":"")+(isRTL?prev:next)+"
"+(prompt?''+prompt+"
":"");var firstDay=parseInt(this._get(inst,"firstDay"));firstDay=(isNaN(firstDay)?0:firstDay);var changeFirstDay=this._get(inst,"changeFirstDay");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var beforeShowDay=this._get(inst,"beforeShowDay");var highlightWeek=this._get(inst,"highlightWeek");var showOtherMonths=this._get(inst,"showOtherMonths");var showWeeks=this._get(inst,"showWeeks");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var weekStatus=this._get(inst,"weekStatus");var status=(showStatus?this._get(inst,"dayStatus")||initStatus:"");var dateStatus=this._get(inst,"statusForDate")||this.dateStatus;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);for(var row=0;row'+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,showStatus,initStatus,monthNames)+''+(showWeeks?""+this._get(inst,"weekHeader")+" ":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var dayStatus=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!changeFirstDay?"'+dayNamesMin[day]+(changeFirstDay?"":" ")+" "}html+=" ";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow'+(showWeeks?'"+calculateWeek(printDate)+" ":"");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDatemaxDate);html+='=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?(highlightWeek?" onmouseover=\"jQuery(this).parent().addClass('"+this._weekOverClass+"');\" onmouseout=\"jQuery(this).parent().removeClass('"+this._weekOverClass+"');\"":""):" onmouseover=\"jQuery(this).addClass('"+this._dayOverClass+"')"+(highlightWeek?".parent().addClass('"+this._weekOverClass+"')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+(dateStatus.apply((inst.input?inst.input[0]:null),[printDate,inst])||initStatus)+"');")+'" onmouseout="jQuery(this).removeClass(\''+this._dayOverClass+"')"+(highlightWeek?".parent().removeClass('"+this._weekOverClass+"')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+initStatus+"');")+'" onclick="jQuery.datepicker._selectDay(\'#'+inst.id+"',"+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?printDate.getDate():""+printDate.getDate()+" "))+" ";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}html+=""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}html+="
"}}html+=(showStatus?'
'+initStatus+"
":"")+(!closeAtTop&&!inst.inline?controls:"")+'
'+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,showStatus,initStatus,monthNames){minDate=(inst.rangeStart&&minDate&&selectedDate";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='"+monthNames[month]+" "}}monthHtml+=""}if(!showMonthAfterYear){html+=monthHtml+(secondary||changeMonth||changeYear?" ":"")}if(secondary||!changeYear){html+=drawYear}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=endYear=new Date().getFullYear();year+=parseInt(years[0],10);endYear+=parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='";for(;year<=endYear;year++){html+='"+year+" "}html+=" "}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="";return html},_addStatus:function(showStatus,id,text,initStatus){return(showStatus?" onmouseover=\"jQuery('#ui-datepicker-status-"+id+"').html('"+(text||initStatus)+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+id+"').html('"+initStatus+"');\"":"")},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document.body).append($.datepicker.dpDiv).mousedown($.datepicker._checkExternalClick);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.6"})(jQuery);/*
+ * jQuery UI Effects 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+(function(C){C.effects=C.effects||{};C.extend(C.effects,{version:"1.6",save:function(F,G){for(var E=0;E');var I=F.parent();if(F.css("position")=="static"){I.css({position:"relative"});F.css({position:"relative"})}else{var H=F.css("top");if(isNaN(parseInt(H))){H="auto"}var G=F.css("left");if(isNaN(parseInt(G))){G="auto"}I.css({position:F.css("position"),top:H,left:G,zIndex:F.css("z-index")}).show();F.css({position:"relative",top:0,left:0})}I.css(E);return I},removeWrapper:function(E){if(E.parent().attr("id")=="fxWrapper"){return E.parent().replaceWith(E)}return E},setTransition:function(F,G,E,H){H=H||{};C.each(G,function(J,I){unit=F.cssUnit(I);if(unit[0]>0){H[I]=unit[0]*E+unit[1]}});return H},animateClass:function(G,H,J,I){var E=(typeof J=="function"?J:(I?I:null));var F=(typeof J=="object"?J:null);return this.each(function(){var O={};var M=C(this);var N=M.attr("style")||"";if(typeof N=="object"){N=N["cssText"]}if(G.toggle){M.hasClass(G.toggle)?G.remove=G.toggle:G.add=G.toggle}var K=C.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(G.add){M.addClass(G.add)}if(G.remove){M.removeClass(G.remove)}var L=C.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(G.add){M.removeClass(G.add)}if(G.remove){M.addClass(G.remove)}for(var P in L){if(typeof L[P]!="function"&&L[P]&&P.indexOf("Moz")==-1&&P.indexOf("length")==-1&&L[P]!=K[P]&&(P.match(/color/i)||(!P.match(/color/i)&&!isNaN(parseInt(L[P],10))))&&(K.position!="static"||(K.position=="static"&&!P.match(/left|top|bottom|right/)))){O[P]=L[P]}}M.animate(O,H,F,function(){if(typeof C(this).attr("style")=="object"){C(this).attr("style")["cssText"]="";C(this).attr("style")["cssText"]=N}else{C(this).attr("style",N)}if(G.add){C(this).addClass(G.add)}if(G.remove){C(this).removeClass(G.remove)}if(E){E.apply(this,arguments)}})})}});C.fn.extend({_show:C.fn.show,_hide:C.fn.hide,__toggle:C.fn.toggle,_addClass:C.fn.addClass,_removeClass:C.fn.removeClass,_toggleClass:C.fn.toggleClass,effect:function(E,G,F,H){return C.effects[E]?C.effects[E].call(this,{method:E,options:G||{},duration:F,callback:H}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._show.apply(this,arguments)}else{var E=arguments[1]||{};E["mode"]="show";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._hide.apply(this,arguments)}else{var E=arguments[1]||{};E["mode"]="hide";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{var E=arguments[1]||{};E["mode"]="toggle";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},addClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{add:F},E,H,G]):this._addClass(F)},removeClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{remove:F},E,H,G]):this._removeClass(F)},toggleClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{toggle:F},E,H,G]):this._toggleClass(F)},morph:function(E,G,F,I,H){return C.effects.animateClass.apply(this,[{add:G,remove:E},F,I,H])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(E){var F=this.css(E),G=[];C.each(["em","px","%","pt"],function(H,I){if(F.indexOf(I)>0){G=[parseFloat(F),I]}});return G}});C.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(F,E){C.fx.step[E]=function(G){if(G.state==0){G.start=D(G.elem,E);G.end=B(G.end)}G.elem.style[E]="rgb("+[Math.max(Math.min(parseInt((G.pos*(G.end[0]-G.start[0]))+G.start[0]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[1]-G.start[1]))+G.start[1]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[2]-G.start[2]))+G.start[2]),255),0)].join(",")+")"}});function B(F){var E;if(F&&F.constructor==Array&&F.length==3){return F}if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return[parseInt(E[1]),parseInt(E[2]),parseInt(E[3])]}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return[parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55]}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)]}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)]}if(E=/rgba\(0, 0, 0, 0\)/.exec(F)){return A["transparent"]}return A[C.trim(F).toLowerCase()]}function D(G,E){var F;do{F=C.curCSS(G,E);if(F!=""&&F!="transparent"||C.nodeName(G,"body")){break}E="backgroundColor"}while(G=G.parentNode);return B(F)}var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};C.easing.jswing=C.easing.swing;C.extend(C.easing,{def:"easeOutQuad",swing:function(F,G,E,I,H){return C.easing[C.easing.def](F,G,E,I,H)},easeInQuad:function(F,G,E,I,H){return I*(G/=H)*G+E},easeOutQuad:function(F,G,E,I,H){return -I*(G/=H)*(G-2)+E},easeInOutQuad:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G+E}return -I/2*((--G)*(G-2)-1)+E},easeInCubic:function(F,G,E,I,H){return I*(G/=H)*G*G+E},easeOutCubic:function(F,G,E,I,H){return I*((G=G/H-1)*G*G+1)+E},easeInOutCubic:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G+E}return I/2*((G-=2)*G*G+2)+E},easeInQuart:function(F,G,E,I,H){return I*(G/=H)*G*G*G+E},easeOutQuart:function(F,G,E,I,H){return -I*((G=G/H-1)*G*G*G-1)+E},easeInOutQuart:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G*G+E}return -I/2*((G-=2)*G*G*G-2)+E},easeInQuint:function(F,G,E,I,H){return I*(G/=H)*G*G*G*G+E},easeOutQuint:function(F,G,E,I,H){return I*((G=G/H-1)*G*G*G*G+1)+E},easeInOutQuint:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G*G*G+E}return I/2*((G-=2)*G*G*G*G+2)+E},easeInSine:function(F,G,E,I,H){return -I*Math.cos(G/H*(Math.PI/2))+I+E},easeOutSine:function(F,G,E,I,H){return I*Math.sin(G/H*(Math.PI/2))+E},easeInOutSine:function(F,G,E,I,H){return -I/2*(Math.cos(Math.PI*G/H)-1)+E},easeInExpo:function(F,G,E,I,H){return(G==0)?E:I*Math.pow(2,10*(G/H-1))+E},easeOutExpo:function(F,G,E,I,H){return(G==H)?E+I:I*(-Math.pow(2,-10*G/H)+1)+E},easeInOutExpo:function(F,G,E,I,H){if(G==0){return E}if(G==H){return E+I}if((G/=H/2)<1){return I/2*Math.pow(2,10*(G-1))+E}return I/2*(-Math.pow(2,-10*--G)+2)+E},easeInCirc:function(F,G,E,I,H){return -I*(Math.sqrt(1-(G/=H)*G)-1)+E},easeOutCirc:function(F,G,E,I,H){return I*Math.sqrt(1-(G=G/H-1)*G)+E},easeInOutCirc:function(F,G,E,I,H){if((G/=H/2)<1){return -I/2*(Math.sqrt(1-G*G)-1)+E}return I/2*(Math.sqrt(1-(G-=2)*G)+1)+E},easeInElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E}if((H/=K)==1){return E+L}if(!J){J=K*0.3}if(G").css({position:"absolute",visibility:"visible",left:-D*(G/E),top:-F*(C/I)}).parent().addClass("effects-explode").css({position:"absolute",overflow:"hidden",width:G/E,height:C/I,left:J.left+D*(G/E)+(B.options.mode=="show"?(D-Math.floor(E/2))*(G/E):0),top:J.top+F*(C/I)+(B.options.mode=="show"?(F-Math.floor(I/2))*(C/I):0),opacity:B.options.mode=="show"?0:1}).animate({left:J.left+D*(G/E)+(B.options.mode=="show"?0:(D-Math.floor(E/2))*(G/E)),top:J.top+F*(C/I)+(B.options.mode=="show"?0:(F-Math.floor(I/2))*(C/I)),opacity:B.options.mode=="show"?1:0},B.duration||500)}}setTimeout(function(){B.options.mode=="show"?H.css({visibility:"visible"}):H.css({visibility:"visible"}).hide();if(B.callback){B.callback.apply(H[0])}H.dequeue();A(".effects-explode").remove()},B.duration||500)})}})(jQuery);/*
+ * jQuery UI Effects Fold 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(A){A.effects.fold=function(B){return this.queue(function(){var E=A(this),J=["position","top","left"];var G=A.effects.setMode(E,B.options.mode||"hide");var N=B.options.size||15;var M=!(!B.options.horizFirst);A.effects.save(E,J);E.show();var D=A.effects.createWrapper(E).css({overflow:"hidden"});var H=((G=="show")!=M);var F=H?["width","height"]:["height","width"];var C=H?[D.width(),D.height()]:[D.height(),D.width()];var I=/([0-9]+)%/.exec(N);if(I){N=parseInt(I[1])/100*C[G=="hide"?0:1]}if(G=="show"){D.css(M?{height:0,width:N}:{height:N,width:0})}var L={},K={};L[F[0]]=G=="show"?C[0]:N;K[F[1]]=G=="show"?C[1]:0;D.animate(L,B.duration/2,B.options.easing).animate(K,B.duration/2,B.options.easing,function(){if(G=="hide"){E.hide()}A.effects.restore(E,J);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery);/*
+ * jQuery UI Effects Highlight 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(A){A.effects.highlight=function(B){return this.queue(function(){var E=A(this),D=["backgroundImage","backgroundColor","opacity"];var H=A.effects.setMode(E,B.options.mode||"show");var C=B.options.color||"#ffff99";var G=E.css("backgroundColor");A.effects.save(E,D);E.show();E.css({backgroundImage:"none",backgroundColor:C});var F={backgroundColor:G};if(H=="hide"){F["opacity"]=0}E.animate(F,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(H=="hide"){E.hide()}A.effects.restore(E,D);if(H=="show"&&A.browser.msie){this.style.removeAttribute("filter")}if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);/*
+ * jQuery UI Effects Pulsate 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(A){A.effects.pulsate=function(B){return this.queue(function(){var D=A(this);var F=A.effects.setMode(D,B.options.mode||"show");var E=B.options.times||5;if(F=="hide"){E--}if(D.is(":hidden")){D.css("opacity",0);D.show();D.animate({opacity:1},B.duration/2,B.options.easing);E=E-2}for(var C=0;C').appendTo(document.body);if(B.options.className){D.addClass(B.options.className)}D.addClass(B.options.className);D.css({top:C.top,left:C.left,height:E.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:E.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth")),position:"absolute"});C=F.offset();animation={top:C.top,left:C.left,height:F.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:F.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth"))};D.animate(animation,B.duration,B.options.easing,function(){D.remove();if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery);
\ No newline at end of file
diff --git a/modules/tntcarrier/js/jquery.js b/modules/tntcarrier/js/jquery.js
new file mode 100644
index 000000000..72f32c906
--- /dev/null
+++ b/modules/tntcarrier/js/jquery.js
@@ -0,0 +1,32 @@
+/*
+ * jQuery 1.2.6 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
+ * $Rev: 5685 $
+ */
+(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
+return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,""]||!tags.indexOf("","
"]||(!tags.indexOf("","