update 5.11.13
This commit is contained in:
1 parent
55cd7c4c34
commit
21209d799f
38 files changed
+3240
-638
No files matched your search
@@ -99,7 +99,7 @@ $(function(){ldelim}
|
|||||||
{if $field_name eq 'company'}
|
{if $field_name eq 'company'}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="company">{l s='Company'}</label>
|
<label for="company">{l s='Company'}</label>
|
||||||
<input class="form-control" type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company|escape:'html'}{/if}{/if}" onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="form-control" type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company|escape:'html'}{/if}{/if}" onkeyup="if($(this).val().length) { if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');}" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $field_name eq 'vat_number'}
|
{if $field_name eq 'vat_number'}
|
||||||
@@ -107,7 +107,7 @@ $(function(){ldelim}
|
|||||||
<div id="vat_number">
|
<div id="vat_number">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="vat_number">{l s='VAT number'}</label>
|
<label for="vat_number">{l s='VAT number'}</label>
|
||||||
<input type="text" class="form-control" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{else}{if isset($address->vat_number)}{$address->vat_number|escape:'html'}{/if}{/if}" onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input type="text" class="form-control" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{else}{if isset($address->vat_number)}{$address->vat_number|escape:'html'}{/if}{/if}" onkeyup="if($(this).val().length) { if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok'); }" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -116,39 +116,39 @@ $(function(){ldelim}
|
|||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
|
|
||||||
<label for="firstname">{l s='First name'} <sup>*</sup></label>
|
<label for="firstname">{l s='First name'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="text" name="firstname" id="firstname" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{else}{if isset($address->firstname)}{$address->firstname|escape:'html'}{/if}{/if}" onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" name="firstname" id="firstname" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{else}{if isset($address->firstname)}{$address->firstname|escape:'html'}{/if}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
{if $field_name eq 'lastname'}
|
{if $field_name eq 'lastname'}
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="lastname">{l s='Last name'} <sup>*</sup></label>
|
<label for="lastname">{l s='Last name'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="text" id="lastname" name="lastname" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{else}{if isset($address->lastname)}{$address->lastname|escape:'html'}{/if}{/if}" onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" id="lastname" name="lastname" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{else}{if isset($address->lastname)}{$address->lastname|escape:'html'}{/if}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $field_name eq 'address1'}
|
{if $field_name eq 'address1'}
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="address1">{l s='Address'} <sup>*</sup></label>
|
<label for="address1">{l s='Address'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="text" id="address1" name="address1" value="{if isset($smarty.post.address1)}{$smarty.post.address1}{else}{if isset($address->address1)}{$address->address1|escape:'html'}{/if}{/if}"onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" id="address1" name="address1" value="{if isset($smarty.post.address1)}{$smarty.post.address1}{else}{if isset($address->address1)}{$address->address1|escape:'html'}{/if}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $field_name eq 'address2'}
|
{if $field_name eq 'address2'}
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="address2">{l s='Address (Line 2)'}</label>
|
<label for="address2">{l s='Address (Line 2)'}</label>
|
||||||
<input class="form-control" type="text" id="address2" name="address2" value="{if isset($smarty.post.address2)}{$smarty.post.address2}{else}{if isset($address->address2)}{$address->address2|escape:'html'}{/if}{/if}" onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" id="address2" name="address2" value="{if isset($smarty.post.address2)}{$smarty.post.address2}{else}{if isset($address->address2)}{$address->address2|escape:'html'}{/if}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $field_name eq 'postcode'}
|
{if $field_name eq 'postcode'}
|
||||||
{assign var="postCodeExist" value="true"}
|
{assign var="postCodeExist" value="true"}
|
||||||
<div class="required postcode form-group">
|
<div class="required postcode form-group">
|
||||||
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
|
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html'}{/if}{/if}" onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html'}{/if}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $field_name eq 'city'}
|
{if $field_name eq 'city'}
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="city">{l s='City'} <sup>*</sup></label>
|
<label for="city">{l s='City'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{else}{if isset($address->city)}{$address->city|escape:'html'}{/if}{/if}" maxlength="64" onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{else}{if isset($address->city)}{$address->city|escape:'html'}{/if}{/if}" maxlength="64" />
|
||||||
</div>
|
</div>
|
||||||
{*
|
{*
|
||||||
if customer hasn't update his layout address, country has to be verified
|
if customer hasn't update his layout address, country has to be verified
|
||||||
@@ -200,8 +200,7 @@ $(function(){ldelim}
|
|||||||
{if $postCodeExist eq "false"}
|
{if $postCodeExist eq "false"}
|
||||||
<div class="required postcode form-group unvisible">
|
<div class="required postcode form-group unvisible">
|
||||||
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
|
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html'}{/if}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());"
|
<input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html'}{/if}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
|
||||||
onkeyup="if (validate_{$address_validation.$field_name.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $stateExist eq "false"}
|
{if $stateExist eq "false"}
|
||||||
@@ -219,7 +218,7 @@ $(function(){ldelim}
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group phone-number">
|
<div class="form-group phone-number">
|
||||||
<label for="phone">{l s='Home phone'}</label>
|
<label for="phone">{l s='Home phone'}</label>
|
||||||
<input type="tel" id="phone" class="form-control" name="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{else}{if isset($address->phone)}{$address->phone|escape:'html'}{/if}{/if}" onkeyup="if (validate_{$address_validation.phone.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="{if isset($one_phone_at_least) && $one_phone_at_least}is_required{/if} validate form-control" data-validate="{$address_validation.phone.validate}" type="tel" id="phone" name="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{else}{if isset($address->phone)}{$address->phone|escape:'html'}{/if}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
{if isset($one_phone_at_least) && $one_phone_at_least}
|
{if isset($one_phone_at_least) && $one_phone_at_least}
|
||||||
<p class="inline-infos required">{l s='You must register at least one phone number.'}</p>
|
<p class="inline-infos required">{l s='You must register at least one phone number.'}</p>
|
||||||
@@ -227,11 +226,11 @@ $(function(){ldelim}
|
|||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
|
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
|
||||||
<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
|
<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
|
||||||
<input type="tel" id="phone_mobile" class="form-control" name="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{else}{if isset($address->phone_mobile)}{$address->phone_mobile|escape:'html'}{/if}{/if}" onkeyup="if (validate_{$address_validation.phone_mobile.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input class="validate form-control" data-validate="{$address_validation.phone_mobile.validate}" type="tel" id="phone_mobile" name="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{else}{if isset($address->phone_mobile)}{$address->phone_mobile|escape:'html'}{/if}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="required form-group" id="adress_alias">
|
<div class="required form-group" id="adress_alias">
|
||||||
<label for="alias">{l s='Please assign an address title for future reference.'} <sup>*</sup></label>
|
<label for="alias">{l s='Please assign an address title for future reference.'} <sup>*</sup></label>
|
||||||
<input type="text" id="alias" class="form-control" name="alias" value="{if isset($smarty.post.alias)}{$smarty.post.alias}{else if isset($address->alias)}{$address->alias|escape:'html'}{elseif !$select_address}{l s='My address'}{/if}" onkeyup="if (validate_{$address_validation.alias.validate}($(this).val())) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok');" />
|
<input type="text" id="alias" class="is_required validate form-control" data-validate="{$address_validation.alias.validate}" name="alias" value="{if isset($smarty.post.alias)}{$smarty.post.alias}{else if isset($address->alias)}{$address->alias|escape:'html'}{elseif !$select_address}{l s='My address'}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<p class="submit2">
|
<p class="submit2">
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ $(document).ready(function() {
|
|||||||
<div class="alert alert-danger" id="create_account_error" style="display:none"></div>
|
<div class="alert alert-danger" id="create_account_error" style="display:none"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email_create">{l s='Email address'}</label>
|
<label for="email_create">{l s='Email address'}</label>
|
||||||
<input type="text" id="email_create" name="email_create" value="{if isset($smarty.post.email_create)}{$smarty.post.email_create|stripslashes}{/if}" class="account_input form-control" />
|
<input type="text" class="is_required validate account_input form-control" data-validate="isEmail" id="email_create" name="email_create" value="{if isset($smarty.post.email_create)}{$smarty.post.email_create|stripslashes}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="submit">
|
<div class="submit">
|
||||||
{if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if}
|
{if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if}
|
||||||
@@ -184,11 +184,11 @@ $(document).ready(function() {
|
|||||||
<div class="form_content clearfix">
|
<div class="form_content clearfix">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">{l s='Email address'}</label>
|
<label for="email">{l s='Email address'}</label>
|
||||||
<input type="text" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|stripslashes}{/if}" class="account_input form-control" />
|
<input class="is_required validate account_input form-control" data-validate="isEmail" type="text" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|stripslashes}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="passwd">{l s='Password'}</label>
|
<label for="passwd">{l s='Password'}</label>
|
||||||
<span><input type="password" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|stripslashes}{/if}" class="account_input form-control" /></span>
|
<span><input class="is_required validate account_input form-control" type="password" data-validate="isPasswd" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|stripslashes}{/if}" /></span>
|
||||||
</div>
|
</div>
|
||||||
<p class="lost_password form-group"><a href="{$link->getPageLink('password')|escape:'html'}" title="{l s='Recover your forgotten password'}" rel="nofollow">{l s='Forgot your password?'}</a></p>
|
<p class="lost_password form-group"><a href="{$link->getPageLink('password')|escape:'html'}" title="{l s='Recover your forgotten password'}" rel="nofollow">{l s='Forgot your password?'}</a></p>
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
@@ -209,7 +209,7 @@ $(document).ready(function() {
|
|||||||
<!-- Account -->
|
<!-- Account -->
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="guest_email">{l s='Email address'} <sup>*</sup></label>
|
<label for="guest_email">{l s='Email address'} <sup>*</sup></label>
|
||||||
<input type="text" class="form-control" id="guest_email" name="guest_email" value="{if isset($smarty.post.guest_email)}{$smarty.post.guest_email}{/if}" />
|
<input type="text" class="is_required validate form-control" data-validate="isEmail" id="guest_email" name="guest_email" value="{if isset($smarty.post.guest_email)}{$smarty.post.guest_email}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="cleafix gender-line">
|
<div class="cleafix gender-line">
|
||||||
<label>{l s='Title'}</label>
|
<label>{l s='Title'}</label>
|
||||||
@@ -223,12 +223,12 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="firstname">{l s='First name'} <sup>*</sup></label>
|
<label for="firstname">{l s='First name'} <sup>*</sup></label>
|
||||||
<input type="text" class="text form-control" id="firstname" name="firstname" onblur="$('#customer_firstname').val($(this).val());" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{/if}" />
|
<input type="text" class="is_required validate text form-control" data-validate="isName" id="firstname" name="firstname" onblur="$('#customer_firstname').val($(this).val());" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{/if}" />
|
||||||
<input type="hidden" class="text" id="customer_firstname" name="customer_firstname" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{/if}" />
|
<input type="hidden" class="text" id="customer_firstname" name="customer_firstname" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="lastname">{l s='Last name'} <sup>*</sup></label>
|
<label for="lastname">{l s='Last name'} <sup>*</sup></label>
|
||||||
<input type="text" class="text form-control" id="lastname" name="lastname" onblur="$('#customer_lastname').val($(this).val());" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{/if}" />
|
<input type="text" class="is_required validate text form-control" data-validate="isName" id="lastname" name="lastname" onblur="$('#customer_lastname').val($(this).val());" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{/if}" />
|
||||||
<input type="hidden" class="text" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{/if}" />
|
<input type="hidden" class="text" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group date-select">
|
<div class="form-group date-select">
|
||||||
@@ -411,19 +411,19 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="customer_firstname">{l s='First name'} <sup>*</sup></label>
|
<label for="customer_firstname">{l s='First name'} <sup>*</sup></label>
|
||||||
<input onkeyup="$('#firstname').val(this.value);" type="text" class="form-control" id="customer_firstname" name="customer_firstname" value="{if isset($smarty.post.customer_firstname)}{$smarty.post.customer_firstname}{/if}" />
|
<input onkeyup="$('#firstname').val(this.value);" type="text" class="is_required validate form-control" data-validate="isName" id="customer_firstname" name="customer_firstname" value="{if isset($smarty.post.customer_firstname)}{$smarty.post.customer_firstname}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="customer_lastname">{l s='Last name'} <sup>*</sup></label>
|
<label for="customer_lastname">{l s='Last name'} <sup>*</sup></label>
|
||||||
<input onkeyup="$('#lastname').val(this.value);" type="text" class="form-control" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.customer_lastname)}{$smarty.post.customer_lastname}{/if}" />
|
<input onkeyup="$('#lastname').val(this.value);" type="text" class="is_required validate form-control" data-validate="isName" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.customer_lastname)}{$smarty.post.customer_lastname}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="email">{l s='Email'} <sup>*</sup></label>
|
<label for="email">{l s='Email'} <sup>*</sup></label>
|
||||||
<input type="text" class="form-control" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email}{/if}" />
|
<input type="text" class="is_required validate form-control" data-validate="isEmail" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email}{/if}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="required password form-group">
|
<div class="required password form-group">
|
||||||
<label for="passwd">{l s='Password'} <sup>*</sup></label>
|
<label for="passwd">{l s='Password'} <sup>*</sup></label>
|
||||||
<input type="password" class="form-control" name="passwd" id="passwd" />
|
<input type="password" class="is_required validate form-control" data-validate="isPasswd" name="passwd" id="passwd" />
|
||||||
<span class="form_info">{l s='(Five characters minimum)'}</span>
|
<span class="form_info">{l s='(Five characters minimum)'}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockcart/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockuserinfo/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktags/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocksearch/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocknewsletter/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockwishlist/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/productcomments/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/crossselling/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktopmenu/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);html{min-height:100%}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,blockquote,th,td{margin:0;padding:0}del,ins{text-decoration:none}caption,th{text-align:left}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}ul,ol{list-style-type:none}a{cursor:pointer}a:hover{text-decoration:none}@media only screen and (min-width:1200px){.container{padding-left:0;padding-right:0}}body{min-width:320px;height:100%;background:#333333;line-height:18px;font-size:13px}body.content_only{background:none}textarea{resize:none}#header{z-index:10}.columns-container{background:#fff}#columns{z-index:1;padding-bottom:50px}#center_column .page_product_box h3{color:#555454;text-transform:uppercase;font-family:"Open Sans",sans-serif;font-weight:600;font-size:18px;line-height:20px;padding:14px 20px 17px;margin:0 0 20px;position:relative;border:1px solid #d6d4d4;border-bottom:none;background:#fbfbfb}a,a:focus,a:active{text-decoration:none;outline:none}p.info-title{font-weight:bold;color:#333;margin-bottom:25px}p.info-account{margin:-4px 0 24px 0}.dark{color:#333}.main-page-indent{margin-bottom:30px}.alert{font-weight:bold}.alert ul,.alert ol{padding-left:15px;margin-left:27px}.alert ul li,.alert ol li{list-style-type:decimal;font-weight:normal}.alert.alert-success{text-shadow:1px 1px rgba(0,0,0,0.1)}.alert.alert-success:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px}.alert.alert-danger{text-shadow:1px 1px rgba(0,0,0,0.1)}.alert.alert-danger:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px;float:left}.required sup{color:#f13340;font-size:13px;font-weight:bold;top:0}.unvisible{display:none}label{color:#333}.checkbox{line-height:16px}.checkbox label{color:#777777}.close{opacity:1}.close:hover{opacity:1}input.button_mini,input.button_small,input.button,input.button_large,input.button_mini_disabled,input.button_small_disabled,input.button_disabled,input.button_large_disabled,input.exclusive_mini,input.exclusive_small,input.exclusive,input.exclusive_large,input.exclusive_mini_disabled,input.exclusive_small_disabled,input.exclusive_disabled,input.exclusive_large_disabled,a.button_mini,a.button_small,a.button,a.button_large,a.exclusive_mini,a.exclusive_small,a.exclusive,a.exclusive_large,span.button_mini,span.button_small,span.button,span.button_large,span.exclusive_mini,span.exclusive_small,span.exclusive,span.exclusive_large,span.exclusive_large_disabled{position:relative;displLine truncated
|
||||||
@@ -0,0 +1,435 @@
|
|||||||
|
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
|
||||||
|
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="stringLine truncated
|
||||||
|
/*!
|
||||||
|
* jQuery Migrate - v1.2.1 - 2013-05-08
|
||||||
|
* https://github.com/jquery/jquery-migrate
|
||||||
|
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
|
||||||
|
*/
|
||||||
|
(function(jQuery,window,undefined){jQuery.migrateMute=true;var warnedAbout={};jQuery.migrateWarnings=[];if(!jQuery.migrateMute&&window.console&&window.console.log){window.console.log("JQMIGRATE: Logging is active");}
|
||||||
|
if(jQuery.migrateTrace===undefined){jQuery.migrateTrace=true;}
|
||||||
|
jQuery.migrateReset=function(){warnedAbout={};jQuery.migrateWarnings.length=0;};function migrateWarn(msg){var console=window.console;if(!warnedAbout[msg]){warnedAbout[msg]=true;jQuery.migrateWarnings.push(msg);if(console&&console.warn&&!jQuery.migrateMute){console.warn("JQMIGRATE: "+msg);if(jQuery.migrateTrace&&console.trace){console.trace();}}}}
|
||||||
|
function migrateWarnProp(obj,prop,value,msg){if(Object.defineProperty){try{Object.defineProperty(obj,prop,{configurable:true,enumerable:true,get:function(){migrateWarn(msg);return value;},set:function(newValue){migrateWarn(msg);value=newValue;}});return;}catch(err){}}
|
||||||
|
jQuery._definePropertyBroken=true;obj[prop]=value;}
|
||||||
|
if(document.compatMode==="BackCompat"){migrateWarn("jQuery is not compatible with Quirks Mode");}
|
||||||
|
var attrFn=jQuery("<input/>",{size:1}).attr("size")&&jQuery.attrFn,oldAttr=jQuery.attr,valueAttrGet=jQuery.attrHooks.value&&jQuery.attrHooks.value.get||function(){return null;},valueAttrSet=jQuery.attrHooks.value&&jQuery.attrHooks.value.set||function(){return undefined;},rnoType=/^(?:input|button)$/i,rnoAttrNodeType=/^[238]$/,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ruseDefault=/^(?:checked|selected)$/i;migrateWarnProp(jQuery,"attrFn",attrFn||{},"jQuery.attrFn is deprecated");jQuery.attr=function(elem,name,value,pass){var lowerName=name.toLowerCase(),nType=elem&&elem.nodeType;if(pass){if(oldAttr.length<4){migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");}
|
||||||
|
if(elem&&!rnoAttrNodeType.test(nType)&&(attrFn?name in attrFn:jQuery.isFunction(jQuery.fn[name]))){return jQuery(elem)[name](value);}}
|
||||||
|
if(name==="type"&&value!==undefined&&rnoType.test(elem.nodeName)&&elem.parentNode){migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");}
|
||||||
|
if(!jQuery.attrHooks[lowerName]&&rboolean.test(lowerName)){jQuery.attrHooks[lowerName]={get:function(elem,name){var attrNode,property=jQuery.prop(elem,name);return property===true||typeof property!=="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==false?name.toLowerCase():undefined;},set:function(elem,value,name){var propName;if(value===false){jQuery.removeAttr(elem,name);}else{propName=jQuery.propFix[name]||name;if(propName in elem){elem[propName]=true;}
|
||||||
|
elem.setAttribute(name,name.toLowerCase());}
|
||||||
|
return name;}};if(ruseDefault.test(lowerName)){migrateWarn("jQuery.fn.attr('"+lowerName+"') may use property instead of attribute");}}
|
||||||
|
return oldAttr.call(jQuery,elem,name,value);};jQuery.attrHooks.value={get:function(elem,name){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrGet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value') no longer gets properties");}
|
||||||
|
return name in elem?elem.value:null;},set:function(elem,value){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrSet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");}
|
||||||
|
elem.value=value;}};var matched,browser,oldInit=jQuery.fn.init,oldParseJSON=jQuery.parseJSON,rquickExpr=/^([^<]*)(<[\w\W]+>)([^>]*)$/;jQuery.fn.init=function(selector,context,rootjQuery){var match;if(selector&&typeof selector==="string"&&!jQuery.isPlainObject(context)&&(match=rquickExpr.exec(jQuery.trim(selector)))&&match[0]){if(selector.charAt(0)!=="<"){migrateWarn("$(html) HTML strings must start with '<' character");}
|
||||||
|
if(match[3]){migrateWarn("$(html) HTML text after last tag is ignored");}
|
||||||
|
if(match[0].charAt(0)==="#"){migrateWarn("HTML string cannot start with a '#' character");jQuery.error("JQMIGRATE: Invalid selector string (XSS)");}
|
||||||
|
if(context&&context.context){context=context.context;}
|
||||||
|
if(jQuery.parseHTML){return oldInit.call(this,jQuery.parseHTML(match[2],context,true),context,rootjQuery);}}
|
||||||
|
return oldInit.apply(this,arguments);};jQuery.fn.init.prototype=jQuery.fn;jQuery.parseJSON=function(json){if(!json&&json!==null){migrateWarn("jQuery.parseJSON requires a valid JSON string");return null;}
|
||||||
|
return oldParseJSON.apply(this,arguments);};jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};};if(!jQuery.browser){matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;}
|
||||||
|
if(browser.chrome){browser.webkit=true;}else if(browser.webkit){browser.safari=true;}
|
||||||
|
jQuery.browser=browser;}
|
||||||
|
migrateWarnProp(jQuery,"browser",jQuery.browser,"jQuery.browser is deprecated");jQuery.sub=function(){function jQuerySub(selector,context){return new jQuerySub.fn.init(selector,context);}
|
||||||
|
jQuery.extend(true,jQuerySub,this);jQuerySub.superclass=this;jQuerySub.fn=jQuerySub.prototype=this();jQuerySub.fn.constructor=jQuerySub;jQuerySub.sub=this.sub;jQuerySub.fn.init=function init(selector,context){if(context&&context instanceof jQuery&&!(context instanceof jQuerySub)){context=jQuerySub(context);}
|
||||||
|
return jQuery.fn.init.call(this,selector,context,rootjQuerySub);};jQuerySub.fn.init.prototype=jQuerySub.fn;var rootjQuerySub=jQuerySub(document);migrateWarn("jQuery.sub() is deprecated");return jQuerySub;};jQuery.ajaxSetup({converters:{"text json":jQuery.parseJSON}});var oldFnData=jQuery.fn.data;jQuery.fn.data=function(name){var ret,evt,elem=this[0];if(elem&&name==="events"&&arguments.length===1){ret=jQuery.data(elem,name);evt=jQuery._data(elem,name);if((ret===undefined||ret===evt)&&evt!==undefined){migrateWarn("Use of jQuery.fn.data('events') is deprecated");return evt;}}
|
||||||
|
return oldFnData.apply(this,arguments);};var rscriptType=/\/(java|ecma)script/i,oldSelf=jQuery.fn.andSelf||jQuery.fn.addBack;jQuery.fn.andSelf=function(){migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");return oldSelf.apply(this,arguments);};if(!jQuery.clean){jQuery.clean=function(elems,context,fragment,scripts){context=context||document;context=!context.nodeType&&context[0]||context;context=context.ownerDocument||context;migrateWarn("jQuery.clean() is deprecated");var i,elem,handleScript,jsTags,ret=[];jQuery.merge(ret,jQuery.buildFragment(elems,context).childNodes);if(fragment){handleScript=function(elem){if(!elem.type||rscriptType.test(elem.type)){return scripts?scripts.push(elem.parentNode?elem.parentNode.removeChild(elem):elem):fragment.appendChild(elem);}};for(i=0;(elem=ret[i])!=null;i++){if(!(jQuery.nodeName(elem,"script")&&handleScript(elem))){fragment.appendChild(elem);if(typeof elem.getElementsByTagName!=="undefined"){jsTags=jQuery.grep(jQuery.merge([],elem.getElementsByTagName("script")),handleScript);ret.splice.apply(ret,[i+1,0].concat(jsTags));i+=jsTags.length;}}}}
|
||||||
|
return ret;};}
|
||||||
|
var eventAdd=jQuery.event.add,eventRemove=jQuery.event.remove,eventTrigger=jQuery.event.trigger,oldToggle=jQuery.fn.toggle,oldLive=jQuery.fn.live,oldDie=jQuery.fn.die,ajaxEvents="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",rajaxEvent=new RegExp("\\b(?:"+ajaxEvents+")\\b"),rhoverHack=/(?:^|\s)hover(\.\S+|)\b/,hoverHack=function(events){if(typeof(events)!=="string"||jQuery.event.special.hover){return events;}
|
||||||
|
if(rhoverHack.test(events)){migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");}
|
||||||
|
return events&&events.replace(rhoverHack,"mouseenter$1 mouseleave$1");};if(jQuery.event.props&&jQuery.event.props[0]!=="attrChange"){jQuery.event.props.unshift("attrChange","attrName","relatedNode","srcElement");}
|
||||||
|
if(jQuery.event.dispatch){migrateWarnProp(jQuery.event,"handle",jQuery.event.dispatch,"jQuery.event.handle is undocumented and deprecated");}
|
||||||
|
jQuery.event.add=function(elem,types,handler,data,selector){if(elem!==document&&rajaxEvent.test(types)){migrateWarn("AJAX events should be attached to document: "+types);}
|
||||||
|
eventAdd.call(this,elem,hoverHack(types||""),handler,data,selector);};jQuery.event.remove=function(elem,types,handler,selector,mappedTypes){eventRemove.call(this,elem,hoverHack(types)||"",handler,selector,mappedTypes);};jQuery.fn.error=function(){var args=Array.prototype.slice.call(arguments,0);migrateWarn("jQuery.fn.error() is deprecated");args.splice(0,0,"error");if(arguments.length){return this.bind.apply(this,args);}
|
||||||
|
this.triggerHandler.apply(this,args);return this;};jQuery.fn.toggle=function(fn,fn2){if(!jQuery.isFunction(fn)||!jQuery.isFunction(fn2)){return oldToggle.apply(this,arguments);}
|
||||||
|
migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");var args=arguments,guid=fn.guid||jQuery.guid++,i=0,toggler=function(event){var lastToggle=(jQuery._data(this,"lastToggle"+fn.guid)||0)%i;jQuery._data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;};toggler.guid=guid;while(i<args.length){args[i++].guid=guid;}
|
||||||
|
return this.click(toggler);};jQuery.fn.live=function(types,data,fn){migrateWarn("jQuery.fn.live() is deprecated");if(oldLive){return oldLive.apply(this,arguments);}
|
||||||
|
jQuery(this.context).on(types,this.selector,data,fn);return this;};jQuery.fn.die=function(types,fn){migrateWarn("jQuery.fn.die() is deprecated");if(oldDie){return oldDie.apply(this,arguments);}
|
||||||
|
jQuery(this.context).off(types,this.selector||"**",fn);return this;};jQuery.event.trigger=function(event,data,elem,onlyHandlers){if(!elem&&!rajaxEvent.test(event)){migrateWarn("Global events are undocumented and deprecated");}
|
||||||
|
return eventTrigger.call(this,event,data,elem||document,onlyHandlers);};jQuery.each(ajaxEvents.split("|"),function(_,name){jQuery.event.special[name]={setup:function(){var elem=this;if(elem!==document){jQuery.event.add(document,name+"."+jQuery.guid,function(){jQuery.event.trigger(name,null,elem,true);});jQuery._data(this,name,jQuery.guid++);}
|
||||||
|
return false;},teardown:function(){if(this!==document){jQuery.event.remove(document,name+"."+jQuery._data(this,name));}
|
||||||
|
return false;}};});})(jQuery,window);;jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;function formatedNumberToFloat(price,currencyFormat,currencySign)
|
||||||
|
{price=price.replace(currencySign,'');if(currencyFormat==1)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));else if(currencyFormat==2)
|
||||||
|
return parseFloat(price.replace(' ','').replace(',','.'));else if(currencyFormat==3)
|
||||||
|
return parseFloat(price.replace('.','').replace(' ','').replace(',','.'));else if(currencyFormat==4)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));return price;}
|
||||||
|
function formatNumber(value,numberOfDecimal,thousenSeparator,virgule)
|
||||||
|
{value=value.toFixed(numberOfDecimal);var val_string=value+'';var tmp=val_string.split('.');var abs_val_string=(tmp.length==2)?tmp[0]:val_string;var deci_string=('0.'+(tmp.length==2?tmp[1]:0)).substr(2);var nb=abs_val_string.length;for(var i=1;i<4;i++)
|
||||||
|
if(value>=Math.pow(10,(3*i)))
|
||||||
|
abs_val_string=abs_val_string.substring(0,nb-(3*i))+thousenSeparator+abs_val_string.substring(nb-(3*i));if(parseInt(numberOfDecimal)==0)
|
||||||
|
return abs_val_string;return abs_val_string+virgule+(deci_string>0?deci_string:'00');}
|
||||||
|
function formatCurrency(price,currencyFormat,currencySign,currencyBlank)
|
||||||
|
{blank='';price=parseFloat(price.toFixed(6));price=ps_round(price,priceDisplayPrecision);if(currencyBlank>0)
|
||||||
|
blank=' ';if(currencyFormat==1)
|
||||||
|
return currencySign+blank+formatNumber(price,priceDisplayPrecision,',','.');if(currencyFormat==2)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ',',')+blank+currencySign);if(currencyFormat==3)
|
||||||
|
return(currencySign+blank+formatNumber(price,priceDisplayPrecision,'.',','));if(currencyFormat==4)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,',','.')+blank+currencySign);if(currencyFormat==5)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ','.')+blank+currencySign);return price;}
|
||||||
|
function ps_round(value,precision)
|
||||||
|
{if(typeof(roundMode)=='undefined')
|
||||||
|
roundMode=2;if(typeof(precision)=='undefined')
|
||||||
|
precision=2;method=roundMode;if(method==0)
|
||||||
|
return ceilf(value,precision);else if(method==1)
|
||||||
|
return floorf(value,precision);precisionFactor=precision==0?1:Math.pow(10,precision);return Math.round(value*precisionFactor)/precisionFactor;}
|
||||||
|
function autoUrl(name,dest)
|
||||||
|
{var loc;var id_list;id_list=document.getElementById(name);loc=id_list.options[id_list.selectedIndex].value;if(loc!=0)
|
||||||
|
location.href=dest+loc;return;}
|
||||||
|
function autoUrlNoList(name,dest)
|
||||||
|
{var loc;loc=document.getElementById(name).checked;location.href=dest+(loc==true?1:0);return;}
|
||||||
|
function toggle(e,show)
|
||||||
|
{e.style.display=show?'':'none';}
|
||||||
|
function toggleMultiple(tab)
|
||||||
|
{var len=tab.length;for(var i=0;i<len;i++)
|
||||||
|
if(tab[i].style)
|
||||||
|
toggle(tab[i],tab[i].style.display=='none');}
|
||||||
|
function showElemFromSelect(select_id,elem_id)
|
||||||
|
{var select=document.getElementById(select_id);for(var i=0;i<select.length;++i)
|
||||||
|
{var elem=document.getElementById(elem_id+select.options[i].value);if(elem!=null)
|
||||||
|
toggle(elem,i==select.selectedIndex);}}
|
||||||
|
function openCloseAllDiv(name,option)
|
||||||
|
{var tab=$('*[name='+name+']');for(var i=0;i<tab.length;++i)
|
||||||
|
toggle(tab[i],option);}
|
||||||
|
function toggleElemValue(id_button,text1,text2)
|
||||||
|
{var obj=document.getElementById(id_button);if(obj)
|
||||||
|
obj.value=((!obj.value||obj.value==text2)?text1:text2);}
|
||||||
|
function addBookmark(url,title)
|
||||||
|
{if(window.sidebar)
|
||||||
|
return window.sidebar.addPanel(title,url,"");else if(window.external&&('AddFavorite'in window.external))
|
||||||
|
return window.external.AddFavorite(url,title);else if(window.opera&&window.print)
|
||||||
|
return true;return true;}
|
||||||
|
function writeBookmarkLink(url,title,text,img)
|
||||||
|
{var insert='';if(img)
|
||||||
|
insert=writeBookmarkLinkObject(url,title,'<img src="'+img+'" alt="'+escape(text)+'" title="'+removeQuotes(text)+'" />')+' ';insert+=writeBookmarkLinkObject(url,title,text);if(window.sidebar||window.opera&&window.print||(window.external&&('AddFavorite'in window.external)))
|
||||||
|
document.write(insert);}
|
||||||
|
function writeBookmarkLinkObject(url,title,insert)
|
||||||
|
{if(window.sidebar||window.external)
|
||||||
|
return('<a href="javascript:addBookmark(\''+escape(url)+'\', \''+removeQuotes(title)+'\')">'+insert+'</a>');else if(window.opera&&window.print)
|
||||||
|
return('<a rel="sidebar" href="'+escape(url)+'" title="'+removeQuotes(title)+'">'+insert+'</a>');return('');}
|
||||||
|
function checkCustomizations()
|
||||||
|
{var pattern=new RegExp(' ?filled ?');if(typeof customizationFields!='undefined')
|
||||||
|
for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{if(parseInt(customizationFields[i][1])==1&&($('#'+customizationFields[i][0]).html()==''||$('#'+customizationFields[i][0]).text()!=$('#'+customizationFields[i][0]).val())&&!pattern.test($('#'+customizationFields[i][0]).attr('class')))
|
||||||
|
return false;}
|
||||||
|
return true;}
|
||||||
|
function emptyCustomizations()
|
||||||
|
{if(typeof(customizationFields)=='undefined')return;$('.customization_block .success').fadeOut(function(){$(this).remove();});$('.customization_block .error').fadeOut(function(){$(this).remove();});for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{$('#'+customizationFields[i][0]).html('');$('#'+customizationFields[i][0]).val('');}}
|
||||||
|
function ceilf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.ceil(tmp)/precisionFactor;}
|
||||||
|
function floorf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.floor(tmp)/precisionFactor;}
|
||||||
|
function setCurrency(id_currency)
|
||||||
|
{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'index.php'+'?rand='+new Date().getTime(),data:'controller=change-currency&id_currency='+parseInt(id_currency),success:function(msg)
|
||||||
|
{location.reload(true);}});}
|
||||||
|
function isArrowKey(k_ev)
|
||||||
|
{var unicode=k_ev.keyCode?k_ev.keyCode:k_ev.charCode;if(unicode>=37&&unicode<=40)
|
||||||
|
return true;return false;}
|
||||||
|
function removeQuotes(value)
|
||||||
|
{value=value.replace(/\\"/g,'');value=value.replace(/"/g,'');value=value.replace(/\\'/g,'');value=value.replace(/'/g,'');return value;}
|
||||||
|
function sprintf(format)
|
||||||
|
{for(var i=1;i<arguments.length;i++)
|
||||||
|
format=format.replace(/%s/,arguments[i]);return format;}
|
||||||
|
function fancyMsgBox(msg,title)
|
||||||
|
{if(title)msg="<h2>"+title+"</h2><p>"+msg+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\"><input class=\"button\" type=\"button\" value=\"OK\" onclick=\"$.fancybox.close();\" /></p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
function fancyChooseBox(question,title,buttons,otherParams)
|
||||||
|
{var msg,funcName,action;if(title)msg="<h2>"+title+"</h2><p>"+question+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\">";var i=0;for(var caption in buttons){if(!buttons.hasOwnProperty(caption))continue;funcName=buttons[caption];if(typeof otherParams=='undefined')otherParams=0;otherParams=escape(JSON.stringify(otherParams));action=funcName?"$.fancybox.close();window['"+funcName+"'](JSON.parse(unescape('"+otherParams+"')), "+i+")":"$.fancybox.close()";msg+='<input class="button" style="margin-right: 5px" type="button" value="'+caption+'" onclick="'+action+'" />';i++;}
|
||||||
|
msg+="</p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
$().ready(function()
|
||||||
|
{$('form').submit(function()
|
||||||
|
{$(this).find('.hideOnSubmit').hide();});$('a._blank').attr('target','_blank');});;
|
||||||
|
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||||
|
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
||||||
|
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(Line truncated
|
||||||
|
$(document).ready(function(){quick_view();});;function openBranch(jQueryElement,noAnimation){jQueryElement.addClass('OPEN').removeClass('CLOSE');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').show();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideDown();}
|
||||||
|
function closeBranch(jQueryElement,noAnimation){jQueryElement.addClass('CLOSE').removeClass('OPEN');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').hide();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideUp();}
|
||||||
|
function toggleBranch(jQueryElement,noAnimation){if(jQueryElement.hasClass('OPEN'))
|
||||||
|
closeBranch(jQueryElement,noAnimation);else
|
||||||
|
openBranch(jQueryElement,noAnimation);}
|
||||||
|
$(document).ready(function(){if(!$('ul.tree.dhtml').hasClass('dynamized'))
|
||||||
|
{$('ul.tree.dhtml ul').prev().before("<span class='grower OPEN'> </span>");$('ul.tree.dhtml ul li:last-child, ul.tree.dhtml li:last-child').addClass('last');$('ul.tree.dhtml span.grower.OPEN').addClass('CLOSE').removeClass('OPEN').parent().find('ul:first').hide();$('ul.tree.dhtml').show();$('ul.tree.dhtml .selected').parents().each(function(){if($(this).is('ul'))
|
||||||
|
toggleBranch($(this).prev().prev(),true);});toggleBranch($('ul.tree.dhtml .selected').prev(),true);$('ul.tree.dhtml span.grower').click(function(){toggleBranch($(this));});$('ul.tree.dhtml').addClass('dynamized');$('ul.tree.dhtml').removeClass('dhtml');}});;function PS_SE_HandleEvent()
|
||||||
|
{$(document).ready(function(){$('#id_country').change(function(){resetAjaxQueries();updateStateByIdCountry();});if(SE_RefreshMethod==0)
|
||||||
|
{$('#id_state').change(function(){resetAjaxQueries();updateCarriersList();});$('#zipcode').bind('keyup',function(e){if(e.keyCode=='13')
|
||||||
|
{resetAjaxQueries();updateCarriersList();}});}
|
||||||
|
$('#update_carriers_list').click(function(){updateCarriersList();});$('#carriercompare_submit').click(function(){resetAjaxQueries();saveSelection();return false;});updateStateByIdCountry();});}
|
||||||
|
function displayWaitingAjax(type,message)
|
||||||
|
{$('#SE_AjaxDisplay').find('p').html(message);$('#SE_AjaxDisplay').css('display',type);}
|
||||||
|
function updateStateByIdCountry()
|
||||||
|
{$('#id_state').children().remove();$('#availableCarriers').slideUp('fast');$('#states').slideUp('fast');displayWaitingAjax('block',SE_RefreshStateTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getStates&id_country='+$('#id_country').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(state in json)
|
||||||
|
{$('#id_state').append('<option value=\''+json[state].id_state+'\' '+(id_state==json[state].id_state?'selected="selected"':'')+'>'+json[state].name+'</option>');}
|
||||||
|
$('#states').slideDown('fast');}
|
||||||
|
if(SE_RefreshMethod==0)
|
||||||
|
updateCarriersList();displayWaitingAjax('none','');}});ajaxQueries.push(query);}
|
||||||
|
function updateCarriersList()
|
||||||
|
{$('#carriercompare_errors_list').children().remove();$('#availableCarriers').slideUp('normal',function(){$(this).find(('tbody')).children().remove();$('#noCarrier').slideUp('fast');displayWaitingAjax('block',SE_RetrievingInfoTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getCarriers&id_country='+$('#id_country').val()+'&id_state='+$('#id_state').val()+'&zipcode='+$('#zipcode').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(carrier in json)
|
||||||
|
{var html='<tr class="'+(carrier%2?'alternate_':'')+'item">'+'<td class="carrier_action">'+'<input type="radio" name="id_carrier" value="'+json[carrier].id_carrier+'" id="id_carrier'+json[carrier].id_carrier+'" '+(id_carrier==json[carrier].id_carrier?'checked="checked"':'')+'/>'+'</td>'+'<td class="carrier_name">'+'<label for="id_carrier'+json[carrier].id_carrier+'">'+
|
||||||
|
(json[carrier].img?'<img src="'+json[carrier].img+'" alt="'+json[carrier].name+'" />':json[carrier].name)+'</label>'+'</td>'+'<td class="carrier_infos">'+((json[carrier].delay!=null)?json[carrier].delay:'')+'</td>'+'<td class="carrier_price">';if(json[carrier].price)
|
||||||
|
{html+='<span class="price">'+(displayPrice==1?formatCurrency(json[carrier].price_tax_exc,currencyFormat,currencySign,currencyBlank):formatCurrency(json[carrier].price,currencyFormat,currencySign,currencyBlank))+'</span>';}
|
||||||
|
else
|
||||||
|
{html+=txtFree;}
|
||||||
|
html+='</td>'+'</tr>';$('#carriers_list').append(html);}
|
||||||
|
displayWaitingAjax('none','');$('#availableCarriers').slideDown();}
|
||||||
|
else
|
||||||
|
{displayWaitingAjax('none','');$('#noCarrier').slideDown();}}});ajaxQueries.push(query);});}
|
||||||
|
function saveSelection()
|
||||||
|
{$('#carriercompare_errors').slideUp();$('#carriercompare_errors_list').children().remove();displayWaitingAjax('block',SE_RedirectTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=saveSelection&'+$('#compare_shipping_form').serialize(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(error in json)
|
||||||
|
$('#carriercompare_errors_list').append('<li>'+json[error]+'</li>');$('#carriercompare_errors').slideDown();displayWaitingAjax('none','');}
|
||||||
|
else
|
||||||
|
{$('.SE_SubmitRefreshCard').fadeOut('fast');location.reload(true);}}});ajaxQueries.push(query);return false;}
|
||||||
|
var ajaxQueries=new Array();function resetAjaxQueries()
|
||||||
|
{for(i=0;i<ajaxQueries.length;++i)
|
||||||
|
ajaxQueries[i].abort();ajaxQueries=new Array();};if(typeof baseUri==="undefined"&&typeof baseDir!=="undefined")
|
||||||
|
baseUri=baseDir;var ajaxCart={nb_total_products:0,overrideButtonsInThePage:function(){$('.ajax_add_to_cart_button').unbind('click').click(function(){var idProduct=$(this).attr('rel').replace('nofollow','').replace('ajax_id_product_','');if($(this).attr('disabled')!='disabled')
|
||||||
|
ajaxCart.add(idProduct,null,false,this);return false;});$('#add_to_cart button').unbind('click').click(function(){ajaxCart.add($('#product_page_product_id').val(),$('#idCombination').val(),true,null,$('#quantity_wanted').val(),null);return false;});$('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){var customizationId=0;var productId=0;var productAttributeId=0;var customizableProductDiv=$($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]");if(customizableProductDiv&&$(customizableProductDiv).length)
|
||||||
|
{$(customizableProductDiv).each(function(){var ids=$(this).attr('id').split('_');if(typeof(ids[1])!='undefined')
|
||||||
|
{customizationId=parseInt(ids[1]);productId=parseInt(ids[2]);if(typeof(ids[3])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[3]);return false;}});}
|
||||||
|
if(!customizationId)
|
||||||
|
{var firstCut=$(this).parent().parent().attr('id').replace('cart_block_product_','');firstCut=firstCut.replace('deleteCustomizableProduct_','');ids=firstCut.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[1]);}
|
||||||
|
var idAddressDelivery=$(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1];ajaxCart.remove(productId,productAttributeId,customizationId,idAddressDelivery);return false;});},expand:function(){if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
{$('#cart_block_summary').slideUp(200,function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_list').slideDown({duration:450,complete:function(){$(this).addClass('expanded').removeClass('collapsed');}});});$('#block_cart_expand').fadeOut('slow',function(){$('#block_cart_collapse').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=expand'});}},refresh:function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&ajax=true&token='+static_token,success:function(jsonData)
|
||||||
|
{ajaxCart.updateCart(jsonData);}});},collapse:function(){if($('#cart_block_list').hasClass('expanded'))
|
||||||
|
{$('#cart_block_list').slideUp('slow',function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_summary').slideDown(450,function(){$(this).addClass('expanded').removeClass('collapsed');});});$('#block_cart_collapse').fadeOut('slow',function(){$('#block_cart_expand').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=collapse'+'&rand='+new Date().getTime()});}},updateCartInformation:function(jsonData,addedFromProductPage)
|
||||||
|
{ajaxCart.updateCart(jsonData);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$('.ajax_add_to_cart_button').removeAttr('disabled');},add:function(idProduct,idCombination,addedFromProductPage,callerElement,quantity,whishlist){if(addedFromProductPage&&!checkCustomizations())
|
||||||
|
{alert(fieldRequired);return;}
|
||||||
|
emptyCustomizations();if(addedFromProductPage)
|
||||||
|
{$('#add_to_cart button').attr('disabled',true).addClass('disabled');$('.filled').removeClass('filled');}
|
||||||
|
else
|
||||||
|
$(callerElement).attr('disabled',true);if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
this.expand();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&add=1&ajax=true&qty='+((quantity&&quantity!=null)?quantity:'1')+'&id_product='+idProduct+'&token='+static_token+((parseInt(idCombination)&&idCombination!=null)?'&ipa='+parseInt(idCombination):''),success:function(jsonData,textStatus,jqXHR)
|
||||||
|
{if(whishlist&&!jsonData.errors)
|
||||||
|
WishlistAddProductCart(whishlist[0],idProduct,idCombination,whishlist[1]);var $element=$(callerElement).parents('.ajax_block_product').find('a.product_image img,a.product_img_link img');if(!$element.length)
|
||||||
|
$element=$('#bigpic');var $picture=$element.clone();var pictureOffsetOriginal=$element.offset();pictureOffsetOriginal.right=$(window).innerWidth()-pictureOffsetOriginal.left-$element.width();if($picture.length)
|
||||||
|
{$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right});}
|
||||||
|
if(typeof(contentOnly)!='undefined'){var $contentOnly=contentOnly;}
|
||||||
|
var pictureOffset=$picture.offset();if(($contentOnly&&$contentOnly!=true)||!$contentOnly){var cartBlock=$('#cart_block');if(!$('#cart_block')[0]||!$('#cart_block').offset().top||!$('#cart_block').offset().left)
|
||||||
|
cartBlock=$('#shopping_cart');var cartBlockOffset=cartBlock.offset();cartBlockOffset.right=$(window).innerWidth()-cartBlockOffset.left-cartBlock.width();}
|
||||||
|
if(cartBlockOffset!=undefined&&$picture.length&&(($contentOnly&&$contentOnly!=true)||!$contentOnly))
|
||||||
|
{$picture.appendTo('body');$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right,zIndex:4242}).animate({width:$element.attr('width')*0.66,height:$element.attr('height')*0.66,opacity:0.2,top:cartBlockOffset.top+30,right:cartBlockOffset.right+15},1000).fadeOut(100,function(){ajaxCart.updateCartInformation(jsonData,addedFromProductPage);$(this).remove();if(!jsonData.hasError)
|
||||||
|
{$('.crossseling').html(jsonData.crossSelling)
|
||||||
|
$(jsonData.products).each(function(){if(this.id!=undefined&&this.id==parseInt(idProduct))
|
||||||
|
ajaxCart.updateLayer(this);});}});}
|
||||||
|
else if($contentOnly&&$contentOnly!=false){window.parent.ajaxCart.updateCartInformation(jsonData,addedFromProductPage);ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}
|
||||||
|
else{ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}},error:function(XMLHttpRequest,textStatus,errorThrown)
|
||||||
|
{alert("Impossible to add the product to the cart.\n\ntextStatus: '"+textStatus+"'\nerrorThrown: '"+errorThrown+"'\nresponseText:\n"+XMLHttpRequest.responseText);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$(callerElement).removeAttr('disabled');}});},remove:function(idProduct,idCombination,customizationId,idAddressDelivery){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&delete=1&id_product='+idProduct+'&ipa='+((idCombination!=null&&parseInt(idCombination))?idCombination:'')+((customizationId&&customizationId!=null)?'&id_customization='+customizationId:'')+'&id_address_delivery='+idAddressDelivery+'&token='+static_token+'&ajax=true',success:function(jsonData){ajaxCart.updateCart(jsonData);if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery);},error:function(){alert('ERROR: unable to delete the product');}});},hideOldProducts:function(jsonData){if($('#cart_block_list dl.products').length>0)
|
||||||
|
{var removedProductId=null;var removedProductData=null;var removedProductDomId=null;$('#cart_block_list dl.products dt').each(function(){var domIdProduct=$(this).attr('id');var firstCut=domIdProduct.replace('cart_block_product_','');var ids=firstCut.split('_');var stayInTheCart=false;for(aProduct in jsonData.products)
|
||||||
|
{if(jsonData.products[aProduct]['id']==ids[0]&&(!ids[1]||jsonData.products[aProduct]['idCombination']==ids[1]))
|
||||||
|
{stayInTheCart=true;ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct],domIdProduct);}}
|
||||||
|
if(!stayInTheCart)
|
||||||
|
{removedProductId=$(this).attr('id');if(removedProductId!=null)
|
||||||
|
{var firstCut=removedProductId.replace('cart_block_product_','');var ids=firstCut.split('_');$('#'+removedProductId).addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow',function(){$(this).remove();if($('#cart_block dl.products dt').length==0)
|
||||||
|
{$("#cart_block").stop(true,true).slideUp(200);$('#cart_block_no_products:hidden').slideDown(450);$('#cart_block dl.products').remove();}});});$('#cart_block_combination_of_'+ids[0]+(ids[1]?'_'+ids[1]:'')+(ids[2]?'_'+ids[2]:'')).fadeTo('fast',0,function(){$(this).slideUp('fast',function(){$(this).remove();});});}}});}},hideOldProductCustomizations:function(product,domIdProduct)
|
||||||
|
{var customizationList=$('#customization_'+product['id']+'_'+product['idCombination']);if(customizationList.length>0)
|
||||||
|
{$(customizationList).find("li").each(function(){$(this).find("div").each(function(){var customizationDiv=$(this).attr('id');var tmp=customizationDiv.replace('deleteCustomizableProduct_','');var ids=tmp.split('_');if((parseInt(product.idCombination)==parseInt(ids[2]))&&!ajaxCart.doesCustomizationStillExist(product,ids[0]))
|
||||||
|
$('#'+customizationDiv).parent().addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow');$(this).remove();});});});}
|
||||||
|
var removeLinks=$('#'+domIdProduct).find('.ajax_cart_block_remove_link');if(!product.hasCustomizedDatas&&!removeLinks.length)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="'+baseUri+'?controller=cart&delete=1&id_product='+product['id']+'&ipa='+product['idCombination']+'&token='+static_token+'"> </a>');if(product.is_gift)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('');},doesCustomizationStillExist:function(product,customizationId)
|
||||||
|
{var exists=false;$(product.customizedDatas).each(function(){if(this.customizationId==customizationId)
|
||||||
|
{exists=true;return false;}});return(exists);},refreshVouchers:function(jsonData){if(typeof(jsonData.discounts)=='undefined'||jsonData.discounts.length==0)
|
||||||
|
$('#vouchers').hide();else
|
||||||
|
{$('#vouchers tbody').html('');for(i=0;i<jsonData.discounts.length;i++)
|
||||||
|
{if(parseFloat(jsonData.discounts[i].price_float)>0)
|
||||||
|
{var delete_link='';if(jsonData.discounts[i].code.length)
|
||||||
|
delete_link='<a class="delete_voucher" href="'+jsonData.discounts[i].link+'" title="'+delete_txt+'"><i class="icon-remove-sign"></i></a>';$('#vouchers tbody').append($('<tr class="bloc_cart_voucher" id="bloc_cart_voucher_'+jsonData.discounts[i].id+'">'
|
||||||
|
+' <td class="quantity">1x</td>'
|
||||||
|
+' <td class="name" title="'+jsonData.discounts[i].description+'">'+jsonData.discounts[i].name+'</td>'
|
||||||
|
+' <td class="price">-'+jsonData.discounts[i].price+'</td>'
|
||||||
|
+' <td class="delete">'+delete_link+'</td>'
|
||||||
|
+'</tr>'));}}
|
||||||
|
$('#vouchers').show();}},updateProductQuantity:function(product,quantity){$('#cart_block_product_'+product.id+'_'+(product.idCombination?product.idCombination:'0')+'_'+(product.idAddressDelivery?product.idAddressDelivery:'0')+' .quantity').fadeTo('fast',0,function(){$(this).text(quantity);$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1);});});});});});},displayNewProducts:function(jsonData){$(jsonData.products).each(function(){if(this.id!=undefined)
|
||||||
|
{if($('#cart_block dl.products').length==0)
|
||||||
|
{$('#cart_block_no_products').before('<dl class="products"></dl>');$('#cart_block_no_products').hide();}
|
||||||
|
var domIdProduct=this.id+'_'+(this.idCombination?this.idCombination:'0')+'_'+(this.idAddressDelivery?this.idAddressDelivery:'0');var domIdProductAttribute=this.id+'_'+(this.idCombination?this.idCombination:'0');if($('#cart_block_product_'+domIdProduct).length==0)
|
||||||
|
{var productId=parseInt(this.id);var productAttributeId=(this.hasAttributes?parseInt(this.attributes):0);var content='<dt class="unvisible" id="cart_block_product_'+domIdProduct+'">';content+='<a class="cart-images" href="'+this.link+'" title="'+this.name.substring(0,12)+'"><img src="'+this.image_cart+'" alt="'+this.name+'"></a>';var min=this.name.indexOf(';',10);var name=(this.name.length>12?this.name.substring(0,((min-10)<=7)?min:10)+'...':this.name);content+='<div class="cart-info"><div class="product-name"><a href="'+this.link+'" title="'+this.name+'" class="cart_block_product_name">'+name+'</a></div>';if(this.hasAttributes)
|
||||||
|
content+='<div class="product-atributes"><a href="'+this.link+'" title="'+this.name+'">'+this.attributes+'</a></div>';content+='<span class="quantity-formated"><span class="quantity">'+this.quantity+'</span>x </span>';if(typeof(freeProductTranslation)!='undefined')
|
||||||
|
content+='<span class="price">'+(parseFloat(this.price_float)>0?this.priceByLine:freeProductTranslation)+'</span></div>';if(typeof(this.is_gift)=='undefined'||this.is_gift==0)
|
||||||
|
content+='<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&token='+static_token+(this.hasAttributes?'&ipa='+parseInt(this.idCombination):'')+'"> </a></span>';else
|
||||||
|
content+='<span class="remove_link"></span>';content+='</dt>';if(this.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+domIdProduct+'" class="unvisible">';if(this.hasCustomizedDatas)
|
||||||
|
content+=ajaxCart.displayNewCustomizedDatas(this);if(this.hasAttributes)content+='</dd>';$('#cart_block dl.products').append(content);}
|
||||||
|
else
|
||||||
|
{var jsonProduct=this;if($.trim($('#cart_block_product_'+domIdProduct+' .quantity').html())!=jsonProduct.quantity||$.trim($('#cart_block_product_'+domIdProduct+' .price').html())!=jsonProduct.priceByLine)
|
||||||
|
{if(!this.is_gift)
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').text(jsonProduct.priceByLine);else
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').html(freeProductTranslation);ajaxCart.updateProductQuantity(jsonProduct,jsonProduct.quantity);if(jsonProduct.hasCustomizedDatas)
|
||||||
|
{customizationFormatedDatas=ajaxCart.displayNewCustomizedDatas(jsonProduct);if(!$('#customization_'+domIdProductAttribute).length)
|
||||||
|
{if(jsonProduct.hasAttributes)
|
||||||
|
$('#cart_block_combination_of_'+domIdProduct).append(customizationFormatedDatas);else
|
||||||
|
$('#cart_block dl.products').append(customizationFormatedDatas);}
|
||||||
|
else
|
||||||
|
{$('#customization_'+domIdProductAttribute).html('');$('#customization_'+domIdProductAttribute).append(customizationFormatedDatas);}}}}
|
||||||
|
$('#cart_block dl.products .unvisible').slideDown(450).removeClass('unvisible');var removeLinks=$('#cart_block_product_'+domIdProduct).find('a.ajax_cart_block_remove_link');if(this.hasCustomizedDatas&&removeLinks.length)
|
||||||
|
$(removeLinks).each(function(){$(this).remove();});}});},displayNewCustomizedDatas:function(product)
|
||||||
|
{var content='';var productId=parseInt(product.id);var productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);var hasAlreadyCustomizations=$('#customization_'+productId+'_'+productAttributeId).length;if(!hasAlreadyCustomizations)
|
||||||
|
{if(!product.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+productId+'" class="unvisible">';if($('#customization_'+productId+'_'+productAttributeId).val()==undefined)
|
||||||
|
content+='<ul class="cart_block_customizations" id="customization_'+productId+'_'+productAttributeId+'">';}
|
||||||
|
$(product.customizedDatas).each(function()
|
||||||
|
{var done=0;customizationId=parseInt(this.customizationId);productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);content+='<li name="customization"><div class="deleteCustomizableProduct" id="deleteCustomizableProduct_'+customizationId+'_'+productId+'_'+(productAttributeId?productAttributeId:'0')+'"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&ipa='+productAttributeId+'&id_customization='+customizationId+'&token='+static_token+'"></a></div><span class="quantity-formated"><span class="quantity">'+parseInt(this.quantity)+'</span>x</span>';$(this.datas).each(function(){if(this['type']==CUSTOMIZE_TEXTFIELD)
|
||||||
|
{$(this.datas).each(function(){if(this['index']==0)
|
||||||
|
{content+=' '+this.truncatedValue.replace(/<br \/>/g,' ');done=1;return false;}})}});if(!done)
|
||||||
|
content+=customizationIdMessage+customizationId;if(!hasAlreadyCustomizations)content+='</li>';if(customizationId)
|
||||||
|
{$('#uploadable_files li div.customizationUploadBrowse img').remove();$('#text_fields input').attr('value','');}});if(!hasAlreadyCustomizations)
|
||||||
|
{content+='</ul>';if(!product.hasAttributes)content+='</dd>';}
|
||||||
|
return(content);},updateLayer:function(product){$('#layer_cart_product_title').text(product.name);$('#layer_cart_product_attributes').text('');if(product.hasAttributes&&product.hasAttributes==true)
|
||||||
|
$('#layer_cart_product_attributes').html(product.attributes);$('#layer_cart_product_price').text(product.price);$('#layer_cart_product_quantity').text(product.quantity);$('.layer_cart_img').prop({'src':product.image,'alt':product.name,'title':product.name});var h=parseInt($(window).height());var s=parseInt($(window).scrollTop());var t=$('#layer_cart').outerHeight(true);if(t<h)
|
||||||
|
var n=parseInt(((h-t)/2)+s)+'px';$('.layer_cart_overlay').css('width','100%');$('.layer_cart_overlay').css('height','100%');$('.layer_cart_overlay').show();$('#layer_cart').css({'top':n}).fadeIn('fast');crossselling_serialScroll();},updateCart:function(jsonData){if(jsonData.hasError)
|
||||||
|
{var errors='';for(error in jsonData.errors)
|
||||||
|
if(error!='indexOf')
|
||||||
|
errors+=$('<div />').html(jsonData.errors[error]).text()+"\n";alert(errors);}
|
||||||
|
else
|
||||||
|
{ajaxCart.updateCartEverywhere(jsonData);ajaxCart.hideOldProducts(jsonData);ajaxCart.displayNewProducts(jsonData);ajaxCart.refreshVouchers(jsonData);$('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item');$('#cart_block .products dt:first').addClass('first_item');$('#cart_block .products dt:not(:first,:last)').addClass('item');$('#cart_block .products dt:last').addClass('last_item');ajaxCart.overrideButtonsInThePage();}},updateCartEverywhere:function(jsonData){$('.ajax_cart_total').text($.trim(jsonData.productTotal));if(parseFloat(jsonData.shippingCostFloat)>0||jsonData.nbTotalProducts<1)
|
||||||
|
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);else if(typeof(freeShippingTranslation)!='undefined')
|
||||||
|
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);$('.ajax_cart_tax_cost').text(jsonData.taxCost);$('.cart_block_wrapping_cost').text(jsonData.wrappingCost);$('.ajax_block_cart_total').text(jsonData.total);$('.ajax_block_products_total').text(jsonData.productTotal);$('.ajax_total_price_wt').text(jsonData.total_price_wt);if(parseFloat(jsonData.freeShippingFloat)>0)
|
||||||
|
{$('.ajax_cart_free_shipping').html(jsonData.freeShipping);$('.freeshipping').fadeIn(0);}
|
||||||
|
else if(parseFloat(jsonData.freeShippingFloat)==0)
|
||||||
|
$('.freeshipping').fadeOut(0);this.nb_total_products=jsonData.nbTotalProducts;if(parseInt(jsonData.nbTotalProducts)>0)
|
||||||
|
{$('.ajax_cart_no_product').hide();$('.ajax_cart_quantity').text(jsonData.nbTotalProducts);$('.ajax_cart_quantity').fadeIn('slow');$('.ajax_cart_total').fadeIn('slow');if(parseInt(jsonData.nbTotalProducts)>1)
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).hide();});$('.ajax_cart_product_txt_s').each(function(){$(this).show();});}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).show();});$('.ajax_cart_product_txt_s').each(function(){$(this).hide();});}}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){$(this).hide();});$('.ajax_cart_no_product').show('slow');}}};$(document).ready(function()
|
||||||
|
{$('#block_cart_collapse').click(function(){ajaxCart.collapse();});$('#block_cart_expand').click(function(){ajaxCart.expand();});ajaxCart.overrideButtonsInThePage();var cart_qty=0;var current_timestamp=parseInt(new Date().getTime()/1000);if(typeof $('.ajax_cart_quantity').html()=='undefined'||(typeof generated_date!='undefined'&&generated_date!=null&&(parseInt(generated_date)+30)<current_timestamp))
|
||||||
|
ajaxCart.refresh();else
|
||||||
|
cart_qty=parseInt($('.ajax_cart_quantity').html());var cart_block=new HoverWatcher('#cart_block');var shopping_cart=new HoverWatcher('#shopping_cart');$("#shopping_cart a:first").hover(function(){if(ajaxCart.nb_total_products>0||cart_qty>0)
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideDown(450);},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver()&&!cart_block.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$("#header_right #cart_block").hover(function(){},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$('.delete_voucher').live('click',function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},async:true,cache:false,url:$(this).attr('href')+'?rand='+new Date().getTime()});$(this).parent().parent().remove();if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
{if(typeof(updateAddressSelection)!='undefined')
|
||||||
|
updateAddressSelection();else
|
||||||
|
location.reload();}
|
||||||
|
return false;});$('#cart_navigation input').click(function(){$(this).attr('disabled',true).addClass('disabled');$(this).closest("form").get(0).submit();});$('#layer_cart .cross, #layer_cart .continue, .layer_cart_overlay').click(function(){$('.layer_cart_overlay').hide();$('#layer_cart').fadeOut('fast');return false;});});function HoverWatcher(selector){this.hovering=false;var self=this;this.isHoveringOver=function(){return self.hovering;}
|
||||||
|
$(selector).hover(function(){self.hovering=true;},function(){self.hovering=false;})}
|
||||||
|
function crossselling_serialScroll()
|
||||||
|
{$('#blockcart_caroucel').bxSlider({minSlides:2,maxSlides:4,slideWidth:178,slideMargin:20,moveSlides:1,infiniteLoop:false,hideControlOnEnd:true,pager:false});};;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);;;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);;;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(optioLine truncated
|
||||||
|
break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}
|
||||||
|
break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}
|
||||||
|
break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}
|
||||||
|
if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}
|
||||||
|
$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])
|
||||||
|
cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)
|
||||||
|
return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}
|
||||||
|
v+=options.multipleSeparator;}
|
||||||
|
$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}
|
||||||
|
function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}
|
||||||
|
var currentValue=$input.val();if(!skipPrevCheck&¤tValue==previousValue)
|
||||||
|
return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)
|
||||||
|
currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value){return[""];}
|
||||||
|
var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))
|
||||||
|
result[i]=$.trim(value);});return result;}
|
||||||
|
function lastWord(value){if(!options.multiple)
|
||||||
|
return value;var words=trimWords(value);return words[words.length-1];}
|
||||||
|
function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}
|
||||||
|
else
|
||||||
|
$input.val("");}});}
|
||||||
|
if(wasVisible)
|
||||||
|
$.Autocompleter.Selection(input,input.value.length,input.value.length);};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)
|
||||||
|
term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}
|
||||||
|
return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)
|
||||||
|
s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}
|
||||||
|
if(!data[q]){length++;}
|
||||||
|
data[q]=value;}
|
||||||
|
function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)
|
||||||
|
continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])
|
||||||
|
stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}
|
||||||
|
setTimeout(populate,25);function flush(){data={};length=0;}
|
||||||
|
return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)
|
||||||
|
return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}
|
||||||
|
return csub;}else
|
||||||
|
if(data[q]){return data[q];}else
|
||||||
|
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}
|
||||||
|
return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)
|
||||||
|
return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)
|
||||||
|
element.css("width",options.width);needsInit=false;}
|
||||||
|
function target(event){var element=event.target;while(element&&element.tagName!="LI")
|
||||||
|
element=element.parentNode;if(!element)
|
||||||
|
return[];return element;}
|
||||||
|
function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}
|
||||||
|
function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}
|
||||||
|
function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])
|
||||||
|
continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)
|
||||||
|
continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}
|
||||||
|
listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}
|
||||||
|
if($.fn.bgiframe)
|
||||||
|
list.bgiframe();}
|
||||||
|
return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
|
||||||
|
field.focus();};})(jQuery);;$('document').ready(function(){$('#favoriteproducts_block_extra_add').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_add').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_remove').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_remove').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_added').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_added').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_removed').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_removed').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});});;function WishlistCart(id,action,id_product,id_product_attribute,quantity)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,cache:false,data:'action='+action+'&id_product='+id_product+'&quantity='+quantity+'&token='+static_token+'&id_product_attribute='+id_product_attribute,success:function(data)
|
||||||
|
{if(action=='add')
|
||||||
|
{if(isLoggedWishlist==true){alert('Adedd to wishlist')}
|
||||||
|
else{alert('You must be logged in to manage your wishlist.')}}
|
||||||
|
if($('#'+id).length!=0)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}}});}
|
||||||
|
function WishlistChangeDefault(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,data:'id_wishlist='+id_wishlist+'&token='+static_token,cache:false,success:function(data)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}});}
|
||||||
|
function WishlistBuyProduct(token,id_product,id_product_attribute,id_quantity,button,ajax)
|
||||||
|
{if(ajax)
|
||||||
|
ajaxCart.add(id_product,id_product_attribute,false,button,1,[token,id_quantity]);else
|
||||||
|
{$('#'+id_quantity).val(0);WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].method='POST';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].action=baseUri+'?controller=cart';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].elements['token'].value=static_token;document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].submit();}
|
||||||
|
return(true);}
|
||||||
|
function WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
{if($('#'+id_quantity).val()<=0)
|
||||||
|
return(false);$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/buywishlistproduct.php',data:'token='+token+'&static_token='+static_token+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute,async:true,cache:false,success:function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
{$('#'+id_quantity).val($('#'+id_quantity).val()-1);}}});return(true);}
|
||||||
|
function WishlistManage(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'id_wishlist='+id_wishlist+'&refresh='+false,cache:false,success:function(data)
|
||||||
|
{$('#'+id).hide();document.getElementById(id).innerHTML=data;$('#'+id).fadeIn('slow');}});}
|
||||||
|
function WishlistProductManage(id,action,id_wishlist,id_product,id_product_attribute,quantity,priority)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'action='+action+'&id_wishlist='+id_wishlist+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute+'&quantity='+quantity+'&priority='+priority+'&refresh='+true,cache:false,success:function(data)
|
||||||
|
{if(action=='delete')
|
||||||
|
$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');else if(action=='update')
|
||||||
|
{$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');$('#wlp_'+id_product+'_'+id_product_attribute).fadeIn('fast');}}});}
|
||||||
|
function WishlistDelete(id,id_wishlist,msg)
|
||||||
|
{var res=confirm(msg);if(res==false)
|
||||||
|
return(false);$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/mywishlist.php',cache:false,data:'deleted&id_wishlist='+id_wishlist,success:function(data)
|
||||||
|
{$('#'+id).fadeOut('slow');}});}
|
||||||
|
function WishlistVisibility(bought_class,id_button)
|
||||||
|
{if($('#hide'+id_button).css('display')=='none')
|
||||||
|
{$('.'+bought_class).slideDown('fast');$('#show'+id_button).hide();$('#hide'+id_button).css('display','block');}
|
||||||
|
else
|
||||||
|
{$('.'+bought_class).slideUp('fast');$('#hide'+id_button).hide();$('#show'+id_button).css('display','block');}}
|
||||||
|
function WishlistSend(id,id_wishlist,id_email)
|
||||||
|
{$.post(baseDir+'modules/blockwishlist/sendwishlist.php',{token:static_token,id_wishlist:id_wishlist,email1:$('#'+id_email+'1').val(),email2:$('#'+id_email+'2').val(),email3:$('#'+id_email+'3').val(),email4:$('#'+id_email+'4').val(),email5:$('#'+id_email+'5').val(),email6:$('#'+id_email+'6').val(),email7:$('#'+id_email+'7').val(),email8:$('#'+id_email+'8').val(),email9:$('#'+id_email+'9').val(),email10:$('#'+id_email+'10').val()},function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
WishlistVisibility(id,'hideSendWishlist');});};$(document).ready(function(){$('#crossselling_list_car').bxSlider({minSlides:2,maxSlides:6,slideWidth:178,slideMargin:20,pager:false,nextText:'',prevText:'',moveSlides:1,infiniteLoop:false,hideControlOnEnd:true});});;$(document).ready(function(){$('#bxslider1').bxSlider({minSlides:2,maxSlides:6,slideWidth:178,slideMargin:20,pager:false,nextText:'',prevText:'',moveSlides:1,infiniteLoop:false,hideControlOnEnd:true});});;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
|
||||||
|
if(p==this){return false;}
|
||||||
|
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
|
||||||
|
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);;;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
|
||||||
|
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'fast',autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);jQuery(function(){jQuery('ul.sf-menu').superfish();});;
|
||||||
@@ -0,0 +1,700 @@
|
|||||||
|
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
|
||||||
|
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="stringLine truncated
|
||||||
|
/*!
|
||||||
|
* jQuery Migrate - v1.2.1 - 2013-05-08
|
||||||
|
* https://github.com/jquery/jquery-migrate
|
||||||
|
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
|
||||||
|
*/
|
||||||
|
(function(jQuery,window,undefined){jQuery.migrateMute=true;var warnedAbout={};jQuery.migrateWarnings=[];if(!jQuery.migrateMute&&window.console&&window.console.log){window.console.log("JQMIGRATE: Logging is active");}
|
||||||
|
if(jQuery.migrateTrace===undefined){jQuery.migrateTrace=true;}
|
||||||
|
jQuery.migrateReset=function(){warnedAbout={};jQuery.migrateWarnings.length=0;};function migrateWarn(msg){var console=window.console;if(!warnedAbout[msg]){warnedAbout[msg]=true;jQuery.migrateWarnings.push(msg);if(console&&console.warn&&!jQuery.migrateMute){console.warn("JQMIGRATE: "+msg);if(jQuery.migrateTrace&&console.trace){console.trace();}}}}
|
||||||
|
function migrateWarnProp(obj,prop,value,msg){if(Object.defineProperty){try{Object.defineProperty(obj,prop,{configurable:true,enumerable:true,get:function(){migrateWarn(msg);return value;},set:function(newValue){migrateWarn(msg);value=newValue;}});return;}catch(err){}}
|
||||||
|
jQuery._definePropertyBroken=true;obj[prop]=value;}
|
||||||
|
if(document.compatMode==="BackCompat"){migrateWarn("jQuery is not compatible with Quirks Mode");}
|
||||||
|
var attrFn=jQuery("<input/>",{size:1}).attr("size")&&jQuery.attrFn,oldAttr=jQuery.attr,valueAttrGet=jQuery.attrHooks.value&&jQuery.attrHooks.value.get||function(){return null;},valueAttrSet=jQuery.attrHooks.value&&jQuery.attrHooks.value.set||function(){return undefined;},rnoType=/^(?:input|button)$/i,rnoAttrNodeType=/^[238]$/,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ruseDefault=/^(?:checked|selected)$/i;migrateWarnProp(jQuery,"attrFn",attrFn||{},"jQuery.attrFn is deprecated");jQuery.attr=function(elem,name,value,pass){var lowerName=name.toLowerCase(),nType=elem&&elem.nodeType;if(pass){if(oldAttr.length<4){migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");}
|
||||||
|
if(elem&&!rnoAttrNodeType.test(nType)&&(attrFn?name in attrFn:jQuery.isFunction(jQuery.fn[name]))){return jQuery(elem)[name](value);}}
|
||||||
|
if(name==="type"&&value!==undefined&&rnoType.test(elem.nodeName)&&elem.parentNode){migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");}
|
||||||
|
if(!jQuery.attrHooks[lowerName]&&rboolean.test(lowerName)){jQuery.attrHooks[lowerName]={get:function(elem,name){var attrNode,property=jQuery.prop(elem,name);return property===true||typeof property!=="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==false?name.toLowerCase():undefined;},set:function(elem,value,name){var propName;if(value===false){jQuery.removeAttr(elem,name);}else{propName=jQuery.propFix[name]||name;if(propName in elem){elem[propName]=true;}
|
||||||
|
elem.setAttribute(name,name.toLowerCase());}
|
||||||
|
return name;}};if(ruseDefault.test(lowerName)){migrateWarn("jQuery.fn.attr('"+lowerName+"') may use property instead of attribute");}}
|
||||||
|
return oldAttr.call(jQuery,elem,name,value);};jQuery.attrHooks.value={get:function(elem,name){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrGet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value') no longer gets properties");}
|
||||||
|
return name in elem?elem.value:null;},set:function(elem,value){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrSet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");}
|
||||||
|
elem.value=value;}};var matched,browser,oldInit=jQuery.fn.init,oldParseJSON=jQuery.parseJSON,rquickExpr=/^([^<]*)(<[\w\W]+>)([^>]*)$/;jQuery.fn.init=function(selector,context,rootjQuery){var match;if(selector&&typeof selector==="string"&&!jQuery.isPlainObject(context)&&(match=rquickExpr.exec(jQuery.trim(selector)))&&match[0]){if(selector.charAt(0)!=="<"){migrateWarn("$(html) HTML strings must start with '<' character");}
|
||||||
|
if(match[3]){migrateWarn("$(html) HTML text after last tag is ignored");}
|
||||||
|
if(match[0].charAt(0)==="#"){migrateWarn("HTML string cannot start with a '#' character");jQuery.error("JQMIGRATE: Invalid selector string (XSS)");}
|
||||||
|
if(context&&context.context){context=context.context;}
|
||||||
|
if(jQuery.parseHTML){return oldInit.call(this,jQuery.parseHTML(match[2],context,true),context,rootjQuery);}}
|
||||||
|
return oldInit.apply(this,arguments);};jQuery.fn.init.prototype=jQuery.fn;jQuery.parseJSON=function(json){if(!json&&json!==null){migrateWarn("jQuery.parseJSON requires a valid JSON string");return null;}
|
||||||
|
return oldParseJSON.apply(this,arguments);};jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};};if(!jQuery.browser){matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;}
|
||||||
|
if(browser.chrome){browser.webkit=true;}else if(browser.webkit){browser.safari=true;}
|
||||||
|
jQuery.browser=browser;}
|
||||||
|
migrateWarnProp(jQuery,"browser",jQuery.browser,"jQuery.browser is deprecated");jQuery.sub=function(){function jQuerySub(selector,context){return new jQuerySub.fn.init(selector,context);}
|
||||||
|
jQuery.extend(true,jQuerySub,this);jQuerySub.superclass=this;jQuerySub.fn=jQuerySub.prototype=this();jQuerySub.fn.constructor=jQuerySub;jQuerySub.sub=this.sub;jQuerySub.fn.init=function init(selector,context){if(context&&context instanceof jQuery&&!(context instanceof jQuerySub)){context=jQuerySub(context);}
|
||||||
|
return jQuery.fn.init.call(this,selector,context,rootjQuerySub);};jQuerySub.fn.init.prototype=jQuerySub.fn;var rootjQuerySub=jQuerySub(document);migrateWarn("jQuery.sub() is deprecated");return jQuerySub;};jQuery.ajaxSetup({converters:{"text json":jQuery.parseJSON}});var oldFnData=jQuery.fn.data;jQuery.fn.data=function(name){var ret,evt,elem=this[0];if(elem&&name==="events"&&arguments.length===1){ret=jQuery.data(elem,name);evt=jQuery._data(elem,name);if((ret===undefined||ret===evt)&&evt!==undefined){migrateWarn("Use of jQuery.fn.data('events') is deprecated");return evt;}}
|
||||||
|
return oldFnData.apply(this,arguments);};var rscriptType=/\/(java|ecma)script/i,oldSelf=jQuery.fn.andSelf||jQuery.fn.addBack;jQuery.fn.andSelf=function(){migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");return oldSelf.apply(this,arguments);};if(!jQuery.clean){jQuery.clean=function(elems,context,fragment,scripts){context=context||document;context=!context.nodeType&&context[0]||context;context=context.ownerDocument||context;migrateWarn("jQuery.clean() is deprecated");var i,elem,handleScript,jsTags,ret=[];jQuery.merge(ret,jQuery.buildFragment(elems,context).childNodes);if(fragment){handleScript=function(elem){if(!elem.type||rscriptType.test(elem.type)){return scripts?scripts.push(elem.parentNode?elem.parentNode.removeChild(elem):elem):fragment.appendChild(elem);}};for(i=0;(elem=ret[i])!=null;i++){if(!(jQuery.nodeName(elem,"script")&&handleScript(elem))){fragment.appendChild(elem);if(typeof elem.getElementsByTagName!=="undefined"){jsTags=jQuery.grep(jQuery.merge([],elem.getElementsByTagName("script")),handleScript);ret.splice.apply(ret,[i+1,0].concat(jsTags));i+=jsTags.length;}}}}
|
||||||
|
return ret;};}
|
||||||
|
var eventAdd=jQuery.event.add,eventRemove=jQuery.event.remove,eventTrigger=jQuery.event.trigger,oldToggle=jQuery.fn.toggle,oldLive=jQuery.fn.live,oldDie=jQuery.fn.die,ajaxEvents="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",rajaxEvent=new RegExp("\\b(?:"+ajaxEvents+")\\b"),rhoverHack=/(?:^|\s)hover(\.\S+|)\b/,hoverHack=function(events){if(typeof(events)!=="string"||jQuery.event.special.hover){return events;}
|
||||||
|
if(rhoverHack.test(events)){migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");}
|
||||||
|
return events&&events.replace(rhoverHack,"mouseenter$1 mouseleave$1");};if(jQuery.event.props&&jQuery.event.props[0]!=="attrChange"){jQuery.event.props.unshift("attrChange","attrName","relatedNode","srcElement");}
|
||||||
|
if(jQuery.event.dispatch){migrateWarnProp(jQuery.event,"handle",jQuery.event.dispatch,"jQuery.event.handle is undocumented and deprecated");}
|
||||||
|
jQuery.event.add=function(elem,types,handler,data,selector){if(elem!==document&&rajaxEvent.test(types)){migrateWarn("AJAX events should be attached to document: "+types);}
|
||||||
|
eventAdd.call(this,elem,hoverHack(types||""),handler,data,selector);};jQuery.event.remove=function(elem,types,handler,selector,mappedTypes){eventRemove.call(this,elem,hoverHack(types)||"",handler,selector,mappedTypes);};jQuery.fn.error=function(){var args=Array.prototype.slice.call(arguments,0);migrateWarn("jQuery.fn.error() is deprecated");args.splice(0,0,"error");if(arguments.length){return this.bind.apply(this,args);}
|
||||||
|
this.triggerHandler.apply(this,args);return this;};jQuery.fn.toggle=function(fn,fn2){if(!jQuery.isFunction(fn)||!jQuery.isFunction(fn2)){return oldToggle.apply(this,arguments);}
|
||||||
|
migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");var args=arguments,guid=fn.guid||jQuery.guid++,i=0,toggler=function(event){var lastToggle=(jQuery._data(this,"lastToggle"+fn.guid)||0)%i;jQuery._data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;};toggler.guid=guid;while(i<args.length){args[i++].guid=guid;}
|
||||||
|
return this.click(toggler);};jQuery.fn.live=function(types,data,fn){migrateWarn("jQuery.fn.live() is deprecated");if(oldLive){return oldLive.apply(this,arguments);}
|
||||||
|
jQuery(this.context).on(types,this.selector,data,fn);return this;};jQuery.fn.die=function(types,fn){migrateWarn("jQuery.fn.die() is deprecated");if(oldDie){return oldDie.apply(this,arguments);}
|
||||||
|
jQuery(this.context).off(types,this.selector||"**",fn);return this;};jQuery.event.trigger=function(event,data,elem,onlyHandlers){if(!elem&&!rajaxEvent.test(event)){migrateWarn("Global events are undocumented and deprecated");}
|
||||||
|
return eventTrigger.call(this,event,data,elem||document,onlyHandlers);};jQuery.each(ajaxEvents.split("|"),function(_,name){jQuery.event.special[name]={setup:function(){var elem=this;if(elem!==document){jQuery.event.add(document,name+"."+jQuery.guid,function(){jQuery.event.trigger(name,null,elem,true);});jQuery._data(this,name,jQuery.guid++);}
|
||||||
|
return false;},teardown:function(){if(this!==document){jQuery.event.remove(document,name+"."+jQuery._data(this,name));}
|
||||||
|
return false;}};});})(jQuery,window);;jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;function formatedNumberToFloat(price,currencyFormat,currencySign)
|
||||||
|
{price=price.replace(currencySign,'');if(currencyFormat==1)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));else if(currencyFormat==2)
|
||||||
|
return parseFloat(price.replace(' ','').replace(',','.'));else if(currencyFormat==3)
|
||||||
|
return parseFloat(price.replace('.','').replace(' ','').replace(',','.'));else if(currencyFormat==4)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));return price;}
|
||||||
|
function formatNumber(value,numberOfDecimal,thousenSeparator,virgule)
|
||||||
|
{value=value.toFixed(numberOfDecimal);var val_string=value+'';var tmp=val_string.split('.');var abs_val_string=(tmp.length==2)?tmp[0]:val_string;var deci_string=('0.'+(tmp.length==2?tmp[1]:0)).substr(2);var nb=abs_val_string.length;for(var i=1;i<4;i++)
|
||||||
|
if(value>=Math.pow(10,(3*i)))
|
||||||
|
abs_val_string=abs_val_string.substring(0,nb-(3*i))+thousenSeparator+abs_val_string.substring(nb-(3*i));if(parseInt(numberOfDecimal)==0)
|
||||||
|
return abs_val_string;return abs_val_string+virgule+(deci_string>0?deci_string:'00');}
|
||||||
|
function formatCurrency(price,currencyFormat,currencySign,currencyBlank)
|
||||||
|
{blank='';price=parseFloat(price.toFixed(6));price=ps_round(price,priceDisplayPrecision);if(currencyBlank>0)
|
||||||
|
blank=' ';if(currencyFormat==1)
|
||||||
|
return currencySign+blank+formatNumber(price,priceDisplayPrecision,',','.');if(currencyFormat==2)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ',',')+blank+currencySign);if(currencyFormat==3)
|
||||||
|
return(currencySign+blank+formatNumber(price,priceDisplayPrecision,'.',','));if(currencyFormat==4)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,',','.')+blank+currencySign);if(currencyFormat==5)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ','.')+blank+currencySign);return price;}
|
||||||
|
function ps_round(value,precision)
|
||||||
|
{if(typeof(roundMode)=='undefined')
|
||||||
|
roundMode=2;if(typeof(precision)=='undefined')
|
||||||
|
precision=2;method=roundMode;if(method==0)
|
||||||
|
return ceilf(value,precision);else if(method==1)
|
||||||
|
return floorf(value,precision);precisionFactor=precision==0?1:Math.pow(10,precision);return Math.round(value*precisionFactor)/precisionFactor;}
|
||||||
|
function autoUrl(name,dest)
|
||||||
|
{var loc;var id_list;id_list=document.getElementById(name);loc=id_list.options[id_list.selectedIndex].value;if(loc!=0)
|
||||||
|
location.href=dest+loc;return;}
|
||||||
|
function autoUrlNoList(name,dest)
|
||||||
|
{var loc;loc=document.getElementById(name).checked;location.href=dest+(loc==true?1:0);return;}
|
||||||
|
function toggle(e,show)
|
||||||
|
{e.style.display=show?'':'none';}
|
||||||
|
function toggleMultiple(tab)
|
||||||
|
{var len=tab.length;for(var i=0;i<len;i++)
|
||||||
|
if(tab[i].style)
|
||||||
|
toggle(tab[i],tab[i].style.display=='none');}
|
||||||
|
function showElemFromSelect(select_id,elem_id)
|
||||||
|
{var select=document.getElementById(select_id);for(var i=0;i<select.length;++i)
|
||||||
|
{var elem=document.getElementById(elem_id+select.options[i].value);if(elem!=null)
|
||||||
|
toggle(elem,i==select.selectedIndex);}}
|
||||||
|
function openCloseAllDiv(name,option)
|
||||||
|
{var tab=$('*[name='+name+']');for(var i=0;i<tab.length;++i)
|
||||||
|
toggle(tab[i],option);}
|
||||||
|
function toggleElemValue(id_button,text1,text2)
|
||||||
|
{var obj=document.getElementById(id_button);if(obj)
|
||||||
|
obj.value=((!obj.value||obj.value==text2)?text1:text2);}
|
||||||
|
function addBookmark(url,title)
|
||||||
|
{if(window.sidebar)
|
||||||
|
return window.sidebar.addPanel(title,url,"");else if(window.external&&('AddFavorite'in window.external))
|
||||||
|
return window.external.AddFavorite(url,title);else if(window.opera&&window.print)
|
||||||
|
return true;return true;}
|
||||||
|
function writeBookmarkLink(url,title,text,img)
|
||||||
|
{var insert='';if(img)
|
||||||
|
insert=writeBookmarkLinkObject(url,title,'<img src="'+img+'" alt="'+escape(text)+'" title="'+removeQuotes(text)+'" />')+' ';insert+=writeBookmarkLinkObject(url,title,text);if(window.sidebar||window.opera&&window.print||(window.external&&('AddFavorite'in window.external)))
|
||||||
|
document.write(insert);}
|
||||||
|
function writeBookmarkLinkObject(url,title,insert)
|
||||||
|
{if(window.sidebar||window.external)
|
||||||
|
return('<a href="javascript:addBookmark(\''+escape(url)+'\', \''+removeQuotes(title)+'\')">'+insert+'</a>');else if(window.opera&&window.print)
|
||||||
|
return('<a rel="sidebar" href="'+escape(url)+'" title="'+removeQuotes(title)+'">'+insert+'</a>');return('');}
|
||||||
|
function checkCustomizations()
|
||||||
|
{var pattern=new RegExp(' ?filled ?');if(typeof customizationFields!='undefined')
|
||||||
|
for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{if(parseInt(customizationFields[i][1])==1&&($('#'+customizationFields[i][0]).html()==''||$('#'+customizationFields[i][0]).text()!=$('#'+customizationFields[i][0]).val())&&!pattern.test($('#'+customizationFields[i][0]).attr('class')))
|
||||||
|
return false;}
|
||||||
|
return true;}
|
||||||
|
function emptyCustomizations()
|
||||||
|
{if(typeof(customizationFields)=='undefined')return;$('.customization_block .success').fadeOut(function(){$(this).remove();});$('.customization_block .error').fadeOut(function(){$(this).remove();});for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{$('#'+customizationFields[i][0]).html('');$('#'+customizationFields[i][0]).val('');}}
|
||||||
|
function ceilf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.ceil(tmp)/precisionFactor;}
|
||||||
|
function floorf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.floor(tmp)/precisionFactor;}
|
||||||
|
function setCurrency(id_currency)
|
||||||
|
{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'index.php'+'?rand='+new Date().getTime(),data:'controller=change-currency&id_currency='+parseInt(id_currency),success:function(msg)
|
||||||
|
{location.reload(true);}});}
|
||||||
|
function isArrowKey(k_ev)
|
||||||
|
{var unicode=k_ev.keyCode?k_ev.keyCode:k_ev.charCode;if(unicode>=37&&unicode<=40)
|
||||||
|
return true;return false;}
|
||||||
|
function removeQuotes(value)
|
||||||
|
{value=value.replace(/\\"/g,'');value=value.replace(/"/g,'');value=value.replace(/\\'/g,'');value=value.replace(/'/g,'');return value;}
|
||||||
|
function sprintf(format)
|
||||||
|
{for(var i=1;i<arguments.length;i++)
|
||||||
|
format=format.replace(/%s/,arguments[i]);return format;}
|
||||||
|
function fancyMsgBox(msg,title)
|
||||||
|
{if(title)msg="<h2>"+title+"</h2><p>"+msg+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\"><input class=\"button\" type=\"button\" value=\"OK\" onclick=\"$.fancybox.close();\" /></p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
function fancyChooseBox(question,title,buttons,otherParams)
|
||||||
|
{var msg,funcName,action;if(title)msg="<h2>"+title+"</h2><p>"+question+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\">";var i=0;for(var caption in buttons){if(!buttons.hasOwnProperty(caption))continue;funcName=buttons[caption];if(typeof otherParams=='undefined')otherParams=0;otherParams=escape(JSON.stringify(otherParams));action=funcName?"$.fancybox.close();window['"+funcName+"'](JSON.parse(unescape('"+otherParams+"')), "+i+")":"$.fancybox.close()";msg+='<input class="button" style="margin-right: 5px" type="button" value="'+caption+'" onclick="'+action+'" />';i++;}
|
||||||
|
msg+="</p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
$().ready(function()
|
||||||
|
{$('form').submit(function()
|
||||||
|
{$(this).find('.hideOnSubmit').hide();});$('a._blank').attr('target','_blank');});;
|
||||||
|
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||||
|
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
||||||
|
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(Line truncated
|
||||||
|
$(document).ready(function(){quick_view();});;(function($){$.fn.idTabs=function(){var s={"start":null,"return":false,"click":null};for(var i=0;i<arguments.length;++i){var n={},a=arguments[i];switch(typeof a){case"object":$.extend(n,a);break;case"number":case"string":n.start=a;break;case"boolean":n["return"]=a;break;case"function":n.click=a;break;};$.extend(s,n);}
|
||||||
|
var self=this;var list=$("a[href^='#']",this).click(function(){if($("a.selected",self)[0]==this)
|
||||||
|
return s["return"];var id="#"+this.href.split('#')[1];var aList=[];var idList=[];$("a",self).each(function(){if(this.href.match(/#/)){aList[aList.length]=this;idList[idList.length]="#"+this.href.split('#')[1];}});if(s.click&&!s.click(id,idList,self))return s["return"];for(i in aList)$(aList[i]).removeClass("selected");for(i in idList){$(idList[i]).addClass('block_hidden_only_for_screen');}
|
||||||
|
$(this).addClass("selected");$(id).removeClass('block_hidden_only_for_screen');return s["return"];});var test;if(typeof s.start=="number"&&(test=list.filter(":eq("+s.start+")")).length)
|
||||||
|
test.click();else if(typeof s.start=="string"&&(test=list.filter("[href='#"+s.start+"']")).length)
|
||||||
|
test.click();else if((test=list.filter(".selected")).length)
|
||||||
|
test.removeClass("selected").click();else list.filter(":first").click();return this;};$(function(){$(".idTabs").each(function(){$(this).idTabs();});});})(jQuery);;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);;;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);;function ps_round(value,precision)
|
||||||
|
{if(typeof(roundMode)==='undefined')
|
||||||
|
roundMode=2;if(typeof(precision)==='undefined')
|
||||||
|
precision=2;method=roundMode;if(method===0)
|
||||||
|
return ceilf(value,precision);else if(method===1)
|
||||||
|
return floorf(value,precision);precisionFactor=precision===0?1:Math.pow(10,precision);return Math.round(value*precisionFactor)/precisionFactor;}
|
||||||
|
function ceilf(value,precision)
|
||||||
|
{if(typeof(precision)==='undefined')
|
||||||
|
precision=0;precisionFactor=precision===0?1:Math.pow(10,precision);tmp=value*precisionFactor;tmp2=tmp.toString();if(tmp2[tmp2.length-1]===0)
|
||||||
|
return value;return Math.ceil(value*precisionFactor)/precisionFactor;}
|
||||||
|
function floorf(value,precision)
|
||||||
|
{if(typeof(precision)==='undefined')
|
||||||
|
precision=0;precisionFactor=precision===0?1:Math.pow(10,precision);tmp=value*precisionFactor;tmp2=tmp.toString();if(tmp2[tmp2.length-1]===0)
|
||||||
|
return value;return Math.floor(value*precisionFactor)/precisionFactor;}
|
||||||
|
function formatedNumberToFloat(price,currencyFormat,currencySign)
|
||||||
|
{price=price.replace(currencySign,'');if(currencyFormat===1)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));else if(currencyFormat===2)
|
||||||
|
return parseFloat(price.replace(' ','').replace(',','.'));else if(currencyFormat===3)
|
||||||
|
return parseFloat(price.replace('.','').replace(' ','').replace(',','.'));else if(currencyFormat===4)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));return price;}
|
||||||
|
function formatCurrency(price,currencyFormat,currencySign,currencyBlank)
|
||||||
|
{blank='';price=parseFloat(price.toFixed(6));price=ps_round(price,priceDisplayPrecision);if(currencyBlank>0)
|
||||||
|
blank=' ';if(currencyFormat==1)
|
||||||
|
return currencySign+blank+formatNumber(price,priceDisplayPrecision,',','.');if(currencyFormat==2)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ',',')+blank+currencySign);if(currencyFormat==3)
|
||||||
|
return(currencySign+blank+formatNumber(price,priceDisplayPrecision,'.',','));if(currencyFormat==4)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,',','.')+blank+currencySign);if(currencyFormat==5)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ','.')+blank+currencySign);return price;}
|
||||||
|
function formatNumber(value,numberOfDecimal,thousenSeparator,virgule)
|
||||||
|
{value=value.toFixed(numberOfDecimal);var val_string=value+'';var tmp=val_string.split('.');var abs_val_string=(tmp.length===2)?tmp[0]:val_string;var deci_string=('0.'+(tmp.length===2?tmp[1]:0)).substr(2);var nb=abs_val_string.length;for(var i=1;i<4;i++)
|
||||||
|
if(value>=Math.pow(10,(3*i)))
|
||||||
|
abs_val_string=abs_val_string.substring(0,nb-(3*i))+thousenSeparator+abs_val_string.substring(nb-(3*i));if(parseInt(numberOfDecimal)===0)
|
||||||
|
return abs_val_string;return abs_val_string+virgule+(deci_string>0?deci_string:'00');}
|
||||||
|
function updateTextWithEffect(jQueryElement,text,velocity,effect1,effect2,newClass)
|
||||||
|
{if(jQueryElement.text()!==text)
|
||||||
|
if(effect1==='fade')
|
||||||
|
jQueryElement.fadeOut(velocity,function(){$(this).addClass(newClass);if(effect2==='fade')$(this).text(text).fadeIn(velocity);else if(effect2==='slide')$(this).text(text).slideDown(velocity);else if(effect2==='show')$(this).text(text).show(velocity,function(){});});else if(effect1==='slide')
|
||||||
|
jQueryElement.slideUp(velocity,function(){$(this).addClass(newClass);if(effect2==='fade')$(this).text(text).fadeIn(velocity);else if(effect2==='slide')$(this).text(text).slideDown(velocity);else if(effect2==='show')$(this).text(text).show(velocity);});else if(effect1==='hide')
|
||||||
|
jQueryElement.hide(velocity,function(){$(this).addClass(newClass);if(effect2==='fade')$(this).text(text).fadeIn(velocity);else if(effect2==='slide')$(this).text(text).slideDown(velocity);else if(effect2==='show')$(this).text(text).show(velocity);});}
|
||||||
|
function dbg(value)
|
||||||
|
{var active=false;var firefox=true;if(active)
|
||||||
|
if(firefox)
|
||||||
|
console.log(value);else
|
||||||
|
alert(value);}
|
||||||
|
function print_r(arr,level)
|
||||||
|
{var dumped_text="";if(!level)
|
||||||
|
level=0;var level_padding="";for(var j=0;j<level+1;j++)
|
||||||
|
level_padding+=" ";if(typeof(arr)==='object')
|
||||||
|
{for(var item in arr)
|
||||||
|
{var value=arr[item];if(typeof(value)==='object'){dumped_text+=level_padding+"'"+item+"' ...\n";dumped_text+=dump(value,level+1);}
|
||||||
|
else
|
||||||
|
{dumped_text+=level_padding+"'"+item+"' => \""+value+"\"\n";}}}
|
||||||
|
else
|
||||||
|
{dumped_text="===>"+arr+"<===("+typeof(arr)+")";}
|
||||||
|
return dumped_text;}
|
||||||
|
function in_array(value,array)
|
||||||
|
{for(var i in array)
|
||||||
|
if(array[i]===value)
|
||||||
|
return true;return false;}
|
||||||
|
$(document).ready(function(){$.fn.checkboxChange=function(fnChecked,fnUnchecked){if($(this).prop('checked')&&fnChecked)
|
||||||
|
fnChecked.call(this);else if(fnUnchecked)
|
||||||
|
fnUnchecked.call(this);if(!$(this).attr('eventCheckboxChange'))
|
||||||
|
{$(this).live('change',function(){$(this).checkboxChange(fnChecked,fnUnchecked);});$(this).attr('eventCheckboxChange',true);}};});$(function(){$('a.js-new-window').click(function(){window.open(this.href);return false;});});;var combinations=[];var selectedCombination=[];var globalQuantity=0;var colors=[];function function_exists(function_name)
|
||||||
|
{if(typeof function_name=='string')
|
||||||
|
return(typeof window[function_name]=='function');return(function_name instanceof Function);}
|
||||||
|
function oosHookJsCode()
|
||||||
|
{for(var i=0;i<oosHookJsCodeFunctions.length;i++)
|
||||||
|
{if(function_exists(oosHookJsCodeFunctions[i]))
|
||||||
|
setTimeout(oosHookJsCodeFunctions[i]+'()',0);}}
|
||||||
|
function addCombination(idCombination,arrayOfIdAttributes,quantity,price,ecotax,id_image,reference,unit_price,minimal_quantity,available_date,combination_specific_price)
|
||||||
|
{globalQuantity+=quantity;var combination=[];combination['idCombination']=idCombination;combination['quantity']=quantity;combination['idsAttributes']=arrayOfIdAttributes;combination['price']=price;combination['ecotax']=ecotax;combination['image']=id_image;combination['reference']=reference;combination['unit_price']=unit_price;combination['minimal_quantity']=minimal_quantity;combination['available_date']=[];combination['available_date']=available_date;combination['specific_price']=[];combination['specific_price']=combination_specific_price;combinations.push(combination);}
|
||||||
|
function findCombination(firstTime)
|
||||||
|
{$('#minimal_quantity_wanted_p').fadeOut();$('#quantity_wanted').val(1);var choice=[];$('#attributes select, #attributes input[type=hidden], #attributes input[type=radio]:checked').each(function(){choice.push($(this).val());});for(var combination=0;combination<combinations.length;++combination)
|
||||||
|
{var combinationMatchForm=true;$.each(combinations[combination]['idsAttributes'],function(key,value)
|
||||||
|
{if(!in_array(value,choice))
|
||||||
|
combinationMatchForm=false;});if(combinationMatchForm)
|
||||||
|
{if(combinations[combination]['minimal_quantity']>1)
|
||||||
|
{$('#minimal_quantity_label').html(combinations[combination]['minimal_quantity']);$('#minimal_quantity_wanted_p').fadeIn();$('#quantity_wanted').val(combinations[combination]['minimal_quantity']);$('#quantity_wanted').bind('keyup',function(){checkMinimalQuantity(combinations[combination]['minimal_quantity']);});}
|
||||||
|
selectedCombination['unavailable']=false;selectedCombination['reference']=combinations[combination]['reference'];$('#idCombination').val(combinations[combination]['idCombination']);quantityAvailable=combinations[combination]['quantity'];selectedCombination['price']=combinations[combination]['price'];selectedCombination['unit_price']=combinations[combination]['unit_price'];selectedCombination['specific_price']=combinations[combination]['specific_price'];if(combinations[combination]['ecotax'])
|
||||||
|
selectedCombination['ecotax']=combinations[combination]['ecotax'];else
|
||||||
|
selectedCombination['ecotax']=default_eco_tax;if(combinations[combination]['image']&&combinations[combination]['image']!=-1)
|
||||||
|
displayImage($('#thumb_'+combinations[combination]['image']).parent());if(combinations[combination]['idCombination']&&combinations[combination]['idCombination']>0)
|
||||||
|
displayDiscounts(combinations[combination]['idCombination']);selectedCombination['available_date']=combinations[combination]['available_date'];updateDisplay();if(typeof(firstTime)!='undefined'&&firstTime)
|
||||||
|
refreshProductImages(0);else
|
||||||
|
refreshProductImages(combinations[combination]['idCombination']);return;}}
|
||||||
|
selectedCombination['unavailable']=true;if(typeof(selectedCombination['available_date'])!='undefined')
|
||||||
|
delete selectedCombination['available_date'];updateDisplay();}
|
||||||
|
function updateDisplay()
|
||||||
|
{var productPriceDisplay=productPrice;var productPriceWithoutReductionDisplay=productPriceWithoutReduction;if(!selectedCombination['unavailable']&&quantityAvailable>0&&productAvailableForOrder==1)
|
||||||
|
{$('#quantity_wanted_p:hidden').show('slow');$('#add_to_cart:hidden').fadeIn(600);$('#oosHook').hide();$('#availability_date').fadeOut();if(availableNowValue!='')
|
||||||
|
{$('#availability_value').removeClass('warning_inline');$('#availability_value').text(availableNowValue);if(stock_management==1)
|
||||||
|
$('#availability_statut:hidden').show();}
|
||||||
|
else
|
||||||
|
$('#availability_statut:visible').hide();if(!allowBuyWhenOutOfStock)
|
||||||
|
{if(quantityAvailable<=maxQuantityToAllowDisplayOfLastQuantityMessage)
|
||||||
|
$('#last_quantities').show('slow');else
|
||||||
|
$('#last_quantities').hide('slow');}
|
||||||
|
if(quantitiesDisplayAllowed)
|
||||||
|
{$('#pQuantityAvailable:hidden').show('slow');$('#quantityAvailable').text(quantityAvailable);if(quantityAvailable<2)
|
||||||
|
{$('#quantityAvailableTxt').show();$('#quantityAvailableTxtMultiple').hide();}
|
||||||
|
else
|
||||||
|
{$('#quantityAvailableTxt').hide();$('#quantityAvailableTxtMultiple').show();}}}
|
||||||
|
else
|
||||||
|
{if(productAvailableForOrder==1)
|
||||||
|
{$('#oosHook').show();if($('#oosHook').length>0&&function_exists('oosHookJsCode'))
|
||||||
|
oosHookJsCode();}
|
||||||
|
$('#last_quantities:visible').hide('slow');$('#pQuantityAvailable:visible').hide('slow');if(!allowBuyWhenOutOfStock)
|
||||||
|
$('#quantity_wanted_p:visible').hide('slow');if(!selectedCombination['unavailable'])
|
||||||
|
$('#availability_value').text(doesntExistNoMore+(globalQuantity>0?' '+doesntExistNoMoreBut:'')).addClass('warning_inline');else
|
||||||
|
{$('#availability_value').text(doesntExist).addClass('warning_inline');$('#oosHook').hide();}
|
||||||
|
if(stock_management==1&&!allowBuyWhenOutOfStock)
|
||||||
|
$('#availability_statut:hidden').show();if(typeof(selectedCombination['available_date'])!='undefined'&&selectedCombination['available_date']['date'].length!=0)
|
||||||
|
{var available_date=selectedCombination['available_date']['date'];var tab_date=available_date.split('-');var time_available=new Date(tab_date[0],tab_date[1],tab_date[2]);time_available.setMonth(time_available.getMonth()-1);var now=new Date();if(now.getTime()<time_available.getTime()&&$('#availability_date_value').text()!=selectedCombination['available_date']['date_formatted'])
|
||||||
|
{$('#availability_date').fadeOut('normal',function(){$('#availability_date_value').text(selectedCombination['available_date']['date_formatted']);$(this).fadeIn();});}
|
||||||
|
else if(now.getTime()<time_available.getTime())
|
||||||
|
$('#availability_date').fadeIn();}
|
||||||
|
else
|
||||||
|
$('#availability_date').fadeOut();if(allowBuyWhenOutOfStock&&!selectedCombination['unavailable']&&productAvailableForOrder==1)
|
||||||
|
{$('#add_to_cart:hidden').fadeIn(600);if(availableLaterValue!='')
|
||||||
|
{$('#availability_value').text(availableLaterValue);if(stock_management==1)
|
||||||
|
$('#availability_statut:hidden').show('slow');}
|
||||||
|
else
|
||||||
|
$('#availability_statut:visible').hide('slow');}
|
||||||
|
else
|
||||||
|
{$('#add_to_cart:visible').fadeOut(600);if(stock_management==1)
|
||||||
|
$('#availability_statut:hidden').show('slow');}
|
||||||
|
if(productAvailableForOrder==0)
|
||||||
|
$('#availability_statut:visible').hide();}
|
||||||
|
if(selectedCombination['reference']||productReference)
|
||||||
|
{if(selectedCombination['reference'])
|
||||||
|
$('#product_reference span').text(selectedCombination['reference']);else if(productReference)
|
||||||
|
$('#product_reference span').text(productReference);$('#product_reference:hidden').show('slow');}
|
||||||
|
else
|
||||||
|
$('#product_reference:visible').hide('slow');if(!selectedCombination['unavailable']&&productShowPrice==1)
|
||||||
|
{var priceTaxExclWithoutGroupReduction='';priceTaxExclWithoutGroupReduction=ps_round(productPriceTaxExcluded,6)*(1/group_reduction);var tax=(taxRate/100)+1;var taxExclPrice=priceTaxExclWithoutGroupReduction+(selectedCombination['price']*currencyRate);if(selectedCombination.specific_price&&selectedCombination.specific_price['id_product_attribute'])
|
||||||
|
{if(selectedCombination.specific_price['price']&&selectedCombination.specific_price['price']>=0)
|
||||||
|
var taxExclPrice=(specific_currency?selectedCombination.specific_price['price']:selectedCombination.specific_price['price']*currencyRate);else
|
||||||
|
var taxExclPrice=productBasePriceTaxExcluded*currencyRate+(selectedCombination['price']*currencyRate);}
|
||||||
|
else if(product_specific_price.price&&product_specific_price.price>=0)
|
||||||
|
var taxExclPrice=(specific_currency?product_specific_price.price:product_specific_price.price*currencyRate)+(selectedCombination['price']*currencyRate);if(!displayPrice&&!noTaxForThisProduct)
|
||||||
|
productPriceDisplay=ps_round(taxExclPrice*tax,2);else
|
||||||
|
productPriceDisplay=ps_round(taxExclPrice,2);productPriceWithoutReductionDisplay=productPriceDisplay*group_reduction;var reduction=0;if(selectedCombination['specific_price'].reduction_price||selectedCombination['specific_price'].reduction_percent)
|
||||||
|
{reduction_price=(specific_currency?selectedCombination['specific_price'].reduction_price:selectedCombination['specific_price'].reduction_price*currencyRate);reduction=productPriceDisplay*(parseFloat(selectedCombination['specific_price'].reduction_percent)/100)+reduction_price;if(reduction_price&&(displayPrice||noTaxForThisProduct))
|
||||||
|
reduction=ps_round(reduction/tax,6);}
|
||||||
|
else if(product_specific_price&&product_specific_price.reduction&&!selectedCombination.specific_price)
|
||||||
|
{if(product_specific_price.reduction_type=='amount')
|
||||||
|
reduction_price=(specific_currency?product_specific_price.reduction:product_specific_price.reduction*currencyRate);else
|
||||||
|
reduction_price=0;if(product_specific_price.reduction_type=='percentage')
|
||||||
|
reduction_percent=productPriceDisplay*parseFloat(product_specific_price.reduction);reduction=reduction_price+reduction_percent;if(reduction_price&&(displayPrice||noTaxForThisProduct))
|
||||||
|
reduction=ps_round(reduction/tax,6);}
|
||||||
|
if(selectedCombination.specific_price)
|
||||||
|
{if(selectedCombination['specific_price']&&selectedCombination['specific_price'].reduction_type=='percentage')
|
||||||
|
{$('#reduction_amount').hide();$('#reduction_percent_display').html('-'+parseFloat(selectedCombination['specific_price'].reduction_percent)+'%');$('#reduction_percent').show();}else if(selectedCombination['specific_price'].reduction_type=='amount'&&selectedCombination['specific_price'].reduction_price!=0){$('#reduction_amount_display').html('-'+formatCurrency(reduction_price,currencyFormat,currencySign,currencyBlank));$('#reduction_percent').hide();$('#reduction_amount').show();}else{$('#reduction_percent').hide();$('#reduction_amount').hide();}}
|
||||||
|
if(product_specific_price['reduction_type']!=''||selectedCombination['specific_price'].reduction_type!='')
|
||||||
|
$('#discount_reduced_price,#old_price').show();else
|
||||||
|
$('#discount_reduced_price,#old_price').hide();if((product_specific_price['reduction_type']=='percentage'&&selectedCombination['specific_price'].reduction_type=='percentage')||selectedCombination['specific_price'].reduction_type=='percentage')
|
||||||
|
$('#reduction_percent').show();else
|
||||||
|
$('#reduction_percent').hide();if(product_specific_price['price']||(selectedCombination.specific_price&&selectedCombination.specific_price['price']))
|
||||||
|
$('#not_impacted_by_discount').show();else
|
||||||
|
$('#not_impacted_by_discount').hide();productPriceDisplay-=reduction;productPriceDisplay=ps_round(productPriceDisplay*group_reduction,2);var ecotaxAmount=!displayPrice?ps_round(selectedCombination['ecotax']*(1+ecotaxTax_rate/100),2):selectedCombination['ecotax'];productPriceDisplay+=ecotaxAmount;productPriceWithoutReductionDisplay+=ecotaxAmount;var our_price='';if(productPriceDisplay>0){our_price=formatCurrency(productPriceDisplay,currencyFormat,currencySign,currencyBlank);}else{our_price=formatCurrency(0,currencyFormat,currencySign,currencyBlank);}
|
||||||
|
$('#our_price_display').text(our_price);$('#old_price_display').text(formatCurrency(productPriceWithoutReductionDisplay,currencyFormat,currencySign,currencyBlank));if(productPriceWithoutReductionDisplay>productPriceDisplay)
|
||||||
|
$('#old_price,#old_price_display,#old_price_display_taxes').show();else
|
||||||
|
$('#old_price,#old_price_display,#old_price_display_taxes').hide();var productPricePretaxed='';if(!noTaxForThisProduct)
|
||||||
|
productPricePretaxed=productPriceDisplay/tax;else
|
||||||
|
productPricePretaxed=productPriceDisplay;$('#pretaxe_price_display').text(formatCurrency(productPricePretaxed,currencyFormat,currencySign,currencyBlank));productUnitPriceRatio=parseFloat(productUnitPriceRatio);if(productUnitPriceRatio>0)
|
||||||
|
{newUnitPrice=(productPriceDisplay/parseFloat(productUnitPriceRatio))+selectedCombination['unit_price'];$('#unit_price_display').text(formatCurrency(newUnitPrice,currencyFormat,currencySign,currencyBlank));}
|
||||||
|
ecotaxAmount=!displayPrice?ps_round(selectedCombination['ecotax']*(1+ecotaxTax_rate/100),2):selectedCombination['ecotax'];$('#ecotax_price_display').text(formatCurrency(ecotaxAmount,currencyFormat,currencySign,currencyBlank));}}
|
||||||
|
function displayImage(domAAroundImgThumb,no_animation)
|
||||||
|
{if(typeof(no_animation)=='undefined')
|
||||||
|
no_animation=false;if(domAAroundImgThumb.attr('href'))
|
||||||
|
{var newSrc=domAAroundImgThumb.attr('href').replace('thickbox','large');if($('#bigpic').attr('src')!=newSrc)
|
||||||
|
{$('#bigpic').attr('src',newSrc).load(function(){if(typeof(jqZoomEnabled)!='undefined'&&jqZoomEnabled)
|
||||||
|
$(this).attr('rel',domAAroundImgThumb.attr('href'));});}
|
||||||
|
$('#views_block li a').removeClass('shown');$(domAAroundImgThumb).addClass('shown');}}
|
||||||
|
function displayDiscounts(combination)
|
||||||
|
{$('#quantityDiscount tbody tr').each(function(){if(($(this).attr('id')!='quantityDiscount_0')&&($(this).attr('id')!='quantityDiscount_'+combination)&&($(this).attr('id')!='noQuantityDiscount'))
|
||||||
|
$(this).fadeOut('slow');});if($('#quantityDiscount_'+combination+',.quantityDiscount_'+combination).length!=0)
|
||||||
|
{$('#quantityDiscount_'+combination+',.quantityDiscount_'+combination).show();$('#noQuantityDiscount').hide();}
|
||||||
|
else
|
||||||
|
$('#noQuantityDiscount').show();}
|
||||||
|
function serialScrollFixLock(event,targeted,scrolled,items,position)
|
||||||
|
{serialScrollNbImages=$('#thumbs_list li:visible').length;serialScrollNbImagesDisplayed=3;var leftArrow=position==0?true:false;var rightArrow=position+serialScrollNbImagesDisplayed>=serialScrollNbImages?true:false;$('#view_scroll_left').css('cursor',leftArrow?'default':'pointer').css('display',leftArrow?'none':'block').fadeTo(0,leftArrow?0:1);$('#view_scroll_right').css('cursor',rightArrow?'default':'pointer').fadeTo(0,rightArrow?0:1).css('display',rightArrow?'none':'block');return true;}
|
||||||
|
function refreshProductImages(id_product_attribute)
|
||||||
|
{$('#thumbs_list_frame').scrollTo('li:eq(0)',700,{axis:'x'});id_product_attribute=parseInt(id_product_attribute);if(id_product_attribute>0&&typeof(combinationImages)!='undefined'&&typeof(combinationImages[id_product_attribute])!='undefined')
|
||||||
|
{$('#thumbs_list li').hide();$('#thumbs_list').trigger('goto',0);for(var i=0;i<combinationImages[id_product_attribute].length;i++)
|
||||||
|
$('#thumbnail_'+parseInt(combinationImages[id_product_attribute][i])).show();if(parseInt($('#thumbs_list_frame >li:visible').length)<parseInt($('#thumbs_list_frame >li').length))
|
||||||
|
$('#wrapResetImages').show('slow');else
|
||||||
|
$('#wrapResetImages').hide('slow');}
|
||||||
|
else
|
||||||
|
{$('#thumbs_list li').show();if(parseInt($('#thumbs_list_frame >li').length)==parseInt($('#thumbs_list_frame >li:visible').length))
|
||||||
|
$('#wrapResetImages').hide('slow');}
|
||||||
|
var thumb_width=$('#thumbs_list_frame >li').width()+parseInt($('#thumbs_list_frame >li').css('marginRight'))+1;$('#thumbs_list_frame').width((parseInt((thumb_width)*$('#thumbs_list_frame >li').length))+'px');$('#thumbs_list').trigger('goto',0);serialScrollFixLock('','','','',0);}
|
||||||
|
$(document).ready(function()
|
||||||
|
{$('#thumbs_list').serialScroll({items:'li:visible',prev:'#view_scroll_left',next:'#view_scroll_right',axis:'x',offset:0,start:0,stop:true,onBefore:serialScrollFixLock,duration:700,step:1,lazy:true,lock:false,force:false,cycle:false});$('#thumbs_list').trigger('goto',1);$('#thumbs_list').trigger('goto',0);$('#views_block li a').hover(function(){displayImage($(this));},function(){});if(typeof(jqZoomEnabled)!='undefined'&&jqZoomEnabled)
|
||||||
|
{$('#bigpic').attr('rel',$('#bigpic').attr('src').replace('large','thickbox'));$('img.jqzoom').jqueryzoom({xzoom:200,yzoom:200,offset:21});}
|
||||||
|
$('#view_full_size, #image-block img').click(function(){$('#views_block .shown').click();});$('#short_description_block .button').click(function(){$('#more_info_tab_more_info').click();$.scrollTo('#more_info_tabs',1200);});$('#customizedDatas input').click(function(){$('#customizedDatas input').hide();$('#ajax-loader').fadeIn();$('#customizedDatas').append(uploading_in_progress);});original_url=window.location+'';first_url_check=true;checkUrl();initLocationChange();if(typeof productHasAttributes!='undefined'&&productHasAttributes)
|
||||||
|
findCombination(true);else if(typeof productHasAttributes!='undefined'&&!productHasAttributes)
|
||||||
|
refreshProductImages(0);$('#resetImages').click(function(){refreshProductImages(0);});if(contentOnly==false)
|
||||||
|
$('.thickbox').fancybox({'hideOnContentClick':true,'transitionIn':'elastic','transitionOut':'elastic'});else
|
||||||
|
$('.thickbox').click(function(){return false})});function saveCustomization()
|
||||||
|
{$('#quantityBackup').val($('#quantity_wanted').val());customAction=$('#customizationForm').attr('action');$('body select[id^="group_"]').each(function(){customAction=customAction.replace(new RegExp(this.id+'=\\d+'),this.id+'='+this.value);});$('#customizationForm').attr('action',customAction);$('#customizationForm').submit();}
|
||||||
|
function submitPublishProduct(url,redirect,token)
|
||||||
|
{var id_product=$('#admin-action-product-id').val();$.ajaxSetup({async:false});$.post(url+'/index.php',{action:'publishProduct',id_product:id_product,status:1,redirect:redirect,ajax:1,tab:'AdminProducts',token:token},function(data)
|
||||||
|
{if(data.indexOf('error')===-1)
|
||||||
|
document.location.href=data;});return true;}
|
||||||
|
function checkMinimalQuantity(minimal_quantity)
|
||||||
|
{if($('#quantity_wanted').val()<minimal_quantity)
|
||||||
|
{$('#quantity_wanted').css('border','1px solid red');$('#minimal_quantity_wanted_p').css('color','red');}
|
||||||
|
else
|
||||||
|
{$('#quantity_wanted').css('border','1px solid #BDC2C9');$('#minimal_quantity_wanted_p').css('color','#374853');}}
|
||||||
|
function colorPickerClick(elt)
|
||||||
|
{id_attribute=$(elt).attr('id').replace('color_','');$(elt).parent().parent().children().removeClass('selected');$(elt).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1,function(){$(this).parent().addClass('selected');});});});$(elt).parent().parent().parent().children('.color_pick_hidden,#color_pick_hidden').val(id_attribute);findCombination(false);}
|
||||||
|
function getProductAttribute()
|
||||||
|
{product_attribute_id=$('#idCombination').val();product_id=$('#product_page_product_id').val();request='';var tab_attributes=[];$('#attributes select, #attributes input[type=hidden], #attributes input[type=radio]:checked').each(function(){tab_attributes.push($(this).val());});for(var i in attributesCombinations)
|
||||||
|
for(var a in tab_attributes)
|
||||||
|
if(attributesCombinations[i]['id_attribute']===tab_attributes[a])
|
||||||
|
request+='/'+attributesCombinations[i]['group']+attribute_anchor_separator+attributesCombinations[i]['attribute'];request=request.replace(request.substring(0,1),'#/');url=window.location+'';if(url.indexOf('#')!=-1)
|
||||||
|
url=url.substring(0,url.indexOf('#'));$('#customizationForm').attr('action',$('#customizationForm').attr('action')+request);window.location=url+request;}
|
||||||
|
function initLocationChange(time)
|
||||||
|
{if(!time)time=500;setInterval(checkUrl,time);}
|
||||||
|
function checkUrl()
|
||||||
|
{if(original_url!=window.location||first_url_check)
|
||||||
|
{first_url_check=false;url=window.location+'';if(url.indexOf('#/')!=-1)
|
||||||
|
{params=url.substring(url.indexOf('#')+1,url.length);tabParams=params.split('/');tabValues=[];if(tabParams[0]=='')
|
||||||
|
tabParams.shift();for(var i in tabParams)
|
||||||
|
tabValues.push(tabParams[i].split(attribute_anchor_separator));product_id=$('#product_page_product_id').val();$('.color_pick').removeClass('selected');$('.color_pick').parent().parent().children().removeClass('selected');count=0;for(var z in tabValues)
|
||||||
|
for(var a in attributesCombinations)
|
||||||
|
if(attributesCombinations[a]['group']===decodeURIComponent(tabValues[z][0])&&attributesCombinations[a]['attribute']===tabValues[z][1])
|
||||||
|
{count++;$('#color_'+attributesCombinations[a]['id_attribute']).addClass('selected');$('#color_'+attributesCombinations[a]['id_attribute']).parent().addClass('selected');$('input:radio[value='+attributesCombinations[a]['id_attribute']+']').attr('checked',true);$('input:hidden[name=group_'+attributesCombinations[a]['id_attribute_group']+']').val(attributesCombinations[a]['id_attribute']);$('select[name=group_'+attributesCombinations[a]['id_attribute_group']+']').val(attributesCombinations[a]['id_attribute']);}
|
||||||
|
if(count>=0)
|
||||||
|
{findCombination(false);original_url=url;}
|
||||||
|
else
|
||||||
|
window.location=url.substring(0,url.indexOf('#'));}}}
|
||||||
|
$(document).ready(function(){$('.product_quantity_up').click(function(e){e.preventDefault();fieldName=$(this).attr('rel');var currentVal=parseInt($('input[name='+fieldName+']').val());if(quantityAvailable>0){quantityAvailableT=quantityAvailable;}else{quantityAvailableT=100000000;}
|
||||||
|
if(!isNaN(currentVal)&¤tVal<quantityAvailableT){$('input[name='+fieldName+']').val(currentVal+1).trigger('keyup');}else{$('input[name='+fieldName+']').val(quantityAvailableT);}
|
||||||
|
return false;});$(".product_quantity_down").click(function(e){e.preventDefault();fieldName=$(this).attr('rel');var currentVal=parseInt($('input[name='+fieldName+']').val());if(!isNaN(currentVal)&¤tVal>1){$('input[name='+fieldName+']').val(currentVal-1).trigger('keyup');}else{$('input[name='+fieldName+']').val(1);}
|
||||||
|
return false;});});;function PS_SE_HandleEvent()
|
||||||
|
{$(document).ready(function(){$('#id_country').change(function(){resetAjaxQueries();updateStateByIdCountry();});if(SE_RefreshMethod==0)
|
||||||
|
{$('#id_state').change(function(){resetAjaxQueries();updateCarriersList();});$('#zipcode').bind('keyup',function(e){if(e.keyCode=='13')
|
||||||
|
{resetAjaxQueries();updateCarriersList();}});}
|
||||||
|
$('#update_carriers_list').click(function(){updateCarriersList();});$('#carriercompare_submit').click(function(){resetAjaxQueries();saveSelection();return false;});updateStateByIdCountry();});}
|
||||||
|
function displayWaitingAjax(type,message)
|
||||||
|
{$('#SE_AjaxDisplay').find('p').html(message);$('#SE_AjaxDisplay').css('display',type);}
|
||||||
|
function updateStateByIdCountry()
|
||||||
|
{$('#id_state').children().remove();$('#availableCarriers').slideUp('fast');$('#states').slideUp('fast');displayWaitingAjax('block',SE_RefreshStateTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getStates&id_country='+$('#id_country').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(state in json)
|
||||||
|
{$('#id_state').append('<option value=\''+json[state].id_state+'\' '+(id_state==json[state].id_state?'selected="selected"':'')+'>'+json[state].name+'</option>');}
|
||||||
|
$('#states').slideDown('fast');}
|
||||||
|
if(SE_RefreshMethod==0)
|
||||||
|
updateCarriersList();displayWaitingAjax('none','');}});ajaxQueries.push(query);}
|
||||||
|
function updateCarriersList()
|
||||||
|
{$('#carriercompare_errors_list').children().remove();$('#availableCarriers').slideUp('normal',function(){$(this).find(('tbody')).children().remove();$('#noCarrier').slideUp('fast');displayWaitingAjax('block',SE_RetrievingInfoTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getCarriers&id_country='+$('#id_country').val()+'&id_state='+$('#id_state').val()+'&zipcode='+$('#zipcode').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(carrier in json)
|
||||||
|
{var html='<tr class="'+(carrier%2?'alternate_':'')+'item">'+'<td class="carrier_action">'+'<input type="radio" name="id_carrier" value="'+json[carrier].id_carrier+'" id="id_carrier'+json[carrier].id_carrier+'" '+(id_carrier==json[carrier].id_carrier?'checked="checked"':'')+'/>'+'</td>'+'<td class="carrier_name">'+'<label for="id_carrier'+json[carrier].id_carrier+'">'+
|
||||||
|
(json[carrier].img?'<img src="'+json[carrier].img+'" alt="'+json[carrier].name+'" />':json[carrier].name)+'</label>'+'</td>'+'<td class="carrier_infos">'+((json[carrier].delay!=null)?json[carrier].delay:'')+'</td>'+'<td class="carrier_price">';if(json[carrier].price)
|
||||||
|
{html+='<span class="price">'+(displayPrice==1?formatCurrency(json[carrier].price_tax_exc,currencyFormat,currencySign,currencyBlank):formatCurrency(json[carrier].price,currencyFormat,currencySign,currencyBlank))+'</span>';}
|
||||||
|
else
|
||||||
|
{html+=txtFree;}
|
||||||
|
html+='</td>'+'</tr>';$('#carriers_list').append(html);}
|
||||||
|
displayWaitingAjax('none','');$('#availableCarriers').slideDown();}
|
||||||
|
else
|
||||||
|
{displayWaitingAjax('none','');$('#noCarrier').slideDown();}}});ajaxQueries.push(query);});}
|
||||||
|
function saveSelection()
|
||||||
|
{$('#carriercompare_errors').slideUp();$('#carriercompare_errors_list').children().remove();displayWaitingAjax('block',SE_RedirectTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=saveSelection&'+$('#compare_shipping_form').serialize(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(error in json)
|
||||||
|
$('#carriercompare_errors_list').append('<li>'+json[error]+'</li>');$('#carriercompare_errors').slideDown();displayWaitingAjax('none','');}
|
||||||
|
else
|
||||||
|
{$('.SE_SubmitRefreshCard').fadeOut('fast');location.reload(true);}}});ajaxQueries.push(query);return false;}
|
||||||
|
var ajaxQueries=new Array();function resetAjaxQueries()
|
||||||
|
{for(i=0;i<ajaxQueries.length;++i)
|
||||||
|
ajaxQueries[i].abort();ajaxQueries=new Array();};if(typeof baseUri==="undefined"&&typeof baseDir!=="undefined")
|
||||||
|
baseUri=baseDir;var ajaxCart={nb_total_products:0,overrideButtonsInThePage:function(){$('.ajax_add_to_cart_button').unbind('click').click(function(){var idProduct=$(this).attr('rel').replace('nofollow','').replace('ajax_id_product_','');if($(this).attr('disabled')!='disabled')
|
||||||
|
ajaxCart.add(idProduct,null,false,this);return false;});$('#add_to_cart button').unbind('click').click(function(){ajaxCart.add($('#product_page_product_id').val(),$('#idCombination').val(),true,null,$('#quantity_wanted').val(),null);return false;});$('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){var customizationId=0;var productId=0;var productAttributeId=0;var customizableProductDiv=$($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]");if(customizableProductDiv&&$(customizableProductDiv).length)
|
||||||
|
{$(customizableProductDiv).each(function(){var ids=$(this).attr('id').split('_');if(typeof(ids[1])!='undefined')
|
||||||
|
{customizationId=parseInt(ids[1]);productId=parseInt(ids[2]);if(typeof(ids[3])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[3]);return false;}});}
|
||||||
|
if(!customizationId)
|
||||||
|
{var firstCut=$(this).parent().parent().attr('id').replace('cart_block_product_','');firstCut=firstCut.replace('deleteCustomizableProduct_','');ids=firstCut.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[1]);}
|
||||||
|
var idAddressDelivery=$(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1];ajaxCart.remove(productId,productAttributeId,customizationId,idAddressDelivery);return false;});},expand:function(){if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
{$('#cart_block_summary').slideUp(200,function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_list').slideDown({duration:450,complete:function(){$(this).addClass('expanded').removeClass('collapsed');}});});$('#block_cart_expand').fadeOut('slow',function(){$('#block_cart_collapse').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=expand'});}},refresh:function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&ajax=true&token='+static_token,success:function(jsonData)
|
||||||
|
{ajaxCart.updateCart(jsonData);}});},collapse:function(){if($('#cart_block_list').hasClass('expanded'))
|
||||||
|
{$('#cart_block_list').slideUp('slow',function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_summary').slideDown(450,function(){$(this).addClass('expanded').removeClass('collapsed');});});$('#block_cart_collapse').fadeOut('slow',function(){$('#block_cart_expand').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=collapse'+'&rand='+new Date().getTime()});}},updateCartInformation:function(jsonData,addedFromProductPage)
|
||||||
|
{ajaxCart.updateCart(jsonData);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$('.ajax_add_to_cart_button').removeAttr('disabled');},add:function(idProduct,idCombination,addedFromProductPage,callerElement,quantity,whishlist){if(addedFromProductPage&&!checkCustomizations())
|
||||||
|
{alert(fieldRequired);return;}
|
||||||
|
emptyCustomizations();if(addedFromProductPage)
|
||||||
|
{$('#add_to_cart button').attr('disabled',true).addClass('disabled');$('.filled').removeClass('filled');}
|
||||||
|
else
|
||||||
|
$(callerElement).attr('disabled',true);if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
this.expand();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&add=1&ajax=true&qty='+((quantity&&quantity!=null)?quantity:'1')+'&id_product='+idProduct+'&token='+static_token+((parseInt(idCombination)&&idCombination!=null)?'&ipa='+parseInt(idCombination):''),success:function(jsonData,textStatus,jqXHR)
|
||||||
|
{if(whishlist&&!jsonData.errors)
|
||||||
|
WishlistAddProductCart(whishlist[0],idProduct,idCombination,whishlist[1]);var $element=$(callerElement).parents('.ajax_block_product').find('a.product_image img,a.product_img_link img');if(!$element.length)
|
||||||
|
$element=$('#bigpic');var $picture=$element.clone();var pictureOffsetOriginal=$element.offset();pictureOffsetOriginal.right=$(window).innerWidth()-pictureOffsetOriginal.left-$element.width();if($picture.length)
|
||||||
|
{$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right});}
|
||||||
|
if(typeof(contentOnly)!='undefined'){var $contentOnly=contentOnly;}
|
||||||
|
var pictureOffset=$picture.offset();if(($contentOnly&&$contentOnly!=true)||!$contentOnly){var cartBlock=$('#cart_block');if(!$('#cart_block')[0]||!$('#cart_block').offset().top||!$('#cart_block').offset().left)
|
||||||
|
cartBlock=$('#shopping_cart');var cartBlockOffset=cartBlock.offset();cartBlockOffset.right=$(window).innerWidth()-cartBlockOffset.left-cartBlock.width();}
|
||||||
|
if(cartBlockOffset!=undefined&&$picture.length&&(($contentOnly&&$contentOnly!=true)||!$contentOnly))
|
||||||
|
{$picture.appendTo('body');$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right,zIndex:4242}).animate({width:$element.attr('width')*0.66,height:$element.attr('height')*0.66,opacity:0.2,top:cartBlockOffset.top+30,right:cartBlockOffset.right+15},1000).fadeOut(100,function(){ajaxCart.updateCartInformation(jsonData,addedFromProductPage);$(this).remove();if(!jsonData.hasError)
|
||||||
|
{$('.crossseling').html(jsonData.crossSelling)
|
||||||
|
$(jsonData.products).each(function(){if(this.id!=undefined&&this.id==parseInt(idProduct))
|
||||||
|
ajaxCart.updateLayer(this);});}});}
|
||||||
|
else if($contentOnly&&$contentOnly!=false){window.parent.ajaxCart.updateCartInformation(jsonData,addedFromProductPage);ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}
|
||||||
|
else{ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}},error:function(XMLHttpRequest,textStatus,errorThrown)
|
||||||
|
{alert("Impossible to add the product to the cart.\n\ntextStatus: '"+textStatus+"'\nerrorThrown: '"+errorThrown+"'\nresponseText:\n"+XMLHttpRequest.responseText);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$(callerElement).removeAttr('disabled');}});},remove:function(idProduct,idCombination,customizationId,idAddressDelivery){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&delete=1&id_product='+idProduct+'&ipa='+((idCombination!=null&&parseInt(idCombination))?idCombination:'')+((customizationId&&customizationId!=null)?'&id_customization='+customizationId:'')+'&id_address_delivery='+idAddressDelivery+'&token='+static_token+'&ajax=true',success:function(jsonData){ajaxCart.updateCart(jsonData);if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery);},error:function(){alert('ERROR: unable to delete the product');}});},hideOldProducts:function(jsonData){if($('#cart_block_list dl.products').length>0)
|
||||||
|
{var removedProductId=null;var removedProductData=null;var removedProductDomId=null;$('#cart_block_list dl.products dt').each(function(){var domIdProduct=$(this).attr('id');var firstCut=domIdProduct.replace('cart_block_product_','');var ids=firstCut.split('_');var stayInTheCart=false;for(aProduct in jsonData.products)
|
||||||
|
{if(jsonData.products[aProduct]['id']==ids[0]&&(!ids[1]||jsonData.products[aProduct]['idCombination']==ids[1]))
|
||||||
|
{stayInTheCart=true;ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct],domIdProduct);}}
|
||||||
|
if(!stayInTheCart)
|
||||||
|
{removedProductId=$(this).attr('id');if(removedProductId!=null)
|
||||||
|
{var firstCut=removedProductId.replace('cart_block_product_','');var ids=firstCut.split('_');$('#'+removedProductId).addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow',function(){$(this).remove();if($('#cart_block dl.products dt').length==0)
|
||||||
|
{$("#cart_block").stop(true,true).slideUp(200);$('#cart_block_no_products:hidden').slideDown(450);$('#cart_block dl.products').remove();}});});$('#cart_block_combination_of_'+ids[0]+(ids[1]?'_'+ids[1]:'')+(ids[2]?'_'+ids[2]:'')).fadeTo('fast',0,function(){$(this).slideUp('fast',function(){$(this).remove();});});}}});}},hideOldProductCustomizations:function(product,domIdProduct)
|
||||||
|
{var customizationList=$('#customization_'+product['id']+'_'+product['idCombination']);if(customizationList.length>0)
|
||||||
|
{$(customizationList).find("li").each(function(){$(this).find("div").each(function(){var customizationDiv=$(this).attr('id');var tmp=customizationDiv.replace('deleteCustomizableProduct_','');var ids=tmp.split('_');if((parseInt(product.idCombination)==parseInt(ids[2]))&&!ajaxCart.doesCustomizationStillExist(product,ids[0]))
|
||||||
|
$('#'+customizationDiv).parent().addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow');$(this).remove();});});});}
|
||||||
|
var removeLinks=$('#'+domIdProduct).find('.ajax_cart_block_remove_link');if(!product.hasCustomizedDatas&&!removeLinks.length)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="'+baseUri+'?controller=cart&delete=1&id_product='+product['id']+'&ipa='+product['idCombination']+'&token='+static_token+'"> </a>');if(product.is_gift)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('');},doesCustomizationStillExist:function(product,customizationId)
|
||||||
|
{var exists=false;$(product.customizedDatas).each(function(){if(this.customizationId==customizationId)
|
||||||
|
{exists=true;return false;}});return(exists);},refreshVouchers:function(jsonData){if(typeof(jsonData.discounts)=='undefined'||jsonData.discounts.length==0)
|
||||||
|
$('#vouchers').hide();else
|
||||||
|
{$('#vouchers tbody').html('');for(i=0;i<jsonData.discounts.length;i++)
|
||||||
|
{if(parseFloat(jsonData.discounts[i].price_float)>0)
|
||||||
|
{var delete_link='';if(jsonData.discounts[i].code.length)
|
||||||
|
delete_link='<a class="delete_voucher" href="'+jsonData.discounts[i].link+'" title="'+delete_txt+'"><i class="icon-remove-sign"></i></a>';$('#vouchers tbody').append($('<tr class="bloc_cart_voucher" id="bloc_cart_voucher_'+jsonData.discounts[i].id+'">'
|
||||||
|
+' <td class="quantity">1x</td>'
|
||||||
|
+' <td class="name" title="'+jsonData.discounts[i].description+'">'+jsonData.discounts[i].name+'</td>'
|
||||||
|
+' <td class="price">-'+jsonData.discounts[i].price+'</td>'
|
||||||
|
+' <td class="delete">'+delete_link+'</td>'
|
||||||
|
+'</tr>'));}}
|
||||||
|
$('#vouchers').show();}},updateProductQuantity:function(product,quantity){$('#cart_block_product_'+product.id+'_'+(product.idCombination?product.idCombination:'0')+'_'+(product.idAddressDelivery?product.idAddressDelivery:'0')+' .quantity').fadeTo('fast',0,function(){$(this).text(quantity);$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1);});});});});});},displayNewProducts:function(jsonData){$(jsonData.products).each(function(){if(this.id!=undefined)
|
||||||
|
{if($('#cart_block dl.products').length==0)
|
||||||
|
{$('#cart_block_no_products').before('<dl class="products"></dl>');$('#cart_block_no_products').hide();}
|
||||||
|
var domIdProduct=this.id+'_'+(this.idCombination?this.idCombination:'0')+'_'+(this.idAddressDelivery?this.idAddressDelivery:'0');var domIdProductAttribute=this.id+'_'+(this.idCombination?this.idCombination:'0');if($('#cart_block_product_'+domIdProduct).length==0)
|
||||||
|
{var productId=parseInt(this.id);var productAttributeId=(this.hasAttributes?parseInt(this.attributes):0);var content='<dt class="unvisible" id="cart_block_product_'+domIdProduct+'">';content+='<a class="cart-images" href="'+this.link+'" title="'+this.name.substring(0,12)+'"><img src="'+this.image_cart+'" alt="'+this.name+'"></a>';var min=this.name.indexOf(';',10);var name=(this.name.length>12?this.name.substring(0,((min-10)<=7)?min:10)+'...':this.name);content+='<div class="cart-info"><div class="product-name"><a href="'+this.link+'" title="'+this.name+'" class="cart_block_product_name">'+name+'</a></div>';if(this.hasAttributes)
|
||||||
|
content+='<div class="product-atributes"><a href="'+this.link+'" title="'+this.name+'">'+this.attributes+'</a></div>';content+='<span class="quantity-formated"><span class="quantity">'+this.quantity+'</span>x </span>';if(typeof(freeProductTranslation)!='undefined')
|
||||||
|
content+='<span class="price">'+(parseFloat(this.price_float)>0?this.priceByLine:freeProductTranslation)+'</span></div>';if(typeof(this.is_gift)=='undefined'||this.is_gift==0)
|
||||||
|
content+='<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&token='+static_token+(this.hasAttributes?'&ipa='+parseInt(this.idCombination):'')+'"> </a></span>';else
|
||||||
|
content+='<span class="remove_link"></span>';content+='</dt>';if(this.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+domIdProduct+'" class="unvisible">';if(this.hasCustomizedDatas)
|
||||||
|
content+=ajaxCart.displayNewCustomizedDatas(this);if(this.hasAttributes)content+='</dd>';$('#cart_block dl.products').append(content);}
|
||||||
|
else
|
||||||
|
{var jsonProduct=this;if($.trim($('#cart_block_product_'+domIdProduct+' .quantity').html())!=jsonProduct.quantity||$.trim($('#cart_block_product_'+domIdProduct+' .price').html())!=jsonProduct.priceByLine)
|
||||||
|
{if(!this.is_gift)
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').text(jsonProduct.priceByLine);else
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').html(freeProductTranslation);ajaxCart.updateProductQuantity(jsonProduct,jsonProduct.quantity);if(jsonProduct.hasCustomizedDatas)
|
||||||
|
{customizationFormatedDatas=ajaxCart.displayNewCustomizedDatas(jsonProduct);if(!$('#customization_'+domIdProductAttribute).length)
|
||||||
|
{if(jsonProduct.hasAttributes)
|
||||||
|
$('#cart_block_combination_of_'+domIdProduct).append(customizationFormatedDatas);else
|
||||||
|
$('#cart_block dl.products').append(customizationFormatedDatas);}
|
||||||
|
else
|
||||||
|
{$('#customization_'+domIdProductAttribute).html('');$('#customization_'+domIdProductAttribute).append(customizationFormatedDatas);}}}}
|
||||||
|
$('#cart_block dl.products .unvisible').slideDown(450).removeClass('unvisible');var removeLinks=$('#cart_block_product_'+domIdProduct).find('a.ajax_cart_block_remove_link');if(this.hasCustomizedDatas&&removeLinks.length)
|
||||||
|
$(removeLinks).each(function(){$(this).remove();});}});},displayNewCustomizedDatas:function(product)
|
||||||
|
{var content='';var productId=parseInt(product.id);var productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);var hasAlreadyCustomizations=$('#customization_'+productId+'_'+productAttributeId).length;if(!hasAlreadyCustomizations)
|
||||||
|
{if(!product.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+productId+'" class="unvisible">';if($('#customization_'+productId+'_'+productAttributeId).val()==undefined)
|
||||||
|
content+='<ul class="cart_block_customizations" id="customization_'+productId+'_'+productAttributeId+'">';}
|
||||||
|
$(product.customizedDatas).each(function()
|
||||||
|
{var done=0;customizationId=parseInt(this.customizationId);productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);content+='<li name="customization"><div class="deleteCustomizableProduct" id="deleteCustomizableProduct_'+customizationId+'_'+productId+'_'+(productAttributeId?productAttributeId:'0')+'"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&ipa='+productAttributeId+'&id_customization='+customizationId+'&token='+static_token+'"></a></div><span class="quantity-formated"><span class="quantity">'+parseInt(this.quantity)+'</span>x</span>';$(this.datas).each(function(){if(this['type']==CUSTOMIZE_TEXTFIELD)
|
||||||
|
{$(this.datas).each(function(){if(this['index']==0)
|
||||||
|
{content+=' '+this.truncatedValue.replace(/<br \/>/g,' ');done=1;return false;}})}});if(!done)
|
||||||
|
content+=customizationIdMessage+customizationId;if(!hasAlreadyCustomizations)content+='</li>';if(customizationId)
|
||||||
|
{$('#uploadable_files li div.customizationUploadBrowse img').remove();$('#text_fields input').attr('value','');}});if(!hasAlreadyCustomizations)
|
||||||
|
{content+='</ul>';if(!product.hasAttributes)content+='</dd>';}
|
||||||
|
return(content);},updateLayer:function(product){$('#layer_cart_product_title').text(product.name);$('#layer_cart_product_attributes').text('');if(product.hasAttributes&&product.hasAttributes==true)
|
||||||
|
$('#layer_cart_product_attributes').html(product.attributes);$('#layer_cart_product_price').text(product.price);$('#layer_cart_product_quantity').text(product.quantity);$('.layer_cart_img').prop({'src':product.image,'alt':product.name,'title':product.name});var h=parseInt($(window).height());var s=parseInt($(window).scrollTop());var t=$('#layer_cart').outerHeight(true);if(t<h)
|
||||||
|
var n=parseInt(((h-t)/2)+s)+'px';$('.layer_cart_overlay').css('width','100%');$('.layer_cart_overlay').css('height','100%');$('.layer_cart_overlay').show();$('#layer_cart').css({'top':n}).fadeIn('fast');crossselling_serialScroll();},updateCart:function(jsonData){if(jsonData.hasError)
|
||||||
|
{var errors='';for(error in jsonData.errors)
|
||||||
|
if(error!='indexOf')
|
||||||
|
errors+=$('<div />').html(jsonData.errors[error]).text()+"\n";alert(errors);}
|
||||||
|
else
|
||||||
|
{ajaxCart.updateCartEverywhere(jsonData);ajaxCart.hideOldProducts(jsonData);ajaxCart.displayNewProducts(jsonData);ajaxCart.refreshVouchers(jsonData);$('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item');$('#cart_block .products dt:first').addClass('first_item');$('#cart_block .products dt:not(:first,:last)').addClass('item');$('#cart_block .products dt:last').addClass('last_item');ajaxCart.overrideButtonsInThePage();}},updateCartEverywhere:function(jsonData){$('.ajax_cart_total').text($.trim(jsonData.productTotal));if(parseFloat(jsonData.shippingCostFloat)>0||jsonData.nbTotalProducts<1)
|
||||||
|
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);else if(typeof(freeShippingTranslation)!='undefined')
|
||||||
|
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);$('.ajax_cart_tax_cost').text(jsonData.taxCost);$('.cart_block_wrapping_cost').text(jsonData.wrappingCost);$('.ajax_block_cart_total').text(jsonData.total);$('.ajax_block_products_total').text(jsonData.productTotal);$('.ajax_total_price_wt').text(jsonData.total_price_wt);if(parseFloat(jsonData.freeShippingFloat)>0)
|
||||||
|
{$('.ajax_cart_free_shipping').html(jsonData.freeShipping);$('.freeshipping').fadeIn(0);}
|
||||||
|
else if(parseFloat(jsonData.freeShippingFloat)==0)
|
||||||
|
$('.freeshipping').fadeOut(0);this.nb_total_products=jsonData.nbTotalProducts;if(parseInt(jsonData.nbTotalProducts)>0)
|
||||||
|
{$('.ajax_cart_no_product').hide();$('.ajax_cart_quantity').text(jsonData.nbTotalProducts);$('.ajax_cart_quantity').fadeIn('slow');$('.ajax_cart_total').fadeIn('slow');if(parseInt(jsonData.nbTotalProducts)>1)
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).hide();});$('.ajax_cart_product_txt_s').each(function(){$(this).show();});}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).show();});$('.ajax_cart_product_txt_s').each(function(){$(this).hide();});}}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){$(this).hide();});$('.ajax_cart_no_product').show('slow');}}};$(document).ready(function()
|
||||||
|
{$('#block_cart_collapse').click(function(){ajaxCart.collapse();});$('#block_cart_expand').click(function(){ajaxCart.expand();});ajaxCart.overrideButtonsInThePage();var cart_qty=0;var current_timestamp=parseInt(new Date().getTime()/1000);if(typeof $('.ajax_cart_quantity').html()=='undefined'||(typeof generated_date!='undefined'&&generated_date!=null&&(parseInt(generated_date)+30)<current_timestamp))
|
||||||
|
ajaxCart.refresh();else
|
||||||
|
cart_qty=parseInt($('.ajax_cart_quantity').html());var cart_block=new HoverWatcher('#cart_block');var shopping_cart=new HoverWatcher('#shopping_cart');$("#shopping_cart a:first").hover(function(){if(ajaxCart.nb_total_products>0||cart_qty>0)
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideDown(450);},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver()&&!cart_block.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$("#header_right #cart_block").hover(function(){},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$('.delete_voucher').live('click',function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},async:true,cache:false,url:$(this).attr('href')+'?rand='+new Date().getTime()});$(this).parent().parent().remove();if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
{if(typeof(updateAddressSelection)!='undefined')
|
||||||
|
updateAddressSelection();else
|
||||||
|
location.reload();}
|
||||||
|
return false;});$('#cart_navigation input').click(function(){$(this).attr('disabled',true).addClass('disabled');$(this).closest("form").get(0).submit();});$('#layer_cart .cross, #layer_cart .continue, .layer_cart_overlay').click(function(){$('.layer_cart_overlay').hide();$('#layer_cart').fadeOut('fast');return false;});});function HoverWatcher(selector){this.hovering=false;var self=this;this.isHoveringOver=function(){return self.hovering;}
|
||||||
|
$(selector).hover(function(){self.hovering=true;},function(){self.hovering=false;})}
|
||||||
|
function crossselling_serialScroll()
|
||||||
|
{$('#blockcart_caroucel').bxSlider({minSlides:2,maxSlides:4,slideWidth:178,slideMargin:20,moveSlides:1,infiniteLoop:false,hideControlOnEnd:true,pager:false});};;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}
|
||||||
|
break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}
|
||||||
|
break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}
|
||||||
|
break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}
|
||||||
|
if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}
|
||||||
|
$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])
|
||||||
|
cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)
|
||||||
|
return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}
|
||||||
|
v+=options.multipleSeparator;}
|
||||||
|
$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}
|
||||||
|
function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}
|
||||||
|
var currentValue=$input.val();if(!skipPrevCheck&¤tValue==previousValue)
|
||||||
|
return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)
|
||||||
|
currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value){return[""];}
|
||||||
|
var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))
|
||||||
|
result[i]=$.trim(value);});return result;}
|
||||||
|
function lastWord(value){if(!options.multiple)
|
||||||
|
return value;var words=trimWords(value);return words[words.length-1];}
|
||||||
|
function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}
|
||||||
|
else
|
||||||
|
$input.val("");}});}
|
||||||
|
if(wasVisible)
|
||||||
|
$.Autocompleter.Selection(input,input.value.length,input.value.length);};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)
|
||||||
|
term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}
|
||||||
|
return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)
|
||||||
|
s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}
|
||||||
|
if(!data[q]){length++;}
|
||||||
|
data[q]=value;}
|
||||||
|
function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)
|
||||||
|
continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])
|
||||||
|
stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}
|
||||||
|
setTimeout(populate,25);function flush(){data={};length=0;}
|
||||||
|
return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)
|
||||||
|
return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}
|
||||||
|
return csub;}else
|
||||||
|
if(data[q]){return data[q];}else
|
||||||
|
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}
|
||||||
|
return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)
|
||||||
|
return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)
|
||||||
|
element.css("width",options.width);needsInit=false;}
|
||||||
|
function target(event){var element=event.target;while(element&&element.tagName!="LI")
|
||||||
|
element=element.parentNode;if(!element)
|
||||||
|
return[];return element;}
|
||||||
|
function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}
|
||||||
|
function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}
|
||||||
|
function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])
|
||||||
|
continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)
|
||||||
|
continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}
|
||||||
|
listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}
|
||||||
|
if($.fn.bgiframe)
|
||||||
|
list.bgiframe();}
|
||||||
|
return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
|
||||||
|
field.focus();};})(jQuery);;$('document').ready(function(){$('#favoriteproducts_block_extra_add').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_add').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_remove').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_remove').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_added').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_added').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_removed').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_removed').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});});;function WishlistCart(id,action,id_product,id_product_attribute,quantity)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,cache:false,data:'action='+action+'&id_product='+id_product+'&quantity='+quantity+'&token='+static_token+'&id_product_attribute='+id_product_attribute,success:function(data)
|
||||||
|
{if(action=='add')
|
||||||
|
{if(isLoggedWishlist==true){alert('Adedd to wishlist')}
|
||||||
|
else{alert('You must be logged in to manage your wishlist.')}}
|
||||||
|
if($('#'+id).length!=0)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}}});}
|
||||||
|
function WishlistChangeDefault(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,data:'id_wishlist='+id_wishlist+'&token='+static_token,cache:false,success:function(data)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}});}
|
||||||
|
function WishlistBuyProduct(token,id_product,id_product_attribute,id_quantity,button,ajax)
|
||||||
|
{if(ajax)
|
||||||
|
ajaxCart.add(id_product,id_product_attribute,false,button,1,[token,id_quantity]);else
|
||||||
|
{$('#'+id_quantity).val(0);WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].method='POST';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].action=baseUri+'?controller=cart';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].elements['token'].value=static_token;document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].submit();}
|
||||||
|
return(true);}
|
||||||
|
function WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
{if($('#'+id_quantity).val()<=0)
|
||||||
|
return(false);$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/buywishlistproduct.php',data:'token='+token+'&static_token='+static_token+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute,async:true,cache:false,success:function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
{$('#'+id_quantity).val($('#'+id_quantity).val()-1);}}});return(true);}
|
||||||
|
function WishlistManage(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'id_wishlist='+id_wishlist+'&refresh='+false,cache:false,success:function(data)
|
||||||
|
{$('#'+id).hide();document.getElementById(id).innerHTML=data;$('#'+id).fadeIn('slow');}});}
|
||||||
|
function WishlistProductManage(id,action,id_wishlist,id_product,id_product_attribute,quantity,priority)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'action='+action+'&id_wishlist='+id_wishlist+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute+'&quantity='+quantity+'&priority='+priority+'&refresh='+true,cache:false,success:function(data)
|
||||||
|
{if(action=='delete')
|
||||||
|
$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');else if(action=='update')
|
||||||
|
{$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');$('#wlp_'+id_product+'_'+id_product_attribute).fadeIn('fast');}}});}
|
||||||
|
function WishlistDelete(id,id_wishlist,msg)
|
||||||
|
{var res=confirm(msg);if(res==false)
|
||||||
|
return(false);$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/mywishlist.php',cache:false,data:'deleted&id_wishlist='+id_wishlist,success:function(data)
|
||||||
|
{$('#'+id).fadeOut('slow');}});}
|
||||||
|
function WishlistVisibility(bought_class,id_button)
|
||||||
|
{if($('#hide'+id_button).css('display')=='none')
|
||||||
|
{$('.'+bought_class).slideDown('fast');$('#show'+id_button).hide();$('#hide'+id_button).css('display','block');}
|
||||||
|
else
|
||||||
|
{$('.'+bought_class).slideUp('fast');$('#hide'+id_button).hide();$('#show'+id_button).css('display','block');}}
|
||||||
|
function WishlistSend(id,id_wishlist,id_email)
|
||||||
|
{$.post(baseDir+'modules/blockwishlist/sendwishlist.php',{token:static_token,id_wishlist:id_wishlist,email1:$('#'+id_email+'1').val(),email2:$('#'+id_email+'2').val(),email3:$('#'+id_email+'3').val(),email4:$('#'+id_email+'4').val(),email5:$('#'+id_email+'5').val(),email6:$('#'+id_email+'6').val(),email7:$('#'+id_email+'7').val(),email8:$('#'+id_email+'8').val(),email9:$('#'+id_email+'9').val(),email10:$('#'+id_email+'10').val()},function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
WishlistVisibility(id,'hideSendWishlist');});};$(document).ready(function(){$('#crossselling_list_car').bxSlider({minSlides:2,maxSlides:6,slideWidth:178,slideMargin:20,pager:false,nextText:'',prevText:'',moveSlides:1,infiniteLoop:false,hideControlOnEnd:true});});;$(document).ready(function(){$('#bxslider1').bxSlider({minSlides:2,maxSlides:6,slideWidth:178,slideMargin:20,pager:false,nextText:'',prevText:'',moveSlides:1,infiniteLoop:false,hideControlOnEnd:true});});;function openBranch(jQueryElement,noAnimation){jQueryElement.addClass('OPEN').removeClass('CLOSE');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').show();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideDown();}
|
||||||
|
function closeBranch(jQueryElement,noAnimation){jQueryElement.addClass('CLOSE').removeClass('OPEN');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').hide();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideUp();}
|
||||||
|
function toggleBranch(jQueryElement,noAnimation){if(jQueryElement.hasClass('OPEN'))
|
||||||
|
closeBranch(jQueryElement,noAnimation);else
|
||||||
|
openBranch(jQueryElement,noAnimation);}
|
||||||
|
$(document).ready(function(){if(!$('ul.tree.dhtml').hasClass('dynamized'))
|
||||||
|
{$('ul.tree.dhtml ul').prev().before("<span class='grower OPEN'> </span>");$('ul.tree.dhtml ul li:last-child, ul.tree.dhtml li:last-child').addClass('last');$('ul.tree.dhtml span.grower.OPEN').addClass('CLOSE').removeClass('OPEN').parent().find('ul:first').hide();$('ul.tree.dhtml').show();$('ul.tree.dhtml .selected').parents().each(function(){if($(this).is('ul'))
|
||||||
|
toggleBranch($(this).prev().prev(),true);});toggleBranch($('ul.tree.dhtml .selected').prev(),true);$('ul.tree.dhtml span.grower').click(function(){toggleBranch($(this));});$('ul.tree.dhtml').addClass('dynamized');$('ul.tree.dhtml').removeClass('dhtml');}});;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
|
||||||
|
if(p==this){return false;}
|
||||||
|
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
|
||||||
|
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);;;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
|
||||||
|
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'fast',autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);jQuery(function(){jQuery('ul.sf-menu').superfish();});;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';4(w)(3($){$.Y.T=3(c){c=$.15({m:\'X U\',E:\'\',B:z,8:z},c||{});o d={};o e={t:3(n,a,b){2.6(n);$(a).D(\'.j\').A().l(b||\'x\')},6:3(n){$(d[n].7).O(\'.j\').u(\'9\').u(\'x\')},h:3(n){4(!$(d[n].5).Z(\'.m\')){$(d[n].5).D(\'.j\').A().l(\'9\')}},g:3(n,a){d[n].5=a;o b=$(a).L(\'a\').K();$(d[n].7).J(b);e.6(n);e.h(n);4(c.I)c.I.W(d[n].7,[b,a])}};2.V(3(i){o n=2.G;4(!d[n])d[n]={r:0};i=d[n].r;d[n].r++;4(i==0){c.8=$(2).S(\'p\')||c.8;d[n].7=$(\'<R Q="P" G="\'+n+\'" q=""\'+(c.8?\' p="p"\':\'\')+\'>\');$(2).C(d[n].7);4(c.8||c.B){}F{$(2).C($(\'<k y="m"><a s="\'+c.m+\'">\'+c.E+\'</a></k>\').H(3(){e.6(n);$(2).l(\'9\')}).v(3(){e.h(n);$(2).u(\'9\')}).g(3(){e.g(n,2)}))}};f=$(\'<k y="j"><a s="\'+(2.s||2.q)+\'">\'+2.q+\'</a></k>\');$(2).N(f);4(c.8){$(f).l(\'M\')}F{$(f).H(3(){e.6(n);e.t(n,2)}).v(3(){e.6(n);e.h(n)}).g(3(){e.g(n,2)})};4(2.14)d[n].5=f;$(2).13();4(i+1==2.12)e.h(n)});11(n 10 d)4(d[n].5){e.t(n,d[n].5,\'9\');$(d[n].7).J($(d[n].5).L(\'a\').K())}16 2}})(w);',62,69,'||this|function|if|currentElem|drain|valueElem|readOnly|star_on||||||eStar|click|reset||star|div|addClass|cancel||var|disabled|value|count|title|fill|removeClass|mouseout|jQuery|star_hover|class|false|andSelf|required|before|prevAll|cancelValue|else|name|mouseover|callback|val|text|children|star_readonly|after|siblings|hidden|type|input|attr|rating|Rating|each|apply|Cancel|fn|is|in|for|length|remove|checked|extend|return'.split('|'),0,{}));(function($){$.fn.textareaCount=function(options,fn){var defaults={maxCharacterSize:-1,originalStyle:'originalTextareaInfo',warningStyle:'warningTextareaInfo',warningNumber:20,displayFormat:'#input characters | #words words'};var options=$.extend(defaults,options);var container=$(this);$("<div class='charleft'> </div>").insertAfter(container);var charLeftCss={'width':container.width()};var charLeftInfo=getNextCharLeftInformation(container);charLeftInfo.addClass(options.originalStyle);charLeftInfo.css(charLeftCss);var numInput=0;var maxCharacters=options.maxCharacterSize;var numLeft=0;var numWords=0;container.bind('keyup',function(event){limitTextAreaByCharacterCount();}).bind('mouseover',function(event){setTimeout(function(){limitTextAreaByCharacterCount();},10);}).bind('paste',function(event){setTimeout(function(){limitTextAreaByCharacterCount();},10);});function limitTextAreaByCharacterCount(){charLeftInfo.html(countByCharacters());if(typeof fn!='undefined'){fn.call(this,getInfo());}
|
||||||
|
return true;}
|
||||||
|
function countByCharacters(){var content=container.val();var contentLength=content.length;if(options.maxCharacterSize>0){if(contentLength>=options.maxCharacterSize){content=content.substring(0,options.maxCharacterSize);}
|
||||||
|
var newlineCount=getNewlineCount(content);var systemmaxCharacterSize=options.maxCharacterSize-newlineCount;if(!isWin()){systemmaxCharacterSize=options.maxCharacterSize}
|
||||||
|
if(contentLength>systemmaxCharacterSize){var originalScrollTopPosition=this.scrollTop;container.val(content.substring(0,systemmaxCharacterSize));this.scrollTop=originalScrollTopPosition;}
|
||||||
|
charLeftInfo.removeClass(options.warningStyle);if(systemmaxCharacterSize-contentLength<=options.warningNumber){charLeftInfo.addClass(options.warningStyle);}
|
||||||
|
numInput=container.val().length+newlineCount;if(!isWin()){numInput=container.val().length;}
|
||||||
|
numWords=countWord(getCleanedWordString(container.val()));numLeft=maxCharacters-numInput;}else{var newlineCount=getNewlineCount(content);numInput=container.val().length+newlineCount;if(!isWin()){numInput=container.val().length;}
|
||||||
|
numWords=countWord(getCleanedWordString(container.val()));}
|
||||||
|
return formatDisplayInfo();}
|
||||||
|
function formatDisplayInfo(){var format=options.displayFormat;format=format.replace('#input',numInput);format=format.replace('#words',numWords);if(maxCharacters>0){format=format.replace('#max',maxCharacters);format=format.replace('#left',numLeft);}
|
||||||
|
return format;}
|
||||||
|
function getInfo(){var info={input:numInput,max:maxCharacters,left:numLeft,words:numWords};return info;}
|
||||||
|
function getNextCharLeftInformation(container){return container.next('.charleft');}
|
||||||
|
function isWin(){var strOS=navigator.appVersion;if(strOS.toLowerCase().indexOf('win')!=-1){return true;}
|
||||||
|
return false;}
|
||||||
|
function getNewlineCount(content){var newlineCount=0;for(var i=0;i<content.length;i++){if(content.charAt(i)=='\n'){newlineCount++;}}
|
||||||
|
return newlineCount;}
|
||||||
|
function getCleanedWordString(content){var fullStr=content+" ";var initial_whitespace_rExp=/^[^A-Za-z0-9]+/gi;var left_trimmedStr=fullStr.replace(initial_whitespace_rExp,"");var non_alphanumerics_rExp=rExp=/[^A-Za-z0-9]+/gi;var cleanedStr=left_trimmedStr.replace(non_alphanumerics_rExp," ");var splitString=cleanedStr.split(" ");return splitString;}
|
||||||
|
function countWord(cleanedWordString){var word_count=cleanedWordString.length-1;return word_count;}};})(jQuery);;$(function(){$('input[@type=radio].star').rating();$('.auto-submit-star').rating();$('.open-comment-form').fancybox({'hideOnContentClick':false});$('button.usefulness_btn').click(function(){var id_product_comment=$(this).data('id-product-comment');var is_usefull=$(this).data('is-usefull');var parent=$(this).parent();$.ajax({url:productcomments_controller_url+'?rand='+new Date().getTime(),data:{id_product_comment:id_product_comment,action:'comment_is_usefull',value:is_usefull},type:'POST',headers:{"cache-control":"no-cache"},success:function(result){parent.fadeOut('slow',function(){parent.remove();});}});});$('span.report_btn').click(function(){if(confirm(confirm_report_message))
|
||||||
|
{var idProductComment=$(this).data('id-product-comment');var parent=$(this).parent();$.ajax({url:productcomments_controller_url+'?rand='+new Date().getTime(),data:{id_product_comment:idProductComment,action:'report_abuse'},type:'POST',headers:{"cache-control":"no-cache"},success:function(result){parent.fadeOut('slow',function(){parent.remove();});}});}});$('#submitNewMessage').click(function(e){e.preventDefault();url_options=parseInt(productcomments_url_rewrite)?'?':'&';$.ajax({url:productcomments_controller_url+url_options+'action=add_comment&secure_key='+secure_key+'&rand='+new Date().getTime(),data:$('#id_new_comment_form').serialize(),type:'POST',headers:{"cache-control":"no-cache"},dataType:"json",success:function(data){if(data.result)
|
||||||
|
{$.fancybox.close();var buttons={};buttons[productcomment_ok]="productcommentRefreshPage";fancyChooseBox(moderation_active?productcomment_added_moderation:productcomment_added,productcomment_title,buttons);}
|
||||||
|
else
|
||||||
|
{$('#new_comment_form_error ul').html('');$.each(data.errors,function(index,value){$('#new_comment_form_error ul').append('<li>'+value+'</li>');});$('#new_comment_form_error').slideDown('slow');}}});return false;});});function productcommentRefreshPage(){window.location.reload();};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockcart/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockuserinfo/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktags/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocksearch/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocknewsletter/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockwishlist/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/productcomments/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/crossselling/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktopmenu/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);html{min-height:100%}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,blockquote,th,td{margin:0;padding:0}del,ins{text-decoration:none}caption,th{text-align:left}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}ul,ol{list-style-type:none}a{cursor:pointer}a:hover{text-decoration:none}@media only screen and (min-width:1200px){.container{padding-left:0;padding-right:0}}body{min-width:320px;height:100%;background:#333333;line-height:18px;font-size:13px}body.content_only{background:none}textarea{resize:none}#header{z-index:10}.columns-container{background:#fff}#columns{z-index:1;padding-bottom:50px}#center_column .page_product_box h3{color:#555454;text-transform:uppercase;font-family:"Open Sans",sans-serif;font-weight:600;font-size:18px;line-height:20px;padding:14px 20px 17px;margin:0 0 20px;position:relative;border:1px solid #d6d4d4;border-bottom:none;background:#fbfbfb}a,a:focus,a:active{text-decoration:none;outline:none}p.info-title{font-weight:bold;color:#333;margin-bottom:25px}p.info-account{margin:-4px 0 24px 0}.dark{color:#333}.main-page-indent{margin-bottom:30px}.alert{font-weight:bold}.alert ul,.alert ol{padding-left:15px;margin-left:27px}.alert ul li,.alert ol li{list-style-type:decimal;font-weight:normal}.alert.alert-success{text-shadow:1px 1px rgba(0,0,0,0)}.alert.alert-success:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px}.alert.alert-danger{text-shadow:1px 1px rgba(0,0,0,0)}.alert.alert-danger:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px;float:left}.required sup{color:#f13340;font-size:13px;font-weight:bold;top:0}.unvisible{display:none}label{color:#333}.checkbox{line-height:16px}.checkbox label{color:#777777}.close{opacity:1}.close:hover{opacity:1}input.button_mini,input.button_small,input.button,input.button_large,input.button_mini_disabled,input.button_small_disabled,input.button_disabled,input.button_large_disabled,input.exclusive_mini,input.exclusive_small,input.exclusive,input.exclusive_large,input.exclusive_mini_disabled,input.exclusive_small_disabled,input.exclusive_disabled,input.exclusive_large_disabled,a.button_mini,a.button_small,a.button,a.button_large,a.exclusive_mini,a.exclusive_small,a.exclusive,a.exclusive_large,sLine truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockcart/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockuserinfo/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktags/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocksearch/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocknewsletter/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockwishlist/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/productcomments/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/crossselling/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktopmenu/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);html{min-height:100%}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,blockquote,th,td{margin:0;padding:0}del,ins{text-decoration:none}caption,th{text-align:left}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}ul,ol{list-style-type:none}a{cursor:pointer}a:hover{text-decoration:none}@media only screen and (min-width:1200px){.container{padding-left:0;padding-right:0}}body{min-width:320px;height:100%;background:#333333;line-height:18px;font-size:13px}body.content_only{background:none}textarea{resize:none}#header{z-index:10}.columns-container{background:#fff}#columns{z-index:1;padding-bottom:50px}#center_column .page_product_box h3{color:#555454;text-transform:uppercase;font-family:"Open Sans",sans-serif;font-weight:600;font-size:18px;line-height:20px;padding:14px 20px 17px;margin:0 0 20px;position:relative;border:1px solid #d6d4d4;border-bottom:none;background:#fbfbfb}a,a:focus,a:active{text-decoration:none;outline:none}p.info-title{font-weight:bold;color:#333;margin-bottom:25px}p.info-account{margin:-4px 0 24px 0}.dark{color:#333}.main-page-indent{margin-bottom:30px}.alert{font-weight:bold}.alert ul,.alert ol{padding-left:15px;margin-left:27px}.alert ul li,.alert ol li{list-style-type:decimal;font-weight:normal}.alert.alert-success{text-shadow:1px 1px rgba(0,0,0,0.1)}.alert.alert-success:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px}.alert.alert-danger{text-shadow:1px 1px rgba(0,0,0,0.1)}.alert.alert-danger:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px;float:left}.required sup{color:#f13340;font-size:13px;font-weight:bold;top:0}.unvisible{display:none}label{color:#333}.checkbox{line-height:16px}.checkbox label{color:#777777}.close{opacity:1}.close:hover{opacity:1}input.button_mini,input.button_small,input.button,input.button_large,input.button_mini_disabled,input.button_small_disabled,input.button_disabled,input.button_large_disabled,input.exclusive_mini,input.exclusive_small,input.exclusive,input.exclusive_large,input.exclusive_mini_disabled,input.exclusive_small_disabled,input.exclusive_disabled,input.exclusive_large_disabled,a.button_mini,a.button_small,a.button,a.button_large,a.exclusive_mini,a.exclusive_small,a.exclusive,a.exclusive_larLine truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockcart/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockuserinfo/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktags/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocksearch/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocknewsletter/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockwishlist/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/productcomments/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/crossselling/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktopmenu/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);html{min-height:100%}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,blockquote,th,td{margin:0;padding:0}del,ins{text-decoration:none}caption,th{text-align:left}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}ul,ol{list-style-type:none}a{cursor:pointer}a:hover{text-decoration:none}@media only screen and (min-width:1200px){.container{padding-left:0;padding-right:0}}body{min-width:320px;height:100%;background:#333333;line-height:18px;font-size:13px}body.content_only{background:none}textarea{resize:none}#header{z-index:10}.columns-container{background:#fff}#columns{z-index:1;padding-bottom:50px}#center_column .page_product_box h3{color:#555454;text-transform:uppercase;font-family:"Open Sans",sans-serif;font-weight:600;font-size:18px;line-height:20px;padding:14px 20px 17px;margin:0 0 20px;position:relative;border:1px solid #d6d4d4;border-bottom:none;background:#fbfbfb}a,a:focus,a:active{text-decoration:none;outline:none}p.info-title{font-weight:bold;color:#333;margin-bottom:25px}p.info-account{margin:-4px 0 24px 0}.dark{color:#333}.main-page-indent{margin-bottom:30px}.alert{font-weight:bold}.alert ul,.alert ol{padding-left:15px;margin-left:27px}.alert ul li,.alert ol li{list-style-type:decimal;font-weight:normal}.alert.alert-success{text-shadow:1px 1px rgba(0,0,0,0)}.alert.alert-success:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px}.alert.alert-danger{text-shadow:1px 1px rgba(0,0,0,0)}.alert.alert-danger:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px;float:left}.required sup{color:#f13340;font-size:13px;font-weight:bold;top:0}.unvisible{display:none}label{color:#333}.checkbox{line-height:16px}.checkbox label{color:#777777}.close{opacity:1}.close:hover{opacity:1}input.button_mini,input.button_small,input.button,input.button_large,input.button_mini_disabled,input.button_small_disabled,input.button_disabled,input.button_large_disabled,input.exclusive_mini,input.exclusive_small,input.exclusive,input.exclusive_large,input.exclusive_mini_disabled,input.exclusive_small_disabled,input.exclusive_disabled,input.exclusive_large_disabled,a.button_mini,a.button_small,a.button,a.button_large,a.exclusive_mini,a.exclusive_small,a.exclusive,a.exclusive_large,span.button_mini,span.button_small,span.button,span.button_large,span.exclusive_mini,span.exclusive_small,span.exclusive,span.exclusive_large,span.exclusive_large_disabled{position:relative;display:iLine truncated
|
||||||
@@ -0,0 +1,592 @@
|
|||||||
|
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
|
||||||
|
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="stringLine truncated
|
||||||
|
/*!
|
||||||
|
* jQuery Migrate - v1.2.1 - 2013-05-08
|
||||||
|
* https://github.com/jquery/jquery-migrate
|
||||||
|
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
|
||||||
|
*/
|
||||||
|
(function(jQuery,window,undefined){jQuery.migrateMute=true;var warnedAbout={};jQuery.migrateWarnings=[];if(!jQuery.migrateMute&&window.console&&window.console.log){window.console.log("JQMIGRATE: Logging is active");}
|
||||||
|
if(jQuery.migrateTrace===undefined){jQuery.migrateTrace=true;}
|
||||||
|
jQuery.migrateReset=function(){warnedAbout={};jQuery.migrateWarnings.length=0;};function migrateWarn(msg){var console=window.console;if(!warnedAbout[msg]){warnedAbout[msg]=true;jQuery.migrateWarnings.push(msg);if(console&&console.warn&&!jQuery.migrateMute){console.warn("JQMIGRATE: "+msg);if(jQuery.migrateTrace&&console.trace){console.trace();}}}}
|
||||||
|
function migrateWarnProp(obj,prop,value,msg){if(Object.defineProperty){try{Object.defineProperty(obj,prop,{configurable:true,enumerable:true,get:function(){migrateWarn(msg);return value;},set:function(newValue){migrateWarn(msg);value=newValue;}});return;}catch(err){}}
|
||||||
|
jQuery._definePropertyBroken=true;obj[prop]=value;}
|
||||||
|
if(document.compatMode==="BackCompat"){migrateWarn("jQuery is not compatible with Quirks Mode");}
|
||||||
|
var attrFn=jQuery("<input/>",{size:1}).attr("size")&&jQuery.attrFn,oldAttr=jQuery.attr,valueAttrGet=jQuery.attrHooks.value&&jQuery.attrHooks.value.get||function(){return null;},valueAttrSet=jQuery.attrHooks.value&&jQuery.attrHooks.value.set||function(){return undefined;},rnoType=/^(?:input|button)$/i,rnoAttrNodeType=/^[238]$/,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ruseDefault=/^(?:checked|selected)$/i;migrateWarnProp(jQuery,"attrFn",attrFn||{},"jQuery.attrFn is deprecated");jQuery.attr=function(elem,name,value,pass){var lowerName=name.toLowerCase(),nType=elem&&elem.nodeType;if(pass){if(oldAttr.length<4){migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");}
|
||||||
|
if(elem&&!rnoAttrNodeType.test(nType)&&(attrFn?name in attrFn:jQuery.isFunction(jQuery.fn[name]))){return jQuery(elem)[name](value);}}
|
||||||
|
if(name==="type"&&value!==undefined&&rnoType.test(elem.nodeName)&&elem.parentNode){migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");}
|
||||||
|
if(!jQuery.attrHooks[lowerName]&&rboolean.test(lowerName)){jQuery.attrHooks[lowerName]={get:function(elem,name){var attrNode,property=jQuery.prop(elem,name);return property===true||typeof property!=="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==false?name.toLowerCase():undefined;},set:function(elem,value,name){var propName;if(value===false){jQuery.removeAttr(elem,name);}else{propName=jQuery.propFix[name]||name;if(propName in elem){elem[propName]=true;}
|
||||||
|
elem.setAttribute(name,name.toLowerCase());}
|
||||||
|
return name;}};if(ruseDefault.test(lowerName)){migrateWarn("jQuery.fn.attr('"+lowerName+"') may use property instead of attribute");}}
|
||||||
|
return oldAttr.call(jQuery,elem,name,value);};jQuery.attrHooks.value={get:function(elem,name){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrGet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value') no longer gets properties");}
|
||||||
|
return name in elem?elem.value:null;},set:function(elem,value){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrSet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");}
|
||||||
|
elem.value=value;}};var matched,browser,oldInit=jQuery.fn.init,oldParseJSON=jQuery.parseJSON,rquickExpr=/^([^<]*)(<[\w\W]+>)([^>]*)$/;jQuery.fn.init=function(selector,context,rootjQuery){var match;if(selector&&typeof selector==="string"&&!jQuery.isPlainObject(context)&&(match=rquickExpr.exec(jQuery.trim(selector)))&&match[0]){if(selector.charAt(0)!=="<"){migrateWarn("$(html) HTML strings must start with '<' character");}
|
||||||
|
if(match[3]){migrateWarn("$(html) HTML text after last tag is ignored");}
|
||||||
|
if(match[0].charAt(0)==="#"){migrateWarn("HTML string cannot start with a '#' character");jQuery.error("JQMIGRATE: Invalid selector string (XSS)");}
|
||||||
|
if(context&&context.context){context=context.context;}
|
||||||
|
if(jQuery.parseHTML){return oldInit.call(this,jQuery.parseHTML(match[2],context,true),context,rootjQuery);}}
|
||||||
|
return oldInit.apply(this,arguments);};jQuery.fn.init.prototype=jQuery.fn;jQuery.parseJSON=function(json){if(!json&&json!==null){migrateWarn("jQuery.parseJSON requires a valid JSON string");return null;}
|
||||||
|
return oldParseJSON.apply(this,arguments);};jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};};if(!jQuery.browser){matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;}
|
||||||
|
if(browser.chrome){browser.webkit=true;}else if(browser.webkit){browser.safari=true;}
|
||||||
|
jQuery.browser=browser;}
|
||||||
|
migrateWarnProp(jQuery,"browser",jQuery.browser,"jQuery.browser is deprecated");jQuery.sub=function(){function jQuerySub(selector,context){return new jQuerySub.fn.init(selector,context);}
|
||||||
|
jQuery.extend(true,jQuerySub,this);jQuerySub.superclass=this;jQuerySub.fn=jQuerySub.prototype=this();jQuerySub.fn.constructor=jQuerySub;jQuerySub.sub=this.sub;jQuerySub.fn.init=function init(selector,context){if(context&&context instanceof jQuery&&!(context instanceof jQuerySub)){context=jQuerySub(context);}
|
||||||
|
return jQuery.fn.init.call(this,selector,context,rootjQuerySub);};jQuerySub.fn.init.prototype=jQuerySub.fn;var rootjQuerySub=jQuerySub(document);migrateWarn("jQuery.sub() is deprecated");return jQuerySub;};jQuery.ajaxSetup({converters:{"text json":jQuery.parseJSON}});var oldFnData=jQuery.fn.data;jQuery.fn.data=function(name){var ret,evt,elem=this[0];if(elem&&name==="events"&&arguments.length===1){ret=jQuery.data(elem,name);evt=jQuery._data(elem,name);if((ret===undefined||ret===evt)&&evt!==undefined){migrateWarn("Use of jQuery.fn.data('events') is deprecated");return evt;}}
|
||||||
|
return oldFnData.apply(this,arguments);};var rscriptType=/\/(java|ecma)script/i,oldSelf=jQuery.fn.andSelf||jQuery.fn.addBack;jQuery.fn.andSelf=function(){migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");return oldSelf.apply(this,arguments);};if(!jQuery.clean){jQuery.clean=function(elems,context,fragment,scripts){context=context||document;context=!context.nodeType&&context[0]||context;context=context.ownerDocument||context;migrateWarn("jQuery.clean() is deprecated");var i,elem,handleScript,jsTags,ret=[];jQuery.merge(ret,jQuery.buildFragment(elems,context).childNodes);if(fragment){handleScript=function(elem){if(!elem.type||rscriptType.test(elem.type)){return scripts?scripts.push(elem.parentNode?elem.parentNode.removeChild(elem):elem):fragment.appendChild(elem);}};for(i=0;(elem=ret[i])!=null;i++){if(!(jQuery.nodeName(elem,"script")&&handleScript(elem))){fragment.appendChild(elem);if(typeof elem.getElementsByTagName!=="undefined"){jsTags=jQuery.grep(jQuery.merge([],elem.getElementsByTagName("script")),handleScript);ret.splice.apply(ret,[i+1,0].concat(jsTags));i+=jsTags.length;}}}}
|
||||||
|
return ret;};}
|
||||||
|
var eventAdd=jQuery.event.add,eventRemove=jQuery.event.remove,eventTrigger=jQuery.event.trigger,oldToggle=jQuery.fn.toggle,oldLive=jQuery.fn.live,oldDie=jQuery.fn.die,ajaxEvents="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",rajaxEvent=new RegExp("\\b(?:"+ajaxEvents+")\\b"),rhoverHack=/(?:^|\s)hover(\.\S+|)\b/,hoverHack=function(events){if(typeof(events)!=="string"||jQuery.event.special.hover){return events;}
|
||||||
|
if(rhoverHack.test(events)){migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");}
|
||||||
|
return events&&events.replace(rhoverHack,"mouseenter$1 mouseleave$1");};if(jQuery.event.props&&jQuery.event.props[0]!=="attrChange"){jQuery.event.props.unshift("attrChange","attrName","relatedNode","srcElement");}
|
||||||
|
if(jQuery.event.dispatch){migrateWarnProp(jQuery.event,"handle",jQuery.event.dispatch,"jQuery.event.handle is undocumented and deprecated");}
|
||||||
|
jQuery.event.add=function(elem,types,handler,data,selector){if(elem!==document&&rajaxEvent.test(types)){migrateWarn("AJAX events should be attached to document: "+types);}
|
||||||
|
eventAdd.call(this,elem,hoverHack(types||""),handler,data,selector);};jQuery.event.remove=function(elem,types,handler,selector,mappedTypes){eventRemove.call(this,elem,hoverHack(types)||"",handler,selector,mappedTypes);};jQuery.fn.error=function(){var args=Array.prototype.slice.call(arguments,0);migrateWarn("jQuery.fn.error() is deprecated");args.splice(0,0,"error");if(arguments.length){return this.bind.apply(this,args);}
|
||||||
|
this.triggerHandler.apply(this,args);return this;};jQuery.fn.toggle=function(fn,fn2){if(!jQuery.isFunction(fn)||!jQuery.isFunction(fn2)){return oldToggle.apply(this,arguments);}
|
||||||
|
migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");var args=arguments,guid=fn.guid||jQuery.guid++,i=0,toggler=function(event){var lastToggle=(jQuery._data(this,"lastToggle"+fn.guid)||0)%i;jQuery._data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;};toggler.guid=guid;while(i<args.length){args[i++].guid=guid;}
|
||||||
|
return this.click(toggler);};jQuery.fn.live=function(types,data,fn){migrateWarn("jQuery.fn.live() is deprecated");if(oldLive){return oldLive.apply(this,arguments);}
|
||||||
|
jQuery(this.context).on(types,this.selector,data,fn);return this;};jQuery.fn.die=function(types,fn){migrateWarn("jQuery.fn.die() is deprecated");if(oldDie){return oldDie.apply(this,arguments);}
|
||||||
|
jQuery(this.context).off(types,this.selector||"**",fn);return this;};jQuery.event.trigger=function(event,data,elem,onlyHandlers){if(!elem&&!rajaxEvent.test(event)){migrateWarn("Global events are undocumented and deprecated");}
|
||||||
|
return eventTrigger.call(this,event,data,elem||document,onlyHandlers);};jQuery.each(ajaxEvents.split("|"),function(_,name){jQuery.event.special[name]={setup:function(){var elem=this;if(elem!==document){jQuery.event.add(document,name+"."+jQuery.guid,function(){jQuery.event.trigger(name,null,elem,true);});jQuery._data(this,name,jQuery.guid++);}
|
||||||
|
return false;},teardown:function(){if(this!==document){jQuery.event.remove(document,name+"."+jQuery._data(this,name));}
|
||||||
|
return false;}};});})(jQuery,window);;jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;function formatedNumberToFloat(price,currencyFormat,currencySign)
|
||||||
|
{price=price.replace(currencySign,'');if(currencyFormat==1)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));else if(currencyFormat==2)
|
||||||
|
return parseFloat(price.replace(' ','').replace(',','.'));else if(currencyFormat==3)
|
||||||
|
return parseFloat(price.replace('.','').replace(' ','').replace(',','.'));else if(currencyFormat==4)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));return price;}
|
||||||
|
function formatNumber(value,numberOfDecimal,thousenSeparator,virgule)
|
||||||
|
{value=value.toFixed(numberOfDecimal);var val_string=value+'';var tmp=val_string.split('.');var abs_val_string=(tmp.length==2)?tmp[0]:val_string;var deci_string=('0.'+(tmp.length==2?tmp[1]:0)).substr(2);var nb=abs_val_string.length;for(var i=1;i<4;i++)
|
||||||
|
if(value>=Math.pow(10,(3*i)))
|
||||||
|
abs_val_string=abs_val_string.substring(0,nb-(3*i))+thousenSeparator+abs_val_string.substring(nb-(3*i));if(parseInt(numberOfDecimal)==0)
|
||||||
|
return abs_val_string;return abs_val_string+virgule+(deci_string>0?deci_string:'00');}
|
||||||
|
function formatCurrency(price,currencyFormat,currencySign,currencyBlank)
|
||||||
|
{blank='';price=parseFloat(price.toFixed(6));price=ps_round(price,priceDisplayPrecision);if(currencyBlank>0)
|
||||||
|
blank=' ';if(currencyFormat==1)
|
||||||
|
return currencySign+blank+formatNumber(price,priceDisplayPrecision,',','.');if(currencyFormat==2)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ',',')+blank+currencySign);if(currencyFormat==3)
|
||||||
|
return(currencySign+blank+formatNumber(price,priceDisplayPrecision,'.',','));if(currencyFormat==4)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,',','.')+blank+currencySign);if(currencyFormat==5)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ','.')+blank+currencySign);return price;}
|
||||||
|
function ps_round(value,precision)
|
||||||
|
{if(typeof(roundMode)=='undefined')
|
||||||
|
roundMode=2;if(typeof(precision)=='undefined')
|
||||||
|
precision=2;method=roundMode;if(method==0)
|
||||||
|
return ceilf(value,precision);else if(method==1)
|
||||||
|
return floorf(value,precision);precisionFactor=precision==0?1:Math.pow(10,precision);return Math.round(value*precisionFactor)/precisionFactor;}
|
||||||
|
function autoUrl(name,dest)
|
||||||
|
{var loc;var id_list;id_list=document.getElementById(name);loc=id_list.options[id_list.selectedIndex].value;if(loc!=0)
|
||||||
|
location.href=dest+loc;return;}
|
||||||
|
function autoUrlNoList(name,dest)
|
||||||
|
{var loc;loc=document.getElementById(name).checked;location.href=dest+(loc==true?1:0);return;}
|
||||||
|
function toggle(e,show)
|
||||||
|
{e.style.display=show?'':'none';}
|
||||||
|
function toggleMultiple(tab)
|
||||||
|
{var len=tab.length;for(var i=0;i<len;i++)
|
||||||
|
if(tab[i].style)
|
||||||
|
toggle(tab[i],tab[i].style.display=='none');}
|
||||||
|
function showElemFromSelect(select_id,elem_id)
|
||||||
|
{var select=document.getElementById(select_id);for(var i=0;i<select.length;++i)
|
||||||
|
{var elem=document.getElementById(elem_id+select.options[i].value);if(elem!=null)
|
||||||
|
toggle(elem,i==select.selectedIndex);}}
|
||||||
|
function openCloseAllDiv(name,option)
|
||||||
|
{var tab=$('*[name='+name+']');for(var i=0;i<tab.length;++i)
|
||||||
|
toggle(tab[i],option);}
|
||||||
|
function toggleElemValue(id_button,text1,text2)
|
||||||
|
{var obj=document.getElementById(id_button);if(obj)
|
||||||
|
obj.value=((!obj.value||obj.value==text2)?text1:text2);}
|
||||||
|
function addBookmark(url,title)
|
||||||
|
{if(window.sidebar)
|
||||||
|
return window.sidebar.addPanel(title,url,"");else if(window.external&&('AddFavorite'in window.external))
|
||||||
|
return window.external.AddFavorite(url,title);else if(window.opera&&window.print)
|
||||||
|
return true;return true;}
|
||||||
|
function writeBookmarkLink(url,title,text,img)
|
||||||
|
{var insert='';if(img)
|
||||||
|
insert=writeBookmarkLinkObject(url,title,'<img src="'+img+'" alt="'+escape(text)+'" title="'+removeQuotes(text)+'" />')+' ';insert+=writeBookmarkLinkObject(url,title,text);if(window.sidebar||window.opera&&window.print||(window.external&&('AddFavorite'in window.external)))
|
||||||
|
document.write(insert);}
|
||||||
|
function writeBookmarkLinkObject(url,title,insert)
|
||||||
|
{if(window.sidebar||window.external)
|
||||||
|
return('<a href="javascript:addBookmark(\''+escape(url)+'\', \''+removeQuotes(title)+'\')">'+insert+'</a>');else if(window.opera&&window.print)
|
||||||
|
return('<a rel="sidebar" href="'+escape(url)+'" title="'+removeQuotes(title)+'">'+insert+'</a>');return('');}
|
||||||
|
function checkCustomizations()
|
||||||
|
{var pattern=new RegExp(' ?filled ?');if(typeof customizationFields!='undefined')
|
||||||
|
for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{if(parseInt(customizationFields[i][1])==1&&($('#'+customizationFields[i][0]).html()==''||$('#'+customizationFields[i][0]).text()!=$('#'+customizationFields[i][0]).val())&&!pattern.test($('#'+customizationFields[i][0]).attr('class')))
|
||||||
|
return false;}
|
||||||
|
return true;}
|
||||||
|
function emptyCustomizations()
|
||||||
|
{if(typeof(customizationFields)=='undefined')return;$('.customization_block .success').fadeOut(function(){$(this).remove();});$('.customization_block .error').fadeOut(function(){$(this).remove();});for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{$('#'+customizationFields[i][0]).html('');$('#'+customizationFields[i][0]).val('');}}
|
||||||
|
function ceilf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.ceil(tmp)/precisionFactor;}
|
||||||
|
function floorf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.floor(tmp)/precisionFactor;}
|
||||||
|
function setCurrency(id_currency)
|
||||||
|
{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'index.php'+'?rand='+new Date().getTime(),data:'controller=change-currency&id_currency='+parseInt(id_currency),success:function(msg)
|
||||||
|
{location.reload(true);}});}
|
||||||
|
function isArrowKey(k_ev)
|
||||||
|
{var unicode=k_ev.keyCode?k_ev.keyCode:k_ev.charCode;if(unicode>=37&&unicode<=40)
|
||||||
|
return true;return false;}
|
||||||
|
function removeQuotes(value)
|
||||||
|
{value=value.replace(/\\"/g,'');value=value.replace(/"/g,'');value=value.replace(/\\'/g,'');value=value.replace(/'/g,'');return value;}
|
||||||
|
function sprintf(format)
|
||||||
|
{for(var i=1;i<arguments.length;i++)
|
||||||
|
format=format.replace(/%s/,arguments[i]);return format;}
|
||||||
|
function fancyMsgBox(msg,title)
|
||||||
|
{if(title)msg="<h2>"+title+"</h2><p>"+msg+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\"><input class=\"button\" type=\"button\" value=\"OK\" onclick=\"$.fancybox.close();\" /></p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
function fancyChooseBox(question,title,buttons,otherParams)
|
||||||
|
{var msg,funcName,action;if(title)msg="<h2>"+title+"</h2><p>"+question+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\">";var i=0;for(var caption in buttons){if(!buttons.hasOwnProperty(caption))continue;funcName=buttons[caption];if(typeof otherParams=='undefined')otherParams=0;otherParams=escape(JSON.stringify(otherParams));action=funcName?"$.fancybox.close();window['"+funcName+"'](JSON.parse(unescape('"+otherParams+"')), "+i+")":"$.fancybox.close()";msg+='<input class="button" style="margin-right: 5px" type="button" value="'+caption+'" onclick="'+action+'" />';i++;}
|
||||||
|
msg+="</p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
$().ready(function()
|
||||||
|
{$('form').submit(function()
|
||||||
|
{$(this).find('.hideOnSubmit').hide();});$('a._blank').attr('target','_blank');});;
|
||||||
|
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||||
|
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
||||||
|
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(Line truncated
|
||||||
|
$(document).ready(function(){quick_view();});;$('document').ready(function(){reloadProductComparison();});reloadProductComparison=function(){$('a.cmp_remove').click(function(){var idProduct=$(this).attr('rel').replace('ajax_id_product_','');$.ajax({url:'index.php?controller=products-comparison&ajax=1&action=remove&id_product='+idProduct,async:false,cache:false,success:function(){return true;}});});$('input:checkbox.comparator').click(function(){var idProduct=$(this).attr('value').replace('comparator_item_','');var checkbox=$(this);if(checkbox.is(':checked'))
|
||||||
|
{$.ajax({url:'index.php?controller=products-comparison&ajax=1&action=add&id_product='+idProduct,async:true,cache:false,success:function(data){if(data==='0')
|
||||||
|
{checkbox.attr('checked',false);alert(max_item);}},error:function(){checkbox.attr('checked',false);}});}
|
||||||
|
else
|
||||||
|
{$.ajax({url:'index.php?controller=products-comparison&ajax=1&action=remove&id_product='+idProduct,async:true,cache:false,success:function(data){if(data==='0')
|
||||||
|
checkbox.attr('checked',true);},error:function(){checkbox.attr('checked',true);}});}});};function PS_SE_HandleEvent()
|
||||||
|
{$(document).ready(function(){$('#id_country').change(function(){resetAjaxQueries();updateStateByIdCountry();});if(SE_RefreshMethod==0)
|
||||||
|
{$('#id_state').change(function(){resetAjaxQueries();updateCarriersList();});$('#zipcode').bind('keyup',function(e){if(e.keyCode=='13')
|
||||||
|
{resetAjaxQueries();updateCarriersList();}});}
|
||||||
|
$('#update_carriers_list').click(function(){updateCarriersList();});$('#carriercompare_submit').click(function(){resetAjaxQueries();saveSelection();return false;});updateStateByIdCountry();});}
|
||||||
|
function displayWaitingAjax(type,message)
|
||||||
|
{$('#SE_AjaxDisplay').find('p').html(message);$('#SE_AjaxDisplay').css('display',type);}
|
||||||
|
function updateStateByIdCountry()
|
||||||
|
{$('#id_state').children().remove();$('#availableCarriers').slideUp('fast');$('#states').slideUp('fast');displayWaitingAjax('block',SE_RefreshStateTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getStates&id_country='+$('#id_country').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(state in json)
|
||||||
|
{$('#id_state').append('<option value=\''+json[state].id_state+'\' '+(id_state==json[state].id_state?'selected="selected"':'')+'>'+json[state].name+'</option>');}
|
||||||
|
$('#states').slideDown('fast');}
|
||||||
|
if(SE_RefreshMethod==0)
|
||||||
|
updateCarriersList();displayWaitingAjax('none','');}});ajaxQueries.push(query);}
|
||||||
|
function updateCarriersList()
|
||||||
|
{$('#carriercompare_errors_list').children().remove();$('#availableCarriers').slideUp('normal',function(){$(this).find(('tbody')).children().remove();$('#noCarrier').slideUp('fast');displayWaitingAjax('block',SE_RetrievingInfoTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getCarriers&id_country='+$('#id_country').val()+'&id_state='+$('#id_state').val()+'&zipcode='+$('#zipcode').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(carrier in json)
|
||||||
|
{var html='<tr class="'+(carrier%2?'alternate_':'')+'item">'+'<td class="carrier_action">'+'<input type="radio" name="id_carrier" value="'+json[carrier].id_carrier+'" id="id_carrier'+json[carrier].id_carrier+'" '+(id_carrier==json[carrier].id_carrier?'checked="checked"':'')+'/>'+'</td>'+'<td class="carrier_name">'+'<label for="id_carrier'+json[carrier].id_carrier+'">'+
|
||||||
|
(json[carrier].img?'<img src="'+json[carrier].img+'" alt="'+json[carrier].name+'" />':json[carrier].name)+'</label>'+'</td>'+'<td class="carrier_infos">'+((json[carrier].delay!=null)?json[carrier].delay:'')+'</td>'+'<td class="carrier_price">';if(json[carrier].price)
|
||||||
|
{html+='<span class="price">'+(displayPrice==1?formatCurrency(json[carrier].price_tax_exc,currencyFormat,currencySign,currencyBlank):formatCurrency(json[carrier].price,currencyFormat,currencySign,currencyBlank))+'</span>';}
|
||||||
|
else
|
||||||
|
{html+=txtFree;}
|
||||||
|
html+='</td>'+'</tr>';$('#carriers_list').append(html);}
|
||||||
|
displayWaitingAjax('none','');$('#availableCarriers').slideDown();}
|
||||||
|
else
|
||||||
|
{displayWaitingAjax('none','');$('#noCarrier').slideDown();}}});ajaxQueries.push(query);});}
|
||||||
|
function saveSelection()
|
||||||
|
{$('#carriercompare_errors').slideUp();$('#carriercompare_errors_list').children().remove();displayWaitingAjax('block',SE_RedirectTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=saveSelection&'+$('#compare_shipping_form').serialize(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(error in json)
|
||||||
|
$('#carriercompare_errors_list').append('<li>'+json[error]+'</li>');$('#carriercompare_errors').slideDown();displayWaitingAjax('none','');}
|
||||||
|
else
|
||||||
|
{$('.SE_SubmitRefreshCard').fadeOut('fast');location.reload(true);}}});ajaxQueries.push(query);return false;}
|
||||||
|
var ajaxQueries=new Array();function resetAjaxQueries()
|
||||||
|
{for(i=0;i<ajaxQueries.length;++i)
|
||||||
|
ajaxQueries[i].abort();ajaxQueries=new Array();};if(typeof baseUri==="undefined"&&typeof baseDir!=="undefined")
|
||||||
|
baseUri=baseDir;var ajaxCart={nb_total_products:0,overrideButtonsInThePage:function(){$('.ajax_add_to_cart_button').unbind('click').click(function(){var idProduct=$(this).attr('rel').replace('nofollow','').replace('ajax_id_product_','');if($(this).attr('disabled')!='disabled')
|
||||||
|
ajaxCart.add(idProduct,null,false,this);return false;});$('#add_to_cart button').unbind('click').click(function(){ajaxCart.add($('#product_page_product_id').val(),$('#idCombination').val(),true,null,$('#quantity_wanted').val(),null);return false;});$('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){var customizationId=0;var productId=0;var productAttributeId=0;var customizableProductDiv=$($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]");if(customizableProductDiv&&$(customizableProductDiv).length)
|
||||||
|
{$(customizableProductDiv).each(function(){var ids=$(this).attr('id').split('_');if(typeof(ids[1])!='undefined')
|
||||||
|
{customizationId=parseInt(ids[1]);productId=parseInt(ids[2]);if(typeof(ids[3])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[3]);return false;}});}
|
||||||
|
if(!customizationId)
|
||||||
|
{var firstCut=$(this).parent().parent().attr('id').replace('cart_block_product_','');firstCut=firstCut.replace('deleteCustomizableProduct_','');ids=firstCut.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[1]);}
|
||||||
|
var idAddressDelivery=$(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1];ajaxCart.remove(productId,productAttributeId,customizationId,idAddressDelivery);return false;});},expand:function(){if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
{$('#cart_block_summary').slideUp(200,function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_list').slideDown({duration:450,complete:function(){$(this).addClass('expanded').removeClass('collapsed');}});});$('#block_cart_expand').fadeOut('slow',function(){$('#block_cart_collapse').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=expand'});}},refresh:function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&ajax=true&token='+static_token,success:function(jsonData)
|
||||||
|
{ajaxCart.updateCart(jsonData);}});},collapse:function(){if($('#cart_block_list').hasClass('expanded'))
|
||||||
|
{$('#cart_block_list').slideUp('slow',function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_summary').slideDown(450,function(){$(this).addClass('expanded').removeClass('collapsed');});});$('#block_cart_collapse').fadeOut('slow',function(){$('#block_cart_expand').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=collapse'+'&rand='+new Date().getTime()});}},updateCartInformation:function(jsonData,addedFromProductPage)
|
||||||
|
{ajaxCart.updateCart(jsonData);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$('.ajax_add_to_cart_button').removeAttr('disabled');},add:function(idProduct,idCombination,addedFromProductPage,callerElement,quantity,whishlist){if(addedFromProductPage&&!checkCustomizations())
|
||||||
|
{alert(fieldRequired);return;}
|
||||||
|
emptyCustomizations();if(addedFromProductPage)
|
||||||
|
{$('#add_to_cart button').attr('disabled',true).addClass('disabled');$('.filled').removeClass('filled');}
|
||||||
|
else
|
||||||
|
$(callerElement).attr('disabled',true);if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
this.expand();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&add=1&ajax=true&qty='+((quantity&&quantity!=null)?quantity:'1')+'&id_product='+idProduct+'&token='+static_token+((parseInt(idCombination)&&idCombination!=null)?'&ipa='+parseInt(idCombination):''),success:function(jsonData,textStatus,jqXHR)
|
||||||
|
{if(whishlist&&!jsonData.errors)
|
||||||
|
WishlistAddProductCart(whishlist[0],idProduct,idCombination,whishlist[1]);var $element=$(callerElement).parents('.ajax_block_product').find('a.product_image img,a.product_img_link img');if(!$element.length)
|
||||||
|
$element=$('#bigpic');var $picture=$element.clone();var pictureOffsetOriginal=$element.offset();pictureOffsetOriginal.right=$(window).innerWidth()-pictureOffsetOriginal.left-$element.width();if($picture.length)
|
||||||
|
{$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right});}
|
||||||
|
if(typeof(contentOnly)!='undefined'){var $contentOnly=contentOnly;}
|
||||||
|
var pictureOffset=$picture.offset();if(($contentOnly&&$contentOnly!=true)||!$contentOnly){var cartBlock=$('#cart_block');if(!$('#cart_block')[0]||!$('#cart_block').offset().top||!$('#cart_block').offset().left)
|
||||||
|
cartBlock=$('#shopping_cart');var cartBlockOffset=cartBlock.offset();cartBlockOffset.right=$(window).innerWidth()-cartBlockOffset.left-cartBlock.width();}
|
||||||
|
if(cartBlockOffset!=undefined&&$picture.length&&(($contentOnly&&$contentOnly!=true)||!$contentOnly))
|
||||||
|
{$picture.appendTo('body');$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right,zIndex:4242}).animate({width:$element.attr('width')*0.66,height:$element.attr('height')*0.66,opacity:0.2,top:cartBlockOffset.top+30,right:cartBlockOffset.right+15},1000).fadeOut(100,function(){ajaxCart.updateCartInformation(jsonData,addedFromProductPage);$(this).remove();if(!jsonData.hasError)
|
||||||
|
{$('.crossseling').html(jsonData.crossSelling)
|
||||||
|
$(jsonData.products).each(function(){if(this.id!=undefined&&this.id==parseInt(idProduct))
|
||||||
|
ajaxCart.updateLayer(this);});}});}
|
||||||
|
else if($contentOnly&&$contentOnly!=false){window.parent.ajaxCart.updateCartInformation(jsonData,addedFromProductPage);ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}
|
||||||
|
else{ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}},error:function(XMLHttpRequest,textStatus,errorThrown)
|
||||||
|
{alert("Impossible to add the product to the cart.\n\ntextStatus: '"+textStatus+"'\nerrorThrown: '"+errorThrown+"'\nresponseText:\n"+XMLHttpRequest.responseText);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$(callerElement).removeAttr('disabled');}});},remove:function(idProduct,idCombination,customizationId,idAddressDelivery){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&delete=1&id_product='+idProduct+'&ipa='+((idCombination!=null&&parseInt(idCombination))?idCombination:'')+((customizationId&&customizationId!=null)?'&id_customization='+customizationId:'')+'&id_address_delivery='+idAddressDelivery+'&token='+static_token+'&ajax=true',success:function(jsonData){ajaxCart.updateCart(jsonData);if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery);},error:function(){alert('ERROR: unable to delete the product');}});},hideOldProducts:function(jsonData){if($('#cart_block_list dl.products').length>0)
|
||||||
|
{var removedProductId=null;var removedProductData=null;var removedProductDomId=null;$('#cart_block_list dl.products dt').each(function(){var domIdProduct=$(this).attr('id');var firstCut=domIdProduct.replace('cart_block_product_','');var ids=firstCut.split('_');var stayInTheCart=false;for(aProduct in jsonData.products)
|
||||||
|
{if(jsonData.products[aProduct]['id']==ids[0]&&(!ids[1]||jsonData.products[aProduct]['idCombination']==ids[1]))
|
||||||
|
{stayInTheCart=true;ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct],domIdProduct);}}
|
||||||
|
if(!stayInTheCart)
|
||||||
|
{removedProductId=$(this).attr('id');if(removedProductId!=null)
|
||||||
|
{var firstCut=removedProductId.replace('cart_block_product_','');var ids=firstCut.split('_');$('#'+removedProductId).addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow',function(){$(this).remove();if($('#cart_block dl.products dt').length==0)
|
||||||
|
{$("#cart_block").stop(true,true).slideUp(200);$('#cart_block_no_products:hidden').slideDown(450);$('#cart_block dl.products').remove();}});});$('#cart_block_combination_of_'+ids[0]+(ids[1]?'_'+ids[1]:'')+(ids[2]?'_'+ids[2]:'')).fadeTo('fast',0,function(){$(this).slideUp('fast',function(){$(this).remove();});});}}});}},hideOldProductCustomizations:function(product,domIdProduct)
|
||||||
|
{var customizationList=$('#customization_'+product['id']+'_'+product['idCombination']);if(customizationList.length>0)
|
||||||
|
{$(customizationList).find("li").each(function(){$(this).find("div").each(function(){var customizationDiv=$(this).attr('id');var tmp=customizationDiv.replace('deleteCustomizableProduct_','');var ids=tmp.split('_');if((parseInt(product.idCombination)==parseInt(ids[2]))&&!ajaxCart.doesCustomizationStillExist(product,ids[0]))
|
||||||
|
$('#'+customizationDiv).parent().addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow');$(this).remove();});});});}
|
||||||
|
var removeLinks=$('#'+domIdProduct).find('.ajax_cart_block_remove_link');if(!product.hasCustomizedDatas&&!removeLinks.length)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="'+baseUri+'?controller=cart&delete=1&id_product='+product['id']+'&ipa='+product['idCombination']+'&token='+static_token+'"> </a>');if(product.is_gift)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('');},doesCustomizationStillExist:function(product,customizationId)
|
||||||
|
{var exists=false;$(product.customizedDatas).each(function(){if(this.customizationId==customizationId)
|
||||||
|
{exists=true;return false;}});return(exists);},refreshVouchers:function(jsonData){if(typeof(jsonData.discounts)=='undefined'||jsonData.discounts.length==0)
|
||||||
|
$('#vouchers').hide();else
|
||||||
|
{$('#vouchers tbody').html('');for(i=0;i<jsonData.discounts.length;i++)
|
||||||
|
{if(parseFloat(jsonData.discounts[i].price_float)>0)
|
||||||
|
{var delete_link='';if(jsonData.discounts[i].code.length)
|
||||||
|
delete_link='<a class="delete_voucher" href="'+jsonData.discounts[i].link+'" title="'+delete_txt+'"><i class="icon-remove-sign"></i></a>';$('#vouchers tbody').append($('<tr class="bloc_cart_voucher" id="bloc_cart_voucher_'+jsonData.discounts[i].id+'">'
|
||||||
|
+' <td class="quantity">1x</td>'
|
||||||
|
+' <td class="name" title="'+jsonData.discounts[i].description+'">'+jsonData.discounts[i].name+'</td>'
|
||||||
|
+' <td class="price">-'+jsonData.discounts[i].price+'</td>'
|
||||||
|
+' <td class="delete">'+delete_link+'</td>'
|
||||||
|
+'</tr>'));}}
|
||||||
|
$('#vouchers').show();}},updateProductQuantity:function(product,quantity){$('#cart_block_product_'+product.id+'_'+(product.idCombination?product.idCombination:'0')+'_'+(product.idAddressDelivery?product.idAddressDelivery:'0')+' .quantity').fadeTo('fast',0,function(){$(this).text(quantity);$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1);});});});});});},displayNewProducts:function(jsonData){$(jsonData.products).each(function(){if(this.id!=undefined)
|
||||||
|
{if($('#cart_block dl.products').length==0)
|
||||||
|
{$('#cart_block_no_products').before('<dl class="products"></dl>');$('#cart_block_no_products').hide();}
|
||||||
|
var domIdProduct=this.id+'_'+(this.idCombination?this.idCombination:'0')+'_'+(this.idAddressDelivery?this.idAddressDelivery:'0');var domIdProductAttribute=this.id+'_'+(this.idCombination?this.idCombination:'0');if($('#cart_block_product_'+domIdProduct).length==0)
|
||||||
|
{var productId=parseInt(this.id);var productAttributeId=(this.hasAttributes?parseInt(this.attributes):0);var content='<dt class="unvisible" id="cart_block_product_'+domIdProduct+'">';content+='<a class="cart-images" href="'+this.link+'" title="'+this.name.substring(0,12)+'"><img src="'+this.image_cart+'" alt="'+this.name+'"></a>';var min=this.name.indexOf(';',10);var name=(this.name.length>12?this.name.substring(0,((min-10)<=7)?min:10)+'...':this.name);content+='<div class="cart-info"><div class="product-name"><a href="'+this.link+'" title="'+this.name+'" class="cart_block_product_name">'+name+'</a></div>';if(this.hasAttributes)
|
||||||
|
content+='<div class="product-atributes"><a href="'+this.link+'" title="'+this.name+'">'+this.attributes+'</a></div>';content+='<span class="quantity-formated"><span class="quantity">'+this.quantity+'</span>x </span>';if(typeof(freeProductTranslation)!='undefined')
|
||||||
|
content+='<span class="price">'+(parseFloat(this.price_float)>0?this.priceByLine:freeProductTranslation)+'</span></div>';if(typeof(this.is_gift)=='undefined'||this.is_gift==0)
|
||||||
|
content+='<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&token='+static_token+(this.hasAttributes?'&ipa='+parseInt(this.idCombination):'')+'"> </a></span>';else
|
||||||
|
content+='<span class="remove_link"></span>';content+='</dt>';if(this.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+domIdProduct+'" class="unvisible">';if(this.hasCustomizedDatas)
|
||||||
|
content+=ajaxCart.displayNewCustomizedDatas(this);if(this.hasAttributes)content+='</dd>';$('#cart_block dl.products').append(content);}
|
||||||
|
else
|
||||||
|
{var jsonProduct=this;if($.trim($('#cart_block_product_'+domIdProduct+' .quantity').html())!=jsonProduct.quantity||$.trim($('#cart_block_product_'+domIdProduct+' .price').html())!=jsonProduct.priceByLine)
|
||||||
|
{if(!this.is_gift)
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').text(jsonProduct.priceByLine);else
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').html(freeProductTranslation);ajaxCart.updateProductQuantity(jsonProduct,jsonProduct.quantity);if(jsonProduct.hasCustomizedDatas)
|
||||||
|
{customizationFormatedDatas=ajaxCart.displayNewCustomizedDatas(jsonProduct);if(!$('#customization_'+domIdProductAttribute).length)
|
||||||
|
{if(jsonProduct.hasAttributes)
|
||||||
|
$('#cart_block_combination_of_'+domIdProduct).append(customizationFormatedDatas);else
|
||||||
|
$('#cart_block dl.products').append(customizationFormatedDatas);}
|
||||||
|
else
|
||||||
|
{$('#customization_'+domIdProductAttribute).html('');$('#customization_'+domIdProductAttribute).append(customizationFormatedDatas);}}}}
|
||||||
|
$('#cart_block dl.products .unvisible').slideDown(450).removeClass('unvisible');var removeLinks=$('#cart_block_product_'+domIdProduct).find('a.ajax_cart_block_remove_link');if(this.hasCustomizedDatas&&removeLinks.length)
|
||||||
|
$(removeLinks).each(function(){$(this).remove();});}});},displayNewCustomizedDatas:function(product)
|
||||||
|
{var content='';var productId=parseInt(product.id);var productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);var hasAlreadyCustomizations=$('#customization_'+productId+'_'+productAttributeId).length;if(!hasAlreadyCustomizations)
|
||||||
|
{if(!product.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+productId+'" class="unvisible">';if($('#customization_'+productId+'_'+productAttributeId).val()==undefined)
|
||||||
|
content+='<ul class="cart_block_customizations" id="customization_'+productId+'_'+productAttributeId+'">';}
|
||||||
|
$(product.customizedDatas).each(function()
|
||||||
|
{var done=0;customizationId=parseInt(this.customizationId);productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);content+='<li name="customization"><div class="deleteCustomizableProduct" id="deleteCustomizableProduct_'+customizationId+'_'+productId+'_'+(productAttributeId?productAttributeId:'0')+'"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&ipa='+productAttributeId+'&id_customization='+customizationId+'&token='+static_token+'"></a></div><span class="quantity-formated"><span class="quantity">'+parseInt(this.quantity)+'</span>x</span>';$(this.datas).each(function(){if(this['type']==CUSTOMIZE_TEXTFIELD)
|
||||||
|
{$(this.datas).each(function(){if(this['index']==0)
|
||||||
|
{content+=' '+this.truncatedValue.replace(/<br \/>/g,' ');done=1;return false;}})}});if(!done)
|
||||||
|
content+=customizationIdMessage+customizationId;if(!hasAlreadyCustomizations)content+='</li>';if(customizationId)
|
||||||
|
{$('#uploadable_files li div.customizationUploadBrowse img').remove();$('#text_fields input').attr('value','');}});if(!hasAlreadyCustomizations)
|
||||||
|
{content+='</ul>';if(!product.hasAttributes)content+='</dd>';}
|
||||||
|
return(content);},updateLayer:function(product){$('#layer_cart_product_title').text(product.name);$('#layer_cart_product_attributes').text('');if(product.hasAttributes&&product.hasAttributes==true)
|
||||||
|
$('#layer_cart_product_attributes').html(product.attributes);$('#layer_cart_product_price').text(product.price);$('#layer_cart_product_quantity').text(product.quantity);$('.layer_cart_img').prop({'src':product.image,'alt':product.name,'title':product.name});var h=parseInt($(window).height());var s=parseInt($(window).scrollTop());var t=$('#layer_cart').outerHeight(true);if(t<h)
|
||||||
|
var n=parseInt(((h-t)/2)+s)+'px';$('.layer_cart_overlay').css('width','100%');$('.layer_cart_overlay').css('height','100%');$('.layer_cart_overlay').show();$('#layer_cart').css({'top':n}).fadeIn('fast');crossselling_serialScroll();},updateCart:function(jsonData){if(jsonData.hasError)
|
||||||
|
{var errors='';for(error in jsonData.errors)
|
||||||
|
if(error!='indexOf')
|
||||||
|
errors+=$('<div />').html(jsonData.errors[error]).text()+"\n";alert(errors);}
|
||||||
|
else
|
||||||
|
{ajaxCart.updateCartEverywhere(jsonData);ajaxCart.hideOldProducts(jsonData);ajaxCart.displayNewProducts(jsonData);ajaxCart.refreshVouchers(jsonData);$('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item');$('#cart_block .products dt:first').addClass('first_item');$('#cart_block .products dt:not(:first,:last)').addClass('item');$('#cart_block .products dt:last').addClass('last_item');ajaxCart.overrideButtonsInThePage();}},updateCartEverywhere:function(jsonData){$('.ajax_cart_total').text($.trim(jsonData.productTotal));if(parseFloat(jsonData.shippingCostFloat)>0||jsonData.nbTotalProducts<1)
|
||||||
|
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);else if(typeof(freeShippingTranslation)!='undefined')
|
||||||
|
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);$('.ajax_cart_tax_cost').text(jsonData.taxCost);$('.cart_block_wrapping_cost').text(jsonData.wrappingCost);$('.ajax_block_cart_total').text(jsonData.total);$('.ajax_block_products_total').text(jsonData.productTotal);$('.ajax_total_price_wt').text(jsonData.total_price_wt);if(parseFloat(jsonData.freeShippingFloat)>0)
|
||||||
|
{$('.ajax_cart_free_shipping').html(jsonData.freeShipping);$('.freeshipping').fadeIn(0);}
|
||||||
|
else if(parseFloat(jsonData.freeShippingFloat)==0)
|
||||||
|
$('.freeshipping').fadeOut(0);this.nb_total_products=jsonData.nbTotalProducts;if(parseInt(jsonData.nbTotalProducts)>0)
|
||||||
|
{$('.ajax_cart_no_product').hide();$('.ajax_cart_quantity').text(jsonData.nbTotalProducts);$('.ajax_cart_quantity').fadeIn('slow');$('.ajax_cart_total').fadeIn('slow');if(parseInt(jsonData.nbTotalProducts)>1)
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).hide();});$('.ajax_cart_product_txt_s').each(function(){$(this).show();});}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).show();});$('.ajax_cart_product_txt_s').each(function(){$(this).hide();});}}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){$(this).hide();});$('.ajax_cart_no_product').show('slow');}}};$(document).ready(function()
|
||||||
|
{$('#block_cart_collapse').click(function(){ajaxCart.collapse();});$('#block_cart_expand').click(function(){ajaxCart.expand();});ajaxCart.overrideButtonsInThePage();var cart_qty=0;var current_timestamp=parseInt(new Date().getTime()/1000);if(typeof $('.ajax_cart_quantity').html()=='undefined'||(typeof generated_date!='undefined'&&generated_date!=null&&(parseInt(generated_date)+30)<current_timestamp))
|
||||||
|
ajaxCart.refresh();else
|
||||||
|
cart_qty=parseInt($('.ajax_cart_quantity').html());var cart_block=new HoverWatcher('#cart_block');var shopping_cart=new HoverWatcher('#shopping_cart');$("#shopping_cart a:first").hover(function(){if(ajaxCart.nb_total_products>0||cart_qty>0)
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideDown(450);},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver()&&!cart_block.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$("#header_right #cart_block").hover(function(){},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$('.delete_voucher').live('click',function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},async:true,cache:false,url:$(this).attr('href')+'?rand='+new Date().getTime()});$(this).parent().parent().remove();if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
{if(typeof(updateAddressSelection)!='undefined')
|
||||||
|
updateAddressSelection();else
|
||||||
|
location.reload();}
|
||||||
|
return false;});$('#cart_navigation input').click(function(){$(this).attr('disabled',true).addClass('disabled');$(this).closest("form").get(0).submit();});$('#layer_cart .cross, #layer_cart .continue, .layer_cart_overlay').click(function(){$('.layer_cart_overlay').hide();$('#layer_cart').fadeOut('fast');return false;});});function HoverWatcher(selector){this.hovering=false;var self=this;this.isHoveringOver=function(){return self.hovering;}
|
||||||
|
$(selector).hover(function(){self.hovering=true;},function(){self.hovering=false;})}
|
||||||
|
function crossselling_serialScroll()
|
||||||
|
{$('#blockcart_caroucel').bxSlider({minSlides:2,maxSlides:4,slideWidth:178,slideMargin:20,moveSlides:1,infiniteLoop:false,hideControlOnEnd:true,pager:false});};;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);;;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);;;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(optioLine truncated
|
||||||
|
break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}
|
||||||
|
break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}
|
||||||
|
break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}
|
||||||
|
if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}
|
||||||
|
$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])
|
||||||
|
cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)
|
||||||
|
return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}
|
||||||
|
v+=options.multipleSeparator;}
|
||||||
|
$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}
|
||||||
|
function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}
|
||||||
|
var currentValue=$input.val();if(!skipPrevCheck&¤tValue==previousValue)
|
||||||
|
return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)
|
||||||
|
currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value){return[""];}
|
||||||
|
var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))
|
||||||
|
result[i]=$.trim(value);});return result;}
|
||||||
|
function lastWord(value){if(!options.multiple)
|
||||||
|
return value;var words=trimWords(value);return words[words.length-1];}
|
||||||
|
function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}
|
||||||
|
else
|
||||||
|
$input.val("");}});}
|
||||||
|
if(wasVisible)
|
||||||
|
$.Autocompleter.Selection(input,input.value.length,input.value.length);};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)
|
||||||
|
term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}
|
||||||
|
return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)
|
||||||
|
s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}
|
||||||
|
if(!data[q]){length++;}
|
||||||
|
data[q]=value;}
|
||||||
|
function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)
|
||||||
|
continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])
|
||||||
|
stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}
|
||||||
|
setTimeout(populate,25);function flush(){data={};length=0;}
|
||||||
|
return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)
|
||||||
|
return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}
|
||||||
|
return csub;}else
|
||||||
|
if(data[q]){return data[q];}else
|
||||||
|
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}
|
||||||
|
return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)
|
||||||
|
return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)
|
||||||
|
element.css("width",options.width);needsInit=false;}
|
||||||
|
function target(event){var element=event.target;while(element&&element.tagName!="LI")
|
||||||
|
element=element.parentNode;if(!element)
|
||||||
|
return[];return element;}
|
||||||
|
function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}
|
||||||
|
function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}
|
||||||
|
function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])
|
||||||
|
continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)
|
||||||
|
continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}
|
||||||
|
listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}
|
||||||
|
if($.fn.bgiframe)
|
||||||
|
list.bgiframe();}
|
||||||
|
return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
|
||||||
|
field.focus();};})(jQuery);;$('document').ready(function(){$('#favoriteproducts_block_extra_add').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_add').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_remove').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_remove').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_added').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_added').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_removed').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_removed').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});});;function WishlistCart(id,action,id_product,id_product_attribute,quantity)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,cache:false,data:'action='+action+'&id_product='+id_product+'&quantity='+quantity+'&token='+static_token+'&id_product_attribute='+id_product_attribute,success:function(data)
|
||||||
|
{if(action=='add')
|
||||||
|
{if(isLoggedWishlist==true){alert('Adedd to wishlist')}
|
||||||
|
else{alert('You must be logged in to manage your wishlist.')}}
|
||||||
|
if($('#'+id).length!=0)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}}});}
|
||||||
|
function WishlistChangeDefault(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,data:'id_wishlist='+id_wishlist+'&token='+static_token,cache:false,success:function(data)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}});}
|
||||||
|
function WishlistBuyProduct(token,id_product,id_product_attribute,id_quantity,button,ajax)
|
||||||
|
{if(ajax)
|
||||||
|
ajaxCart.add(id_product,id_product_attribute,false,button,1,[token,id_quantity]);else
|
||||||
|
{$('#'+id_quantity).val(0);WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].method='POST';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].action=baseUri+'?controller=cart';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].elements['token'].value=static_token;document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].submit();}
|
||||||
|
return(true);}
|
||||||
|
function WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
{if($('#'+id_quantity).val()<=0)
|
||||||
|
return(false);$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/buywishlistproduct.php',data:'token='+token+'&static_token='+static_token+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute,async:true,cache:false,success:function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
{$('#'+id_quantity).val($('#'+id_quantity).val()-1);}}});return(true);}
|
||||||
|
function WishlistManage(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'id_wishlist='+id_wishlist+'&refresh='+false,cache:false,success:function(data)
|
||||||
|
{$('#'+id).hide();document.getElementById(id).innerHTML=data;$('#'+id).fadeIn('slow');}});}
|
||||||
|
function WishlistProductManage(id,action,id_wishlist,id_product,id_product_attribute,quantity,priority)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'action='+action+'&id_wishlist='+id_wishlist+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute+'&quantity='+quantity+'&priority='+priority+'&refresh='+true,cache:false,success:function(data)
|
||||||
|
{if(action=='delete')
|
||||||
|
$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');else if(action=='update')
|
||||||
|
{$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');$('#wlp_'+id_product+'_'+id_product_attribute).fadeIn('fast');}}});}
|
||||||
|
function WishlistDelete(id,id_wishlist,msg)
|
||||||
|
{var res=confirm(msg);if(res==false)
|
||||||
|
return(false);$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/mywishlist.php',cache:false,data:'deleted&id_wishlist='+id_wishlist,success:function(data)
|
||||||
|
{$('#'+id).fadeOut('slow');}});}
|
||||||
|
function WishlistVisibility(bought_class,id_button)
|
||||||
|
{if($('#hide'+id_button).css('display')=='none')
|
||||||
|
{$('.'+bought_class).slideDown('fast');$('#show'+id_button).hide();$('#hide'+id_button).css('display','block');}
|
||||||
|
else
|
||||||
|
{$('.'+bought_class).slideUp('fast');$('#hide'+id_button).hide();$('#show'+id_button).css('display','block');}}
|
||||||
|
function WishlistSend(id,id_wishlist,id_email)
|
||||||
|
{$.post(baseDir+'modules/blockwishlist/sendwishlist.php',{token:static_token,id_wishlist:id_wishlist,email1:$('#'+id_email+'1').val(),email2:$('#'+id_email+'2').val(),email3:$('#'+id_email+'3').val(),email4:$('#'+id_email+'4').val(),email5:$('#'+id_email+'5').val(),email6:$('#'+id_email+'6').val(),email7:$('#'+id_email+'7').val(),email8:$('#'+id_email+'8').val(),email9:$('#'+id_email+'9').val(),email10:$('#'+id_email+'10').val()},function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
WishlistVisibility(id,'hideSendWishlist');});};var ajaxQueries=new Array();var ajaxLoaderOn=0;var sliderList=new Array();var slidersInit=false;$(document).ready(function()
|
||||||
|
{cancelFilter();openCloseFilter();$('#layered_form input[type=button], #layered_form label.layered_color').live('click',function()
|
||||||
|
{if(!$('input[name='+$(this).attr('name')+'][type=hidden]').length)
|
||||||
|
$('<input />').attr('type','hidden').attr('name',$(this).attr('name')).val($(this).attr('rel')).appendTo('#layered_form');else
|
||||||
|
$('input[name='+$(this).attr('name')+'][type=hidden]').remove();reloadContent();});$('#layered_form input[type=checkbox], #layered_form input[type=radio], #layered_form select').live('change',function()
|
||||||
|
{reloadContent();});$('#layered_form input.layered_input_range').live('keyup',function()
|
||||||
|
{if($(this).attr('timeout_id'))
|
||||||
|
window.clearTimeout($(this).attr('timeout_id'));var reference=this;$(this).attr('timeout_id',window.setTimeout(function(it){if(!$(it).attr('id'))
|
||||||
|
it=reference;var filter=$(it).attr('id').replace(/^layered_(.+)_range_.*$/,'$1');var value_min=parseInt($('#layered_'+filter+'_range_min').val());if(isNaN(value_min))
|
||||||
|
value_min=0;$('#layered_'+filter+'_range_min').val(value_min);var value_max=parseInt($('#layered_'+filter+'_range_max').val());if(isNaN(value_max))
|
||||||
|
value_max=0;$('#layered_'+filter+'_range_max').val(value_max);if(value_max<value_min){$('#layered_'+filter+'_range_max').val($(it).val());$('#layered_'+filter+'_range_min').val($(it).val());}
|
||||||
|
reloadContent();},500,this));});$('#layered_block_left .radio').live('click',function(){var name=$(this).attr('name');$.each($(this).parent().parent().find('input[type=button]'),function(it,item){if($(item).hasClass('on')&&$(item).attr('name')!=name){$(item).click();}});return true;});$('#layered_block_left label a').live({click:function(){var disable=$(this).parent().parent().find('input').attr('disabled');if(disable==''||typeof(disable)=='undefined'||disable==false)
|
||||||
|
{$(this).parent().parent().find('input').click();reloadContent();}
|
||||||
|
return false;}});layered_hidden_list={};$('.hide-action').live('click',function(){if(typeof(layered_hidden_list[$(this).parent().find('ul').attr('id')])=='undefined'||layered_hidden_list[$(this).parent().find('ul').attr('id')]==false)
|
||||||
|
{layered_hidden_list[$(this).parent().find('ul').attr('id')]=true;}
|
||||||
|
else
|
||||||
|
{layered_hidden_list[$(this).parent().find('ul').attr('id')]=false;}
|
||||||
|
hideFilterValueAction(this);});$('.hide-action').each(function(){hideFilterValueAction(this);});var id=1;while($('#selectPrductSort').length){$('#selectPrductSort').unbind('change');$('#selectPrductSort').attr('onchange','');$('#selectPrductSort').addClass('selectProductSort');$('#selectPrductSort').attr('id','selectPrductSort'+id);$('label[for=selectPrductSort]').attr('for','selectPrductSort'+id);id++;}
|
||||||
|
setTimeout(function(){$('.selectProductSort').unbind('change');},100);$('.selectProductSort').live('change',function(event){$('.selectProductSort').val($(this).val());reloadContent();});$('.js-nb_item').unbind('change').attr('onchange','');$('.js-nb_item').live('change',function(event){$('.js-nb_item').val($(this).val());reloadContent();});paginationButton();initLayered();});function hideFilterValueAction(it)
|
||||||
|
{if(typeof(layered_hidden_list[$(it).parent().find('ul').attr('id')])=='undefined'||layered_hidden_list[$(it).parent().find('ul').attr('id')]==false)
|
||||||
|
{$(it).parent().find('.hiddable').hide();$(it).parent().find('.hide-action.less').hide();$(it).parent().find('.hide-action.more').show();}
|
||||||
|
else
|
||||||
|
{$(it).parent().find('.hiddable').show();$(it).parent().find('.hide-action.less').show();$(it).parent().find('.hide-action.more').hide();}}
|
||||||
|
function addSlider(type,data,unit,format)
|
||||||
|
{sliderList.push({type:type,data:data,unit:unit,format:format});}
|
||||||
|
function initSliders()
|
||||||
|
{$(sliderList).each(function(i,slider){$('#layered_'+slider['type']+'_slider').slider(slider['data']);var from='';var to='';switch(slider['format'])
|
||||||
|
{case 1:case 2:case 3:case 4:from=blocklayeredFormatCurrency($('#layered_'+slider['type']+'_slider').slider('values',0),slider['format'],slider['unit']);to=blocklayeredFormatCurrency($('#layered_'+slider['type']+'_slider').slider('values',1),slider['format'],slider['unit']);break;case 5:from=$('#layered_'+slider['type']+'_slider').slider('values',0)+slider['unit']
|
||||||
|
to=$('#layered_'+slider['type']+'_slider').slider('values',1)+slider['unit'];break;}
|
||||||
|
$('#layered_'+slider['type']+'_range').html(from+' - '+to);});}
|
||||||
|
function initLayered()
|
||||||
|
{initSliders();initLocationChange();updateProductUrl();if(window.location.href.split('#').length==2&&window.location.href.split('#')[1]!='')
|
||||||
|
{var params=window.location.href.split('#')[1];reloadContent('&selected_filters='+params);}}
|
||||||
|
function paginationButton(){$('div.pagination a').not(':hidden').each(function(){if($(this).attr('href').search('&p=')==-1){var page=1;}
|
||||||
|
else{var page=$(this).attr('href').replace(/^.*&p=(\d+).*$/,'$1');}
|
||||||
|
var location=window.location.href.replace(/#.*$/,'');$(this).attr('href',location+current_friendly_url.replace(/\/page-(\d+)/,'')+'/page-'+page);});$('div.pagination li').not('.current, .disabled').each(function(){var nbPage=0;if($(this).hasClass('pagination_next'))
|
||||||
|
nbPage=parseInt($('div.pagination li.current').children().html())+1;else if($(this).hasClass('pagination_previous'))
|
||||||
|
nbPage=parseInt($('div.pagination li.current').children().html())-1;$(this).children().children().click(function(){if(nbPage==0)
|
||||||
|
p=parseInt($(this).html())+parseInt(nbPage);else
|
||||||
|
p=nbPage;p='&p='+p;reloadContent(p);nbPage=0;return false;});});}
|
||||||
|
function cancelFilter()
|
||||||
|
{$('#enabled_filters a').live('click',function(e)
|
||||||
|
{if($(this).attr('rel').search(/_slider$/)>0)
|
||||||
|
{if($('#'+$(this).attr('rel')).length)
|
||||||
|
{$('#'+$(this).attr('rel')).slider('values',0,$('#'+$(this).attr('rel')).slider('option','min'));$('#'+$(this).attr('rel')).slider('values',1,$('#'+$(this).attr('rel')).slider('option','max'));$('#'+$(this).attr('rel')).slider('option','slide')(0,{values:[$('#'+$(this).attr('rel')).slider('option','min'),$('#'+$(this).attr('rel')).slider('option','max')]});}
|
||||||
|
else if($('#'+$(this).attr('rel').replace(/_slider$/,'_range_min')).length)
|
||||||
|
{$('#'+$(this).attr('rel').replace(/_slider$/,'_range_min')).val($('#'+$(this).attr('rel').replace(/_slider$/,'_range_min')).attr('limitValue'));$('#'+$(this).attr('rel').replace(/_slider$/,'_range_max')).val($('#'+$(this).attr('rel').replace(/_slider$/,'_range_max')).attr('limitValue'));}}
|
||||||
|
else
|
||||||
|
{if($('option#'+$(this).attr('rel')).length)
|
||||||
|
{$('#'+$(this).attr('rel')).parent().val('');}
|
||||||
|
else
|
||||||
|
{$('#'+$(this).attr('rel')).attr('checked',false);$('.'+$(this).attr('rel')).attr('checked',false);$('#layered_form input[type=hidden][name='+$(this).attr('rel')+']').remove();}}
|
||||||
|
reloadContent();e.preventDefault();});}
|
||||||
|
function openCloseFilter()
|
||||||
|
{$('#layered_form span.layered_close a').live('click',function(e)
|
||||||
|
{if($(this).html()=='<')
|
||||||
|
{$('#'+$(this).attr('rel')).show();$(this).html('v');$(this).parent().removeClass('closed');}
|
||||||
|
else
|
||||||
|
{$('#'+$(this).attr('rel')).hide();$(this).html('<');$(this).parent().addClass('closed');}
|
||||||
|
e.preventDefault();});}
|
||||||
|
function stopAjaxQuery(){if(typeof(ajaxQueries)=='undefined')
|
||||||
|
ajaxQueries=new Array();for(i=0;i<ajaxQueries.length;i++)
|
||||||
|
ajaxQueries[i].abort();ajaxQueries=new Array();}
|
||||||
|
function reloadContent(params_plus)
|
||||||
|
{stopAjaxQuery();if(!ajaxLoaderOn)
|
||||||
|
{$('#product_list').prepend($('#layered_ajax_loader').html());$('#product_list').css('opacity','0.7');ajaxLoaderOn=1;}
|
||||||
|
data=$('#layered_form').serialize();$('.layered_slider').each(function(){var sliderStart=$(this).slider('values',0);var sliderStop=$(this).slider('values',1);if(typeof(sliderStart)=='number'&&typeof(sliderStop)=='number')
|
||||||
|
data+='&'+$(this).attr('id')+'='+sliderStart+'_'+sliderStop;});$(['price','weight']).each(function(it,sliderType)
|
||||||
|
{if($('#layered_'+sliderType+'_range_min').length)
|
||||||
|
{data+='&layered_'+sliderType+'_slider='+$('#layered_'+sliderType+'_range_min').val()+'_'+$('#layered_'+sliderType+'_range_max').val();}});$('#layered_form .select option').each(function(){if($(this).attr('id')&&$(this).parent().val()==$(this).val())
|
||||||
|
{data+='&'+$(this).attr('id')+'='+$(this).val();}});if($('.selectProductSort').length&&$('.selectProductSort').val())
|
||||||
|
{if($('.selectProductSort').val().search(/orderby=/)>0)
|
||||||
|
{var splitData=[$('.selectProductSort').val().match(/orderby=(\w*)/)[1],$('.selectProductSort').val().match(/orderway=(\w*)/)[1]];}
|
||||||
|
else
|
||||||
|
{var splitData=$('.selectProductSort').val().split(':');}
|
||||||
|
data+='&orderby='+splitData[0]+'&orderway='+splitData[1];}
|
||||||
|
if($('.js-nb_item').length)
|
||||||
|
{data+='&n='+$('.js-nb_item').val();}
|
||||||
|
var slideUp=true;if(params_plus==undefined)
|
||||||
|
{params_plus='';slideUp=false;}
|
||||||
|
var n='';$('div.pagination .js-nb_item').children().each(function(it,option){if(option.selected)
|
||||||
|
n='&n='+option.value;});ajaxQuery=$.ajax({type:'GET',url:baseDir+'modules/blocklayered/blocklayered-ajax.php',data:data+params_plus+n,dataType:'json',cache:false,success:function(result)
|
||||||
|
{$('#layered_block_left').replaceWith(utf8_decode(result.filtersBlock));$('.category-product-count').html(result.categoryCount);if(result.productList)
|
||||||
|
$('#product_list').replaceWith(utf8_decode(result.productList));else
|
||||||
|
$('#product_list').html('');$('#product_list').css('opacity','1');if($.browser.msie)
|
||||||
|
$('#product_list').css('filter','');if(result.pagination.search(/[^\s]/)>=0){if($(result.pagination).find('ul.pagination').length)
|
||||||
|
{$('div.pagination').show();$('ul.pagination').each(function(){$(this).replaceWith($(result.pagination).find('ul.pagination'));});}
|
||||||
|
else if(!$('ul.pagination').length)
|
||||||
|
{$('div.pagination').show();$('div.pagination').each(function(){$(this).html($(result.pagination));});}
|
||||||
|
else
|
||||||
|
{$('ul.pagination').html('');$('div.pagination').hide();}}
|
||||||
|
else
|
||||||
|
{$('ul.pagination').html('');$('div.pagination').hide();}
|
||||||
|
paginationButton();ajaxLoaderOn=0;$('div.pagination form').submit(function(){val=$('div.pagination .js-nb_item').val();$('div.pagination .js-nb_item').children().each(function(it,option){if(option.value==val)
|
||||||
|
$(option).attr('selected',true);else
|
||||||
|
$(option).removeAttr('selected');});reloadContent();return false;});if(typeof(ajaxCart)!="undefined")
|
||||||
|
ajaxCart.overrideButtonsInThePage();if(typeof(reloadProductComparison)=='function')
|
||||||
|
reloadProductComparison();initSliders();if(typeof(current_friendly_url)=='undefined')
|
||||||
|
current_friendly_url='#';$(['price','weight']).each(function(it,sliderType)
|
||||||
|
{if($('#layered_'+sliderType+'_slider').length)
|
||||||
|
{if(typeof($('#layered_'+sliderType+'_slider').slider('values',0))!='object')
|
||||||
|
{if($('#layered_'+sliderType+'_slider').slider('values',0)!=$('#layered_'+sliderType+'_slider').slider('option','min')||$('#layered_'+sliderType+'_slider').slider('values',1)!=$('#layered_'+sliderType+'_slider').slider('option','max'))
|
||||||
|
current_friendly_url+='/'+sliderType+'-'+$('#layered_'+sliderType+'_slider').slider('values',0)+'-'+$('#layered_'+sliderType+'_slider').slider('values',1)}}
|
||||||
|
else if($('#layered_'+sliderType+'_range_min').length)
|
||||||
|
{current_friendly_url+='/'+sliderType+'-'+$('#layered_'+sliderType+'_range_min').val()+'-'+$('#layered_'+sliderType+'_range_max').val();}});if(current_friendly_url=='#')
|
||||||
|
current_friendly_url='#/';window.location=current_friendly_url;lockLocationChecking=true;if(slideUp)
|
||||||
|
$.scrollTo('#product_list',400);updateProductUrl();$('.hide-action').each(function(){hideFilterValueAction(this);});}});ajaxQueries.push(ajaxQuery);}
|
||||||
|
function initLocationChange(func,time)
|
||||||
|
{if(!time)time=500;var current_friendly_url=getUrlParams();setInterval(function()
|
||||||
|
{if(getUrlParams()!=current_friendly_url&&!lockLocationChecking)
|
||||||
|
{if(current_friendly_url.replace(/^#(\/)?/,'')==getUrlParams().replace(/^#(\/)?/,''))
|
||||||
|
return;lockLocationChecking=true;reloadContent('&selected_filters='+getUrlParams().replace(/^#/,''));}
|
||||||
|
else{lockLocationChecking=false;current_friendly_url=getUrlParams();}},time);}
|
||||||
|
function getUrlParams()
|
||||||
|
{var params=current_friendly_url;if(window.location.href.split('#').length==2&&window.location.href.split('#')[1]!='')
|
||||||
|
params='#'+window.location.href.split('#')[1];return params;}
|
||||||
|
function updateProductUrl()
|
||||||
|
{if(typeof(param_product_url)!='undefined'&¶m_product_url!=''&¶m_product_url!='#'){$.each($('ul#product_list li.ajax_block_product .product_img_link,'+'ul#product_list li.ajax_block_product h3 a,'+'ul#product_list li.ajax_block_product .product_desc a,'+'ul#product_list li.ajax_block_product .lnk_view'),function(){$(this).attr('href',$(this).attr('href')+param_product_url);});}}
|
||||||
|
function utf8_decode(utfstr){var res='';for(var i=0;i<utfstr.length;){var c=utfstr.charCodeAt(i);if(c<128)
|
||||||
|
{res+=String.fromCharCode(c);i++;}
|
||||||
|
else if((c>191)&&(c<224))
|
||||||
|
{var c1=utfstr.charCodeAt(i+1);res+=String.fromCharCode(((c&31)<<6)|(c1&63));i+=2;}
|
||||||
|
else
|
||||||
|
{var c1=utfstr.charCodeAt(i+1);var c2=utfstr.charCodeAt(i+2);res+=String.fromCharCode(((c&15)<<12)|((c1&63)<<6)|(c2&63));i+=3;}}
|
||||||
|
return res;}
|
||||||
|
function blocklayeredFormatCurrency(price,currencyFormat,currencySign,currencyBlank)
|
||||||
|
{blank='';price=parseFloat(price.toFixed(6));price=ps_round(price,priceDisplayPrecision);if(currencyBlank>0)
|
||||||
|
blank=' ';if(currencyFormat==1)
|
||||||
|
return currencySign+blank+blocklayeredFormatNumber(price,priceDisplayPrecision,',','.');if(currencyFormat==2)
|
||||||
|
return(blocklayeredFormatNumber(price,priceDisplayPrecision,' ',',')+blank+currencySign);if(currencyFormat==3)
|
||||||
|
return(currencySign+blank+blocklayeredFormatNumber(price,priceDisplayPrecision,'.',','));if(currencyFormat==4)
|
||||||
|
return(blocklayeredFormatNumber(price,priceDisplayPrecision,',','.')+blank+currencySign);return price;}
|
||||||
|
function blocklayeredFormatNumber(value,numberOfDecimal,thousenSeparator,virgule)
|
||||||
|
{value=value.toFixed(numberOfDecimal);var val_string=value+'';var tmp=val_string.split('.');var abs_val_string=(tmp.length==2)?tmp[0]:val_string;var deci_string=('0.'+(tmp.length==2?tmp[1]:0)).substr(2);var nb=abs_val_string.length;for(var i=1;i<4;i++)
|
||||||
|
if(value>=Math.pow(10,(3*i)))
|
||||||
|
abs_val_string=abs_val_string.substring(0,nb-(3*i))+thousenSeparator+abs_val_string.substring(nb-(3*i));if(parseInt(numberOfDecimal)==0)
|
||||||
|
return abs_val_string;return abs_val_string+virgule+(deci_string>0?deci_string:'00');};
|
||||||
|
/*! jQuery UI - v1.10.3 - 2013-05-03
|
||||||
|
* http://jqueryui.com
|
||||||
|
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
|
||||||
|
(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);;
|
||||||
|
/*! jQuery UI - v1.10.3 - 2013-05-03
|
||||||
|
* http://jqueryui.com
|
||||||
|
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
|
||||||
|
(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undLine truncated
|
||||||
|
/*! jQuery UI - v1.10.3 - 2013-05-03
|
||||||
|
* http://jqueryui.com
|
||||||
|
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
|
||||||
|
(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);;
|
||||||
|
/*! jQuery UI - v1.10.3 - 2013-05-03
|
||||||
|
* http://jqueryui.com
|
||||||
|
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
|
||||||
|
(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-a.width()/2,top:e.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.Line truncated
|
||||||
|
jQueryElement.parent().find('ul:first').show();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideDown();}
|
||||||
|
function closeBranch(jQueryElement,noAnimation){jQueryElement.addClass('CLOSE').removeClass('OPEN');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').hide();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideUp();}
|
||||||
|
function toggleBranch(jQueryElement,noAnimation){if(jQueryElement.hasClass('OPEN'))
|
||||||
|
closeBranch(jQueryElement,noAnimation);else
|
||||||
|
openBranch(jQueryElement,noAnimation);}
|
||||||
|
$(document).ready(function(){if(!$('ul.tree.dhtml').hasClass('dynamized'))
|
||||||
|
{$('ul.tree.dhtml ul').prev().before("<span class='grower OPEN'> </span>");$('ul.tree.dhtml ul li:last-child, ul.tree.dhtml li:last-child').addClass('last');$('ul.tree.dhtml span.grower.OPEN').addClass('CLOSE').removeClass('OPEN').parent().find('ul:first').hide();$('ul.tree.dhtml').show();$('ul.tree.dhtml .selected').parents().each(function(){if($(this).is('ul'))
|
||||||
|
toggleBranch($(this).prev().prev(),true);});toggleBranch($('ul.tree.dhtml .selected').prev(),true);$('ul.tree.dhtml span.grower').click(function(){toggleBranch($(this));});$('ul.tree.dhtml').addClass('dynamized');$('ul.tree.dhtml').removeClass('dhtml');}});;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
|
||||||
|
if(p==this){return false;}
|
||||||
|
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
|
||||||
|
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);;;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
|
||||||
|
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'fast',autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);jQuery(function(){jQuery('ul.sf-menu').superfish();});;
|
||||||
@@ -0,0 +1,438 @@
|
|||||||
|
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
|
||||||
|
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="stringLine truncated
|
||||||
|
/*!
|
||||||
|
* jQuery Migrate - v1.2.1 - 2013-05-08
|
||||||
|
* https://github.com/jquery/jquery-migrate
|
||||||
|
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
|
||||||
|
*/
|
||||||
|
(function(jQuery,window,undefined){jQuery.migrateMute=true;var warnedAbout={};jQuery.migrateWarnings=[];if(!jQuery.migrateMute&&window.console&&window.console.log){window.console.log("JQMIGRATE: Logging is active");}
|
||||||
|
if(jQuery.migrateTrace===undefined){jQuery.migrateTrace=true;}
|
||||||
|
jQuery.migrateReset=function(){warnedAbout={};jQuery.migrateWarnings.length=0;};function migrateWarn(msg){var console=window.console;if(!warnedAbout[msg]){warnedAbout[msg]=true;jQuery.migrateWarnings.push(msg);if(console&&console.warn&&!jQuery.migrateMute){console.warn("JQMIGRATE: "+msg);if(jQuery.migrateTrace&&console.trace){console.trace();}}}}
|
||||||
|
function migrateWarnProp(obj,prop,value,msg){if(Object.defineProperty){try{Object.defineProperty(obj,prop,{configurable:true,enumerable:true,get:function(){migrateWarn(msg);return value;},set:function(newValue){migrateWarn(msg);value=newValue;}});return;}catch(err){}}
|
||||||
|
jQuery._definePropertyBroken=true;obj[prop]=value;}
|
||||||
|
if(document.compatMode==="BackCompat"){migrateWarn("jQuery is not compatible with Quirks Mode");}
|
||||||
|
var attrFn=jQuery("<input/>",{size:1}).attr("size")&&jQuery.attrFn,oldAttr=jQuery.attr,valueAttrGet=jQuery.attrHooks.value&&jQuery.attrHooks.value.get||function(){return null;},valueAttrSet=jQuery.attrHooks.value&&jQuery.attrHooks.value.set||function(){return undefined;},rnoType=/^(?:input|button)$/i,rnoAttrNodeType=/^[238]$/,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ruseDefault=/^(?:checked|selected)$/i;migrateWarnProp(jQuery,"attrFn",attrFn||{},"jQuery.attrFn is deprecated");jQuery.attr=function(elem,name,value,pass){var lowerName=name.toLowerCase(),nType=elem&&elem.nodeType;if(pass){if(oldAttr.length<4){migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");}
|
||||||
|
if(elem&&!rnoAttrNodeType.test(nType)&&(attrFn?name in attrFn:jQuery.isFunction(jQuery.fn[name]))){return jQuery(elem)[name](value);}}
|
||||||
|
if(name==="type"&&value!==undefined&&rnoType.test(elem.nodeName)&&elem.parentNode){migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");}
|
||||||
|
if(!jQuery.attrHooks[lowerName]&&rboolean.test(lowerName)){jQuery.attrHooks[lowerName]={get:function(elem,name){var attrNode,property=jQuery.prop(elem,name);return property===true||typeof property!=="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==false?name.toLowerCase():undefined;},set:function(elem,value,name){var propName;if(value===false){jQuery.removeAttr(elem,name);}else{propName=jQuery.propFix[name]||name;if(propName in elem){elem[propName]=true;}
|
||||||
|
elem.setAttribute(name,name.toLowerCase());}
|
||||||
|
return name;}};if(ruseDefault.test(lowerName)){migrateWarn("jQuery.fn.attr('"+lowerName+"') may use property instead of attribute");}}
|
||||||
|
return oldAttr.call(jQuery,elem,name,value);};jQuery.attrHooks.value={get:function(elem,name){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrGet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value') no longer gets properties");}
|
||||||
|
return name in elem?elem.value:null;},set:function(elem,value){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrSet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");}
|
||||||
|
elem.value=value;}};var matched,browser,oldInit=jQuery.fn.init,oldParseJSON=jQuery.parseJSON,rquickExpr=/^([^<]*)(<[\w\W]+>)([^>]*)$/;jQuery.fn.init=function(selector,context,rootjQuery){var match;if(selector&&typeof selector==="string"&&!jQuery.isPlainObject(context)&&(match=rquickExpr.exec(jQuery.trim(selector)))&&match[0]){if(selector.charAt(0)!=="<"){migrateWarn("$(html) HTML strings must start with '<' character");}
|
||||||
|
if(match[3]){migrateWarn("$(html) HTML text after last tag is ignored");}
|
||||||
|
if(match[0].charAt(0)==="#"){migrateWarn("HTML string cannot start with a '#' character");jQuery.error("JQMIGRATE: Invalid selector string (XSS)");}
|
||||||
|
if(context&&context.context){context=context.context;}
|
||||||
|
if(jQuery.parseHTML){return oldInit.call(this,jQuery.parseHTML(match[2],context,true),context,rootjQuery);}}
|
||||||
|
return oldInit.apply(this,arguments);};jQuery.fn.init.prototype=jQuery.fn;jQuery.parseJSON=function(json){if(!json&&json!==null){migrateWarn("jQuery.parseJSON requires a valid JSON string");return null;}
|
||||||
|
return oldParseJSON.apply(this,arguments);};jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};};if(!jQuery.browser){matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;}
|
||||||
|
if(browser.chrome){browser.webkit=true;}else if(browser.webkit){browser.safari=true;}
|
||||||
|
jQuery.browser=browser;}
|
||||||
|
migrateWarnProp(jQuery,"browser",jQuery.browser,"jQuery.browser is deprecated");jQuery.sub=function(){function jQuerySub(selector,context){return new jQuerySub.fn.init(selector,context);}
|
||||||
|
jQuery.extend(true,jQuerySub,this);jQuerySub.superclass=this;jQuerySub.fn=jQuerySub.prototype=this();jQuerySub.fn.constructor=jQuerySub;jQuerySub.sub=this.sub;jQuerySub.fn.init=function init(selector,context){if(context&&context instanceof jQuery&&!(context instanceof jQuerySub)){context=jQuerySub(context);}
|
||||||
|
return jQuery.fn.init.call(this,selector,context,rootjQuerySub);};jQuerySub.fn.init.prototype=jQuerySub.fn;var rootjQuerySub=jQuerySub(document);migrateWarn("jQuery.sub() is deprecated");return jQuerySub;};jQuery.ajaxSetup({converters:{"text json":jQuery.parseJSON}});var oldFnData=jQuery.fn.data;jQuery.fn.data=function(name){var ret,evt,elem=this[0];if(elem&&name==="events"&&arguments.length===1){ret=jQuery.data(elem,name);evt=jQuery._data(elem,name);if((ret===undefined||ret===evt)&&evt!==undefined){migrateWarn("Use of jQuery.fn.data('events') is deprecated");return evt;}}
|
||||||
|
return oldFnData.apply(this,arguments);};var rscriptType=/\/(java|ecma)script/i,oldSelf=jQuery.fn.andSelf||jQuery.fn.addBack;jQuery.fn.andSelf=function(){migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");return oldSelf.apply(this,arguments);};if(!jQuery.clean){jQuery.clean=function(elems,context,fragment,scripts){context=context||document;context=!context.nodeType&&context[0]||context;context=context.ownerDocument||context;migrateWarn("jQuery.clean() is deprecated");var i,elem,handleScript,jsTags,ret=[];jQuery.merge(ret,jQuery.buildFragment(elems,context).childNodes);if(fragment){handleScript=function(elem){if(!elem.type||rscriptType.test(elem.type)){return scripts?scripts.push(elem.parentNode?elem.parentNode.removeChild(elem):elem):fragment.appendChild(elem);}};for(i=0;(elem=ret[i])!=null;i++){if(!(jQuery.nodeName(elem,"script")&&handleScript(elem))){fragment.appendChild(elem);if(typeof elem.getElementsByTagName!=="undefined"){jsTags=jQuery.grep(jQuery.merge([],elem.getElementsByTagName("script")),handleScript);ret.splice.apply(ret,[i+1,0].concat(jsTags));i+=jsTags.length;}}}}
|
||||||
|
return ret;};}
|
||||||
|
var eventAdd=jQuery.event.add,eventRemove=jQuery.event.remove,eventTrigger=jQuery.event.trigger,oldToggle=jQuery.fn.toggle,oldLive=jQuery.fn.live,oldDie=jQuery.fn.die,ajaxEvents="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",rajaxEvent=new RegExp("\\b(?:"+ajaxEvents+")\\b"),rhoverHack=/(?:^|\s)hover(\.\S+|)\b/,hoverHack=function(events){if(typeof(events)!=="string"||jQuery.event.special.hover){return events;}
|
||||||
|
if(rhoverHack.test(events)){migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");}
|
||||||
|
return events&&events.replace(rhoverHack,"mouseenter$1 mouseleave$1");};if(jQuery.event.props&&jQuery.event.props[0]!=="attrChange"){jQuery.event.props.unshift("attrChange","attrName","relatedNode","srcElement");}
|
||||||
|
if(jQuery.event.dispatch){migrateWarnProp(jQuery.event,"handle",jQuery.event.dispatch,"jQuery.event.handle is undocumented and deprecated");}
|
||||||
|
jQuery.event.add=function(elem,types,handler,data,selector){if(elem!==document&&rajaxEvent.test(types)){migrateWarn("AJAX events should be attached to document: "+types);}
|
||||||
|
eventAdd.call(this,elem,hoverHack(types||""),handler,data,selector);};jQuery.event.remove=function(elem,types,handler,selector,mappedTypes){eventRemove.call(this,elem,hoverHack(types)||"",handler,selector,mappedTypes);};jQuery.fn.error=function(){var args=Array.prototype.slice.call(arguments,0);migrateWarn("jQuery.fn.error() is deprecated");args.splice(0,0,"error");if(arguments.length){return this.bind.apply(this,args);}
|
||||||
|
this.triggerHandler.apply(this,args);return this;};jQuery.fn.toggle=function(fn,fn2){if(!jQuery.isFunction(fn)||!jQuery.isFunction(fn2)){return oldToggle.apply(this,arguments);}
|
||||||
|
migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");var args=arguments,guid=fn.guid||jQuery.guid++,i=0,toggler=function(event){var lastToggle=(jQuery._data(this,"lastToggle"+fn.guid)||0)%i;jQuery._data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;};toggler.guid=guid;while(i<args.length){args[i++].guid=guid;}
|
||||||
|
return this.click(toggler);};jQuery.fn.live=function(types,data,fn){migrateWarn("jQuery.fn.live() is deprecated");if(oldLive){return oldLive.apply(this,arguments);}
|
||||||
|
jQuery(this.context).on(types,this.selector,data,fn);return this;};jQuery.fn.die=function(types,fn){migrateWarn("jQuery.fn.die() is deprecated");if(oldDie){return oldDie.apply(this,arguments);}
|
||||||
|
jQuery(this.context).off(types,this.selector||"**",fn);return this;};jQuery.event.trigger=function(event,data,elem,onlyHandlers){if(!elem&&!rajaxEvent.test(event)){migrateWarn("Global events are undocumented and deprecated");}
|
||||||
|
return eventTrigger.call(this,event,data,elem||document,onlyHandlers);};jQuery.each(ajaxEvents.split("|"),function(_,name){jQuery.event.special[name]={setup:function(){var elem=this;if(elem!==document){jQuery.event.add(document,name+"."+jQuery.guid,function(){jQuery.event.trigger(name,null,elem,true);});jQuery._data(this,name,jQuery.guid++);}
|
||||||
|
return false;},teardown:function(){if(this!==document){jQuery.event.remove(document,name+"."+jQuery._data(this,name));}
|
||||||
|
return false;}};});})(jQuery,window);;jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;function formatedNumberToFloat(price,currencyFormat,currencySign)
|
||||||
|
{price=price.replace(currencySign,'');if(currencyFormat==1)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));else if(currencyFormat==2)
|
||||||
|
return parseFloat(price.replace(' ','').replace(',','.'));else if(currencyFormat==3)
|
||||||
|
return parseFloat(price.replace('.','').replace(' ','').replace(',','.'));else if(currencyFormat==4)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));return price;}
|
||||||
|
function formatNumber(value,numberOfDecimal,thousenSeparator,virgule)
|
||||||
|
{value=value.toFixed(numberOfDecimal);var val_string=value+'';var tmp=val_string.split('.');var abs_val_string=(tmp.length==2)?tmp[0]:val_string;var deci_string=('0.'+(tmp.length==2?tmp[1]:0)).substr(2);var nb=abs_val_string.length;for(var i=1;i<4;i++)
|
||||||
|
if(value>=Math.pow(10,(3*i)))
|
||||||
|
abs_val_string=abs_val_string.substring(0,nb-(3*i))+thousenSeparator+abs_val_string.substring(nb-(3*i));if(parseInt(numberOfDecimal)==0)
|
||||||
|
return abs_val_string;return abs_val_string+virgule+(deci_string>0?deci_string:'00');}
|
||||||
|
function formatCurrency(price,currencyFormat,currencySign,currencyBlank)
|
||||||
|
{blank='';price=parseFloat(price.toFixed(6));price=ps_round(price,priceDisplayPrecision);if(currencyBlank>0)
|
||||||
|
blank=' ';if(currencyFormat==1)
|
||||||
|
return currencySign+blank+formatNumber(price,priceDisplayPrecision,',','.');if(currencyFormat==2)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ',',')+blank+currencySign);if(currencyFormat==3)
|
||||||
|
return(currencySign+blank+formatNumber(price,priceDisplayPrecision,'.',','));if(currencyFormat==4)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,',','.')+blank+currencySign);if(currencyFormat==5)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ','.')+blank+currencySign);return price;}
|
||||||
|
function ps_round(value,precision)
|
||||||
|
{if(typeof(roundMode)=='undefined')
|
||||||
|
roundMode=2;if(typeof(precision)=='undefined')
|
||||||
|
precision=2;method=roundMode;if(method==0)
|
||||||
|
return ceilf(value,precision);else if(method==1)
|
||||||
|
return floorf(value,precision);precisionFactor=precision==0?1:Math.pow(10,precision);return Math.round(value*precisionFactor)/precisionFactor;}
|
||||||
|
function autoUrl(name,dest)
|
||||||
|
{var loc;var id_list;id_list=document.getElementById(name);loc=id_list.options[id_list.selectedIndex].value;if(loc!=0)
|
||||||
|
location.href=dest+loc;return;}
|
||||||
|
function autoUrlNoList(name,dest)
|
||||||
|
{var loc;loc=document.getElementById(name).checked;location.href=dest+(loc==true?1:0);return;}
|
||||||
|
function toggle(e,show)
|
||||||
|
{e.style.display=show?'':'none';}
|
||||||
|
function toggleMultiple(tab)
|
||||||
|
{var len=tab.length;for(var i=0;i<len;i++)
|
||||||
|
if(tab[i].style)
|
||||||
|
toggle(tab[i],tab[i].style.display=='none');}
|
||||||
|
function showElemFromSelect(select_id,elem_id)
|
||||||
|
{var select=document.getElementById(select_id);for(var i=0;i<select.length;++i)
|
||||||
|
{var elem=document.getElementById(elem_id+select.options[i].value);if(elem!=null)
|
||||||
|
toggle(elem,i==select.selectedIndex);}}
|
||||||
|
function openCloseAllDiv(name,option)
|
||||||
|
{var tab=$('*[name='+name+']');for(var i=0;i<tab.length;++i)
|
||||||
|
toggle(tab[i],option);}
|
||||||
|
function toggleElemValue(id_button,text1,text2)
|
||||||
|
{var obj=document.getElementById(id_button);if(obj)
|
||||||
|
obj.value=((!obj.value||obj.value==text2)?text1:text2);}
|
||||||
|
function addBookmark(url,title)
|
||||||
|
{if(window.sidebar)
|
||||||
|
return window.sidebar.addPanel(title,url,"");else if(window.external&&('AddFavorite'in window.external))
|
||||||
|
return window.external.AddFavorite(url,title);else if(window.opera&&window.print)
|
||||||
|
return true;return true;}
|
||||||
|
function writeBookmarkLink(url,title,text,img)
|
||||||
|
{var insert='';if(img)
|
||||||
|
insert=writeBookmarkLinkObject(url,title,'<img src="'+img+'" alt="'+escape(text)+'" title="'+removeQuotes(text)+'" />')+' ';insert+=writeBookmarkLinkObject(url,title,text);if(window.sidebar||window.opera&&window.print||(window.external&&('AddFavorite'in window.external)))
|
||||||
|
document.write(insert);}
|
||||||
|
function writeBookmarkLinkObject(url,title,insert)
|
||||||
|
{if(window.sidebar||window.external)
|
||||||
|
return('<a href="javascript:addBookmark(\''+escape(url)+'\', \''+removeQuotes(title)+'\')">'+insert+'</a>');else if(window.opera&&window.print)
|
||||||
|
return('<a rel="sidebar" href="'+escape(url)+'" title="'+removeQuotes(title)+'">'+insert+'</a>');return('');}
|
||||||
|
function checkCustomizations()
|
||||||
|
{var pattern=new RegExp(' ?filled ?');if(typeof customizationFields!='undefined')
|
||||||
|
for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{if(parseInt(customizationFields[i][1])==1&&($('#'+customizationFields[i][0]).html()==''||$('#'+customizationFields[i][0]).text()!=$('#'+customizationFields[i][0]).val())&&!pattern.test($('#'+customizationFields[i][0]).attr('class')))
|
||||||
|
return false;}
|
||||||
|
return true;}
|
||||||
|
function emptyCustomizations()
|
||||||
|
{if(typeof(customizationFields)=='undefined')return;$('.customization_block .success').fadeOut(function(){$(this).remove();});$('.customization_block .error').fadeOut(function(){$(this).remove();});for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{$('#'+customizationFields[i][0]).html('');$('#'+customizationFields[i][0]).val('');}}
|
||||||
|
function ceilf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.ceil(tmp)/precisionFactor;}
|
||||||
|
function floorf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.floor(tmp)/precisionFactor;}
|
||||||
|
function setCurrency(id_currency)
|
||||||
|
{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'index.php'+'?rand='+new Date().getTime(),data:'controller=change-currency&id_currency='+parseInt(id_currency),success:function(msg)
|
||||||
|
{location.reload(true);}});}
|
||||||
|
function isArrowKey(k_ev)
|
||||||
|
{var unicode=k_ev.keyCode?k_ev.keyCode:k_ev.charCode;if(unicode>=37&&unicode<=40)
|
||||||
|
return true;return false;}
|
||||||
|
function removeQuotes(value)
|
||||||
|
{value=value.replace(/\\"/g,'');value=value.replace(/"/g,'');value=value.replace(/\\'/g,'');value=value.replace(/'/g,'');return value;}
|
||||||
|
function sprintf(format)
|
||||||
|
{for(var i=1;i<arguments.length;i++)
|
||||||
|
format=format.replace(/%s/,arguments[i]);return format;}
|
||||||
|
function fancyMsgBox(msg,title)
|
||||||
|
{if(title)msg="<h2>"+title+"</h2><p>"+msg+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\"><input class=\"button\" type=\"button\" value=\"OK\" onclick=\"$.fancybox.close();\" /></p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
function fancyChooseBox(question,title,buttons,otherParams)
|
||||||
|
{var msg,funcName,action;if(title)msg="<h2>"+title+"</h2><p>"+question+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\">";var i=0;for(var caption in buttons){if(!buttons.hasOwnProperty(caption))continue;funcName=buttons[caption];if(typeof otherParams=='undefined')otherParams=0;otherParams=escape(JSON.stringify(otherParams));action=funcName?"$.fancybox.close();window['"+funcName+"'](JSON.parse(unescape('"+otherParams+"')), "+i+")":"$.fancybox.close()";msg+='<input class="button" style="margin-right: 5px" type="button" value="'+caption+'" onclick="'+action+'" />';i++;}
|
||||||
|
msg+="</p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
$().ready(function()
|
||||||
|
{$('form').submit(function()
|
||||||
|
{$(this).find('.hideOnSubmit').hide();});$('a._blank').attr('target','_blank');});;
|
||||||
|
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||||
|
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
||||||
|
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(Line truncated
|
||||||
|
$(document).ready(function(){quick_view();});;function PS_SE_HandleEvent()
|
||||||
|
{$(document).ready(function(){$('#id_country').change(function(){resetAjaxQueries();updateStateByIdCountry();});if(SE_RefreshMethod==0)
|
||||||
|
{$('#id_state').change(function(){resetAjaxQueries();updateCarriersList();});$('#zipcode').bind('keyup',function(e){if(e.keyCode=='13')
|
||||||
|
{resetAjaxQueries();updateCarriersList();}});}
|
||||||
|
$('#update_carriers_list').click(function(){updateCarriersList();});$('#carriercompare_submit').click(function(){resetAjaxQueries();saveSelection();return false;});updateStateByIdCountry();});}
|
||||||
|
function displayWaitingAjax(type,message)
|
||||||
|
{$('#SE_AjaxDisplay').find('p').html(message);$('#SE_AjaxDisplay').css('display',type);}
|
||||||
|
function updateStateByIdCountry()
|
||||||
|
{$('#id_state').children().remove();$('#availableCarriers').slideUp('fast');$('#states').slideUp('fast');displayWaitingAjax('block',SE_RefreshStateTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getStates&id_country='+$('#id_country').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(state in json)
|
||||||
|
{$('#id_state').append('<option value=\''+json[state].id_state+'\' '+(id_state==json[state].id_state?'selected="selected"':'')+'>'+json[state].name+'</option>');}
|
||||||
|
$('#states').slideDown('fast');}
|
||||||
|
if(SE_RefreshMethod==0)
|
||||||
|
updateCarriersList();displayWaitingAjax('none','');}});ajaxQueries.push(query);}
|
||||||
|
function updateCarriersList()
|
||||||
|
{$('#carriercompare_errors_list').children().remove();$('#availableCarriers').slideUp('normal',function(){$(this).find(('tbody')).children().remove();$('#noCarrier').slideUp('fast');displayWaitingAjax('block',SE_RetrievingInfoTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getCarriers&id_country='+$('#id_country').val()+'&id_state='+$('#id_state').val()+'&zipcode='+$('#zipcode').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(carrier in json)
|
||||||
|
{var html='<tr class="'+(carrier%2?'alternate_':'')+'item">'+'<td class="carrier_action">'+'<input type="radio" name="id_carrier" value="'+json[carrier].id_carrier+'" id="id_carrier'+json[carrier].id_carrier+'" '+(id_carrier==json[carrier].id_carrier?'checked="checked"':'')+'/>'+'</td>'+'<td class="carrier_name">'+'<label for="id_carrier'+json[carrier].id_carrier+'">'+
|
||||||
|
(json[carrier].img?'<img src="'+json[carrier].img+'" alt="'+json[carrier].name+'" />':json[carrier].name)+'</label>'+'</td>'+'<td class="carrier_infos">'+((json[carrier].delay!=null)?json[carrier].delay:'')+'</td>'+'<td class="carrier_price">';if(json[carrier].price)
|
||||||
|
{html+='<span class="price">'+(displayPrice==1?formatCurrency(json[carrier].price_tax_exc,currencyFormat,currencySign,currencyBlank):formatCurrency(json[carrier].price,currencyFormat,currencySign,currencyBlank))+'</span>';}
|
||||||
|
else
|
||||||
|
{html+=txtFree;}
|
||||||
|
html+='</td>'+'</tr>';$('#carriers_list').append(html);}
|
||||||
|
displayWaitingAjax('none','');$('#availableCarriers').slideDown();}
|
||||||
|
else
|
||||||
|
{displayWaitingAjax('none','');$('#noCarrier').slideDown();}}});ajaxQueries.push(query);});}
|
||||||
|
function saveSelection()
|
||||||
|
{$('#carriercompare_errors').slideUp();$('#carriercompare_errors_list').children().remove();displayWaitingAjax('block',SE_RedirectTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=saveSelection&'+$('#compare_shipping_form').serialize(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(error in json)
|
||||||
|
$('#carriercompare_errors_list').append('<li>'+json[error]+'</li>');$('#carriercompare_errors').slideDown();displayWaitingAjax('none','');}
|
||||||
|
else
|
||||||
|
{$('.SE_SubmitRefreshCard').fadeOut('fast');location.reload(true);}}});ajaxQueries.push(query);return false;}
|
||||||
|
var ajaxQueries=new Array();function resetAjaxQueries()
|
||||||
|
{for(i=0;i<ajaxQueries.length;++i)
|
||||||
|
ajaxQueries[i].abort();ajaxQueries=new Array();};if(typeof baseUri==="undefined"&&typeof baseDir!=="undefined")
|
||||||
|
baseUri=baseDir;var ajaxCart={nb_total_products:0,overrideButtonsInThePage:function(){$('.ajax_add_to_cart_button').unbind('click').click(function(){var idProduct=$(this).attr('rel').replace('nofollow','').replace('ajax_id_product_','');if($(this).attr('disabled')!='disabled')
|
||||||
|
ajaxCart.add(idProduct,null,false,this);return false;});$('#add_to_cart button').unbind('click').click(function(){ajaxCart.add($('#product_page_product_id').val(),$('#idCombination').val(),true,null,$('#quantity_wanted').val(),null);return false;});$('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){var customizationId=0;var productId=0;var productAttributeId=0;var customizableProductDiv=$($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]");if(customizableProductDiv&&$(customizableProductDiv).length)
|
||||||
|
{$(customizableProductDiv).each(function(){var ids=$(this).attr('id').split('_');if(typeof(ids[1])!='undefined')
|
||||||
|
{customizationId=parseInt(ids[1]);productId=parseInt(ids[2]);if(typeof(ids[3])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[3]);return false;}});}
|
||||||
|
if(!customizationId)
|
||||||
|
{var firstCut=$(this).parent().parent().attr('id').replace('cart_block_product_','');firstCut=firstCut.replace('deleteCustomizableProduct_','');ids=firstCut.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[1]);}
|
||||||
|
var idAddressDelivery=$(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1];ajaxCart.remove(productId,productAttributeId,customizationId,idAddressDelivery);return false;});},expand:function(){if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
{$('#cart_block_summary').slideUp(200,function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_list').slideDown({duration:450,complete:function(){$(this).addClass('expanded').removeClass('collapsed');}});});$('#block_cart_expand').fadeOut('slow',function(){$('#block_cart_collapse').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=expand'});}},refresh:function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&ajax=true&token='+static_token,success:function(jsonData)
|
||||||
|
{ajaxCart.updateCart(jsonData);}});},collapse:function(){if($('#cart_block_list').hasClass('expanded'))
|
||||||
|
{$('#cart_block_list').slideUp('slow',function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_summary').slideDown(450,function(){$(this).addClass('expanded').removeClass('collapsed');});});$('#block_cart_collapse').fadeOut('slow',function(){$('#block_cart_expand').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=collapse'+'&rand='+new Date().getTime()});}},updateCartInformation:function(jsonData,addedFromProductPage)
|
||||||
|
{ajaxCart.updateCart(jsonData);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$('.ajax_add_to_cart_button').removeAttr('disabled');},add:function(idProduct,idCombination,addedFromProductPage,callerElement,quantity,whishlist){if(addedFromProductPage&&!checkCustomizations())
|
||||||
|
{alert(fieldRequired);return;}
|
||||||
|
emptyCustomizations();if(addedFromProductPage)
|
||||||
|
{$('#add_to_cart button').attr('disabled',true).addClass('disabled');$('.filled').removeClass('filled');}
|
||||||
|
else
|
||||||
|
$(callerElement).attr('disabled',true);if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
this.expand();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&add=1&ajax=true&qty='+((quantity&&quantity!=null)?quantity:'1')+'&id_product='+idProduct+'&token='+static_token+((parseInt(idCombination)&&idCombination!=null)?'&ipa='+parseInt(idCombination):''),success:function(jsonData,textStatus,jqXHR)
|
||||||
|
{if(whishlist&&!jsonData.errors)
|
||||||
|
WishlistAddProductCart(whishlist[0],idProduct,idCombination,whishlist[1]);var $element=$(callerElement).parents('.ajax_block_product').find('a.product_image img,a.product_img_link img');if(!$element.length)
|
||||||
|
$element=$('#bigpic');var $picture=$element.clone();var pictureOffsetOriginal=$element.offset();pictureOffsetOriginal.right=$(window).innerWidth()-pictureOffsetOriginal.left-$element.width();if($picture.length)
|
||||||
|
{$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right});}
|
||||||
|
if(typeof(contentOnly)!='undefined'){var $contentOnly=contentOnly;}
|
||||||
|
var pictureOffset=$picture.offset();if(($contentOnly&&$contentOnly!=true)||!$contentOnly){var cartBlock=$('#cart_block');if(!$('#cart_block')[0]||!$('#cart_block').offset().top||!$('#cart_block').offset().left)
|
||||||
|
cartBlock=$('#shopping_cart');var cartBlockOffset=cartBlock.offset();cartBlockOffset.right=$(window).innerWidth()-cartBlockOffset.left-cartBlock.width();}
|
||||||
|
if(cartBlockOffset!=undefined&&$picture.length&&(($contentOnly&&$contentOnly!=true)||!$contentOnly))
|
||||||
|
{$picture.appendTo('body');$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right,zIndex:4242}).animate({width:$element.attr('width')*0.66,height:$element.attr('height')*0.66,opacity:0.2,top:cartBlockOffset.top+30,right:cartBlockOffset.right+15},1000).fadeOut(100,function(){ajaxCart.updateCartInformation(jsonData,addedFromProductPage);$(this).remove();if(!jsonData.hasError)
|
||||||
|
{$('.crossseling').html(jsonData.crossSelling)
|
||||||
|
$(jsonData.products).each(function(){if(this.id!=undefined&&this.id==parseInt(idProduct))
|
||||||
|
ajaxCart.updateLayer(this);});}});}
|
||||||
|
else if($contentOnly&&$contentOnly!=false){window.parent.ajaxCart.updateCartInformation(jsonData,addedFromProductPage);ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}
|
||||||
|
else{ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}},error:function(XMLHttpRequest,textStatus,errorThrown)
|
||||||
|
{alert("Impossible to add the product to the cart.\n\ntextStatus: '"+textStatus+"'\nerrorThrown: '"+errorThrown+"'\nresponseText:\n"+XMLHttpRequest.responseText);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$(callerElement).removeAttr('disabled');}});},remove:function(idProduct,idCombination,customizationId,idAddressDelivery){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&delete=1&id_product='+idProduct+'&ipa='+((idCombination!=null&&parseInt(idCombination))?idCombination:'')+((customizationId&&customizationId!=null)?'&id_customization='+customizationId:'')+'&id_address_delivery='+idAddressDelivery+'&token='+static_token+'&ajax=true',success:function(jsonData){ajaxCart.updateCart(jsonData);if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery);},error:function(){alert('ERROR: unable to delete the product');}});},hideOldProducts:function(jsonData){if($('#cart_block_list dl.products').length>0)
|
||||||
|
{var removedProductId=null;var removedProductData=null;var removedProductDomId=null;$('#cart_block_list dl.products dt').each(function(){var domIdProduct=$(this).attr('id');var firstCut=domIdProduct.replace('cart_block_product_','');var ids=firstCut.split('_');var stayInTheCart=false;for(aProduct in jsonData.products)
|
||||||
|
{if(jsonData.products[aProduct]['id']==ids[0]&&(!ids[1]||jsonData.products[aProduct]['idCombination']==ids[1]))
|
||||||
|
{stayInTheCart=true;ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct],domIdProduct);}}
|
||||||
|
if(!stayInTheCart)
|
||||||
|
{removedProductId=$(this).attr('id');if(removedProductId!=null)
|
||||||
|
{var firstCut=removedProductId.replace('cart_block_product_','');var ids=firstCut.split('_');$('#'+removedProductId).addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow',function(){$(this).remove();if($('#cart_block dl.products dt').length==0)
|
||||||
|
{$("#cart_block").stop(true,true).slideUp(200);$('#cart_block_no_products:hidden').slideDown(450);$('#cart_block dl.products').remove();}});});$('#cart_block_combination_of_'+ids[0]+(ids[1]?'_'+ids[1]:'')+(ids[2]?'_'+ids[2]:'')).fadeTo('fast',0,function(){$(this).slideUp('fast',function(){$(this).remove();});});}}});}},hideOldProductCustomizations:function(product,domIdProduct)
|
||||||
|
{var customizationList=$('#customization_'+product['id']+'_'+product['idCombination']);if(customizationList.length>0)
|
||||||
|
{$(customizationList).find("li").each(function(){$(this).find("div").each(function(){var customizationDiv=$(this).attr('id');var tmp=customizationDiv.replace('deleteCustomizableProduct_','');var ids=tmp.split('_');if((parseInt(product.idCombination)==parseInt(ids[2]))&&!ajaxCart.doesCustomizationStillExist(product,ids[0]))
|
||||||
|
$('#'+customizationDiv).parent().addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow');$(this).remove();});});});}
|
||||||
|
var removeLinks=$('#'+domIdProduct).find('.ajax_cart_block_remove_link');if(!product.hasCustomizedDatas&&!removeLinks.length)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="'+baseUri+'?controller=cart&delete=1&id_product='+product['id']+'&ipa='+product['idCombination']+'&token='+static_token+'"> </a>');if(product.is_gift)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('');},doesCustomizationStillExist:function(product,customizationId)
|
||||||
|
{var exists=false;$(product.customizedDatas).each(function(){if(this.customizationId==customizationId)
|
||||||
|
{exists=true;return false;}});return(exists);},refreshVouchers:function(jsonData){if(typeof(jsonData.discounts)=='undefined'||jsonData.discounts.length==0)
|
||||||
|
$('#vouchers').hide();else
|
||||||
|
{$('#vouchers tbody').html('');for(i=0;i<jsonData.discounts.length;i++)
|
||||||
|
{if(parseFloat(jsonData.discounts[i].price_float)>0)
|
||||||
|
{var delete_link='';if(jsonData.discounts[i].code.length)
|
||||||
|
delete_link='<a class="delete_voucher" href="'+jsonData.discounts[i].link+'" title="'+delete_txt+'"><i class="icon-remove-sign"></i></a>';$('#vouchers tbody').append($('<tr class="bloc_cart_voucher" id="bloc_cart_voucher_'+jsonData.discounts[i].id+'">'
|
||||||
|
+' <td class="quantity">1x</td>'
|
||||||
|
+' <td class="name" title="'+jsonData.discounts[i].description+'">'+jsonData.discounts[i].name+'</td>'
|
||||||
|
+' <td class="price">-'+jsonData.discounts[i].price+'</td>'
|
||||||
|
+' <td class="delete">'+delete_link+'</td>'
|
||||||
|
+'</tr>'));}}
|
||||||
|
$('#vouchers').show();}},updateProductQuantity:function(product,quantity){$('#cart_block_product_'+product.id+'_'+(product.idCombination?product.idCombination:'0')+'_'+(product.idAddressDelivery?product.idAddressDelivery:'0')+' .quantity').fadeTo('fast',0,function(){$(this).text(quantity);$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1);});});});});});},displayNewProducts:function(jsonData){$(jsonData.products).each(function(){if(this.id!=undefined)
|
||||||
|
{if($('#cart_block dl.products').length==0)
|
||||||
|
{$('#cart_block_no_products').before('<dl class="products"></dl>');$('#cart_block_no_products').hide();}
|
||||||
|
var domIdProduct=this.id+'_'+(this.idCombination?this.idCombination:'0')+'_'+(this.idAddressDelivery?this.idAddressDelivery:'0');var domIdProductAttribute=this.id+'_'+(this.idCombination?this.idCombination:'0');if($('#cart_block_product_'+domIdProduct).length==0)
|
||||||
|
{var productId=parseInt(this.id);var productAttributeId=(this.hasAttributes?parseInt(this.attributes):0);var content='<dt class="unvisible" id="cart_block_product_'+domIdProduct+'">';content+='<a class="cart-images" href="'+this.link+'" title="'+this.name.substring(0,12)+'"><img src="'+this.image_cart+'" alt="'+this.name+'"></a>';var min=this.name.indexOf(';',10);var name=(this.name.length>12?this.name.substring(0,((min-10)<=7)?min:10)+'...':this.name);content+='<div class="cart-info"><div class="product-name"><a href="'+this.link+'" title="'+this.name+'" class="cart_block_product_name">'+name+'</a></div>';if(this.hasAttributes)
|
||||||
|
content+='<div class="product-atributes"><a href="'+this.link+'" title="'+this.name+'">'+this.attributes+'</a></div>';content+='<span class="quantity-formated"><span class="quantity">'+this.quantity+'</span>x </span>';if(typeof(freeProductTranslation)!='undefined')
|
||||||
|
content+='<span class="price">'+(parseFloat(this.price_float)>0?this.priceByLine:freeProductTranslation)+'</span></div>';if(typeof(this.is_gift)=='undefined'||this.is_gift==0)
|
||||||
|
content+='<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&token='+static_token+(this.hasAttributes?'&ipa='+parseInt(this.idCombination):'')+'"> </a></span>';else
|
||||||
|
content+='<span class="remove_link"></span>';content+='</dt>';if(this.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+domIdProduct+'" class="unvisible">';if(this.hasCustomizedDatas)
|
||||||
|
content+=ajaxCart.displayNewCustomizedDatas(this);if(this.hasAttributes)content+='</dd>';$('#cart_block dl.products').append(content);}
|
||||||
|
else
|
||||||
|
{var jsonProduct=this;if($.trim($('#cart_block_product_'+domIdProduct+' .quantity').html())!=jsonProduct.quantity||$.trim($('#cart_block_product_'+domIdProduct+' .price').html())!=jsonProduct.priceByLine)
|
||||||
|
{if(!this.is_gift)
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').text(jsonProduct.priceByLine);else
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').html(freeProductTranslation);ajaxCart.updateProductQuantity(jsonProduct,jsonProduct.quantity);if(jsonProduct.hasCustomizedDatas)
|
||||||
|
{customizationFormatedDatas=ajaxCart.displayNewCustomizedDatas(jsonProduct);if(!$('#customization_'+domIdProductAttribute).length)
|
||||||
|
{if(jsonProduct.hasAttributes)
|
||||||
|
$('#cart_block_combination_of_'+domIdProduct).append(customizationFormatedDatas);else
|
||||||
|
$('#cart_block dl.products').append(customizationFormatedDatas);}
|
||||||
|
else
|
||||||
|
{$('#customization_'+domIdProductAttribute).html('');$('#customization_'+domIdProductAttribute).append(customizationFormatedDatas);}}}}
|
||||||
|
$('#cart_block dl.products .unvisible').slideDown(450).removeClass('unvisible');var removeLinks=$('#cart_block_product_'+domIdProduct).find('a.ajax_cart_block_remove_link');if(this.hasCustomizedDatas&&removeLinks.length)
|
||||||
|
$(removeLinks).each(function(){$(this).remove();});}});},displayNewCustomizedDatas:function(product)
|
||||||
|
{var content='';var productId=parseInt(product.id);var productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);var hasAlreadyCustomizations=$('#customization_'+productId+'_'+productAttributeId).length;if(!hasAlreadyCustomizations)
|
||||||
|
{if(!product.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+productId+'" class="unvisible">';if($('#customization_'+productId+'_'+productAttributeId).val()==undefined)
|
||||||
|
content+='<ul class="cart_block_customizations" id="customization_'+productId+'_'+productAttributeId+'">';}
|
||||||
|
$(product.customizedDatas).each(function()
|
||||||
|
{var done=0;customizationId=parseInt(this.customizationId);productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);content+='<li name="customization"><div class="deleteCustomizableProduct" id="deleteCustomizableProduct_'+customizationId+'_'+productId+'_'+(productAttributeId?productAttributeId:'0')+'"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&ipa='+productAttributeId+'&id_customization='+customizationId+'&token='+static_token+'"></a></div><span class="quantity-formated"><span class="quantity">'+parseInt(this.quantity)+'</span>x</span>';$(this.datas).each(function(){if(this['type']==CUSTOMIZE_TEXTFIELD)
|
||||||
|
{$(this.datas).each(function(){if(this['index']==0)
|
||||||
|
{content+=' '+this.truncatedValue.replace(/<br \/>/g,' ');done=1;return false;}})}});if(!done)
|
||||||
|
content+=customizationIdMessage+customizationId;if(!hasAlreadyCustomizations)content+='</li>';if(customizationId)
|
||||||
|
{$('#uploadable_files li div.customizationUploadBrowse img').remove();$('#text_fields input').attr('value','');}});if(!hasAlreadyCustomizations)
|
||||||
|
{content+='</ul>';if(!product.hasAttributes)content+='</dd>';}
|
||||||
|
return(content);},updateLayer:function(product){$('#layer_cart_product_title').text(product.name);$('#layer_cart_product_attributes').text('');if(product.hasAttributes&&product.hasAttributes==true)
|
||||||
|
$('#layer_cart_product_attributes').html(product.attributes);$('#layer_cart_product_price').text(product.price);$('#layer_cart_product_quantity').text(product.quantity);$('.layer_cart_img').prop({'src':product.image,'alt':product.name,'title':product.name});var h=parseInt($(window).height());var s=parseInt($(window).scrollTop());var t=$('#layer_cart').outerHeight(true);if(t<h)
|
||||||
|
var n=parseInt(((h-t)/2)+s)+'px';$('.layer_cart_overlay').css('width','100%');$('.layer_cart_overlay').css('height','100%');$('.layer_cart_overlay').show();$('#layer_cart').css({'top':n}).fadeIn('fast');crossselling_serialScroll();},updateCart:function(jsonData){if(jsonData.hasError)
|
||||||
|
{var errors='';for(error in jsonData.errors)
|
||||||
|
if(error!='indexOf')
|
||||||
|
errors+=$('<div />').html(jsonData.errors[error]).text()+"\n";alert(errors);}
|
||||||
|
else
|
||||||
|
{ajaxCart.updateCartEverywhere(jsonData);ajaxCart.hideOldProducts(jsonData);ajaxCart.displayNewProducts(jsonData);ajaxCart.refreshVouchers(jsonData);$('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item');$('#cart_block .products dt:first').addClass('first_item');$('#cart_block .products dt:not(:first,:last)').addClass('item');$('#cart_block .products dt:last').addClass('last_item');ajaxCart.overrideButtonsInThePage();}},updateCartEverywhere:function(jsonData){$('.ajax_cart_total').text($.trim(jsonData.productTotal));if(parseFloat(jsonData.shippingCostFloat)>0||jsonData.nbTotalProducts<1)
|
||||||
|
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);else if(typeof(freeShippingTranslation)!='undefined')
|
||||||
|
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);$('.ajax_cart_tax_cost').text(jsonData.taxCost);$('.cart_block_wrapping_cost').text(jsonData.wrappingCost);$('.ajax_block_cart_total').text(jsonData.total);$('.ajax_block_products_total').text(jsonData.productTotal);$('.ajax_total_price_wt').text(jsonData.total_price_wt);if(parseFloat(jsonData.freeShippingFloat)>0)
|
||||||
|
{$('.ajax_cart_free_shipping').html(jsonData.freeShipping);$('.freeshipping').fadeIn(0);}
|
||||||
|
else if(parseFloat(jsonData.freeShippingFloat)==0)
|
||||||
|
$('.freeshipping').fadeOut(0);this.nb_total_products=jsonData.nbTotalProducts;if(parseInt(jsonData.nbTotalProducts)>0)
|
||||||
|
{$('.ajax_cart_no_product').hide();$('.ajax_cart_quantity').text(jsonData.nbTotalProducts);$('.ajax_cart_quantity').fadeIn('slow');$('.ajax_cart_total').fadeIn('slow');if(parseInt(jsonData.nbTotalProducts)>1)
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).hide();});$('.ajax_cart_product_txt_s').each(function(){$(this).show();});}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).show();});$('.ajax_cart_product_txt_s').each(function(){$(this).hide();});}}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){$(this).hide();});$('.ajax_cart_no_product').show('slow');}}};$(document).ready(function()
|
||||||
|
{$('#block_cart_collapse').click(function(){ajaxCart.collapse();});$('#block_cart_expand').click(function(){ajaxCart.expand();});ajaxCart.overrideButtonsInThePage();var cart_qty=0;var current_timestamp=parseInt(new Date().getTime()/1000);if(typeof $('.ajax_cart_quantity').html()=='undefined'||(typeof generated_date!='undefined'&&generated_date!=null&&(parseInt(generated_date)+30)<current_timestamp))
|
||||||
|
ajaxCart.refresh();else
|
||||||
|
cart_qty=parseInt($('.ajax_cart_quantity').html());var cart_block=new HoverWatcher('#cart_block');var shopping_cart=new HoverWatcher('#shopping_cart');$("#shopping_cart a:first").hover(function(){if(ajaxCart.nb_total_products>0||cart_qty>0)
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideDown(450);},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver()&&!cart_block.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$("#header_right #cart_block").hover(function(){},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$('.delete_voucher').live('click',function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},async:true,cache:false,url:$(this).attr('href')+'?rand='+new Date().getTime()});$(this).parent().parent().remove();if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
{if(typeof(updateAddressSelection)!='undefined')
|
||||||
|
updateAddressSelection();else
|
||||||
|
location.reload();}
|
||||||
|
return false;});$('#cart_navigation input').click(function(){$(this).attr('disabled',true).addClass('disabled');$(this).closest("form").get(0).submit();});$('#layer_cart .cross, #layer_cart .continue, .layer_cart_overlay').click(function(){$('.layer_cart_overlay').hide();$('#layer_cart').fadeOut('fast');return false;});});function HoverWatcher(selector){this.hovering=false;var self=this;this.isHoveringOver=function(){return self.hovering;}
|
||||||
|
$(selector).hover(function(){self.hovering=true;},function(){self.hovering=false;})}
|
||||||
|
function crossselling_serialScroll()
|
||||||
|
{$('#blockcart_caroucel').bxSlider({minSlides:2,maxSlides:4,slideWidth:178,slideMargin:20,moveSlides:1,infiniteLoop:false,hideControlOnEnd:true,pager:false});};;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);;;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);;;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(optioLine truncated
|
||||||
|
break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}
|
||||||
|
break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}
|
||||||
|
break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}
|
||||||
|
if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}
|
||||||
|
$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])
|
||||||
|
cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)
|
||||||
|
return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}
|
||||||
|
v+=options.multipleSeparator;}
|
||||||
|
$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}
|
||||||
|
function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}
|
||||||
|
var currentValue=$input.val();if(!skipPrevCheck&¤tValue==previousValue)
|
||||||
|
return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)
|
||||||
|
currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value){return[""];}
|
||||||
|
var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))
|
||||||
|
result[i]=$.trim(value);});return result;}
|
||||||
|
function lastWord(value){if(!options.multiple)
|
||||||
|
return value;var words=trimWords(value);return words[words.length-1];}
|
||||||
|
function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}
|
||||||
|
else
|
||||||
|
$input.val("");}});}
|
||||||
|
if(wasVisible)
|
||||||
|
$.Autocompleter.Selection(input,input.value.length,input.value.length);};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)
|
||||||
|
term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}
|
||||||
|
return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)
|
||||||
|
s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}
|
||||||
|
if(!data[q]){length++;}
|
||||||
|
data[q]=value;}
|
||||||
|
function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)
|
||||||
|
continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])
|
||||||
|
stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}
|
||||||
|
setTimeout(populate,25);function flush(){data={};length=0;}
|
||||||
|
return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)
|
||||||
|
return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}
|
||||||
|
return csub;}else
|
||||||
|
if(data[q]){return data[q];}else
|
||||||
|
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}
|
||||||
|
return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)
|
||||||
|
return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)
|
||||||
|
element.css("width",options.width);needsInit=false;}
|
||||||
|
function target(event){var element=event.target;while(element&&element.tagName!="LI")
|
||||||
|
element=element.parentNode;if(!element)
|
||||||
|
return[];return element;}
|
||||||
|
function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}
|
||||||
|
function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}
|
||||||
|
function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])
|
||||||
|
continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)
|
||||||
|
continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}
|
||||||
|
listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}
|
||||||
|
if($.fn.bgiframe)
|
||||||
|
list.bgiframe();}
|
||||||
|
return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
|
||||||
|
field.focus();};})(jQuery);;$('document').ready(function(){$('#favoriteproducts_block_extra_add').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_add').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_remove').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_remove').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_added').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_added').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_removed').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_removed').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});});;function WishlistCart(id,action,id_product,id_product_attribute,quantity)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,cache:false,data:'action='+action+'&id_product='+id_product+'&quantity='+quantity+'&token='+static_token+'&id_product_attribute='+id_product_attribute,success:function(data)
|
||||||
|
{if(action=='add')
|
||||||
|
{if(isLoggedWishlist==true){alert('Adedd to wishlist')}
|
||||||
|
else{alert('You must be logged in to manage your wishlist.')}}
|
||||||
|
if($('#'+id).length!=0)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}}});}
|
||||||
|
function WishlistChangeDefault(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,data:'id_wishlist='+id_wishlist+'&token='+static_token,cache:false,success:function(data)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}});}
|
||||||
|
function WishlistBuyProduct(token,id_product,id_product_attribute,id_quantity,button,ajax)
|
||||||
|
{if(ajax)
|
||||||
|
ajaxCart.add(id_product,id_product_attribute,false,button,1,[token,id_quantity]);else
|
||||||
|
{$('#'+id_quantity).val(0);WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].method='POST';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].action=baseUri+'?controller=cart';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].elements['token'].value=static_token;document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].submit();}
|
||||||
|
return(true);}
|
||||||
|
function WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
{if($('#'+id_quantity).val()<=0)
|
||||||
|
return(false);$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/buywishlistproduct.php',data:'token='+token+'&static_token='+static_token+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute,async:true,cache:false,success:function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
{$('#'+id_quantity).val($('#'+id_quantity).val()-1);}}});return(true);}
|
||||||
|
function WishlistManage(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'id_wishlist='+id_wishlist+'&refresh='+false,cache:false,success:function(data)
|
||||||
|
{$('#'+id).hide();document.getElementById(id).innerHTML=data;$('#'+id).fadeIn('slow');}});}
|
||||||
|
function WishlistProductManage(id,action,id_wishlist,id_product,id_product_attribute,quantity,priority)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'action='+action+'&id_wishlist='+id_wishlist+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute+'&quantity='+quantity+'&priority='+priority+'&refresh='+true,cache:false,success:function(data)
|
||||||
|
{if(action=='delete')
|
||||||
|
$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');else if(action=='update')
|
||||||
|
{$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');$('#wlp_'+id_product+'_'+id_product_attribute).fadeIn('fast');}}});}
|
||||||
|
function WishlistDelete(id,id_wishlist,msg)
|
||||||
|
{var res=confirm(msg);if(res==false)
|
||||||
|
return(false);$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/mywishlist.php',cache:false,data:'deleted&id_wishlist='+id_wishlist,success:function(data)
|
||||||
|
{$('#'+id).fadeOut('slow');}});}
|
||||||
|
function WishlistVisibility(bought_class,id_button)
|
||||||
|
{if($('#hide'+id_button).css('display')=='none')
|
||||||
|
{$('.'+bought_class).slideDown('fast');$('#show'+id_button).hide();$('#hide'+id_button).css('display','block');}
|
||||||
|
else
|
||||||
|
{$('.'+bought_class).slideUp('fast');$('#hide'+id_button).hide();$('#show'+id_button).css('display','block');}}
|
||||||
|
function WishlistSend(id,id_wishlist,id_email)
|
||||||
|
{$.post(baseDir+'modules/blockwishlist/sendwishlist.php',{token:static_token,id_wishlist:id_wishlist,email1:$('#'+id_email+'1').val(),email2:$('#'+id_email+'2').val(),email3:$('#'+id_email+'3').val(),email4:$('#'+id_email+'4').val(),email5:$('#'+id_email+'5').val(),email6:$('#'+id_email+'6').val(),email7:$('#'+id_email+'7').val(),email8:$('#'+id_email+'8').val(),email9:$('#'+id_email+'9').val(),email10:$('#'+id_email+'10').val()},function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
WishlistVisibility(id,'hideSendWishlist');});};$(document).ready(function(){$('#crossselling_list_car').bxSlider({minSlides:2,maxSlides:6,slideWidth:178,slideMargin:20,pager:false,nextText:'',prevText:'',moveSlides:1,infiniteLoop:false,hideControlOnEnd:true});});;$(document).ready(function(){$('#bxslider1').bxSlider({minSlides:2,maxSlides:6,slideWidth:178,slideMargin:20,pager:false,nextText:'',prevText:'',moveSlides:1,infiniteLoop:false,hideControlOnEnd:true});});;function openBranch(jQueryElement,noAnimation){jQueryElement.addClass('OPEN').removeClass('CLOSE');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').show();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideDown();}
|
||||||
|
function closeBranch(jQueryElement,noAnimation){jQueryElement.addClass('CLOSE').removeClass('OPEN');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').hide();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideUp();}
|
||||||
|
function toggleBranch(jQueryElement,noAnimation){if(jQueryElement.hasClass('OPEN'))
|
||||||
|
closeBranch(jQueryElement,noAnimation);else
|
||||||
|
openBranch(jQueryElement,noAnimation);}
|
||||||
|
$(document).ready(function(){if(!$('ul.tree.dhtml').hasClass('dynamized'))
|
||||||
|
{$('ul.tree.dhtml ul').prev().before("<span class='grower OPEN'> </span>");$('ul.tree.dhtml ul li:last-child, ul.tree.dhtml li:last-child').addClass('last');$('ul.tree.dhtml span.grower.OPEN').addClass('CLOSE').removeClass('OPEN').parent().find('ul:first').hide();$('ul.tree.dhtml').show();$('ul.tree.dhtml .selected').parents().each(function(){if($(this).is('ul'))
|
||||||
|
toggleBranch($(this).prev().prev(),true);});toggleBranch($('ul.tree.dhtml .selected').prev(),true);$('ul.tree.dhtml span.grower').click(function(){toggleBranch($(this));});$('ul.tree.dhtml').addClass('dynamized');$('ul.tree.dhtml').removeClass('dhtml');}});;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
|
||||||
|
if(p==this){return false;}
|
||||||
|
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
|
||||||
|
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);;;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
|
||||||
|
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'fast',autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);jQuery(function(){jQuery('ul.sf-menu').superfish();});;!function(t){var e={},s={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){}};t.fn.bxSlider=function(n){if(0==this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var o={},r=this;e.el=this;var a=t(window).width(),l=t(window).height(),d=function(){o.settings=t.extend({},s,n),o.settings.slideWidth=parseInt(o.settings.slideWidth),o.children=r.children(o.settings.slideSelector),o.children.length<o.settings.minSlides&&(o.settings.minSlides=o.children.length),o.children.length<o.settings.maxSlides&&(o.settings.maxSlides=o.children.length),o.settings.randomStart&&(o.settings.startSlide=Math.floor(Math.random()*o.children.length)),o.active={index:o.settings.startSlide},o.carousel=o.settings.minSlides>1||o.settings.maxSlides>1,o.carousel&&(o.settings.preloadImages="all"),o.minThreshold=o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left",o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return o.cssPrefix=e[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix+"-transform",!0;return!1}(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),r.data("origStyle",r.attr("style")),r.children(o.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),c()},c=function(){r.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>'),o.viewport=r.parent(),o.loader=t('<div class="bx-loading" />'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?100*o.children.length+215+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.easing?r.css("-"+o.cssPrefix+"-transition-timing-function",o.settings.easing):o.settings.easing||(o.settings.easing="swing"),f(),o.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),o.viewport.parent().css({maxWidth:v()}),o.settings.pager||o.viewport.parent().css({margin:"0 auto 0px"}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyle:"none",position:"relative"}),o.children.css("width",u()),"horizontal"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargin),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBottom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"absolute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:50,display:"block"})),o.controls.el=t('<div class="bx-controls" />'),o.settings.captions&&P(),o.active.last=o.settings.startSlide==x()-1,o.settings.video&&r.fitVids();var e=o.children.eq(o.settings.startSlide);"all"==o.settings.preloadImages&&(e=o.children),o.settings.ticker?o.settings.pager=Line truncated
|
||||||
|
homeslider_speed=500;if(typeof(homeslider_pause)=='undefined')
|
||||||
|
homeslider_pause=3000;if(typeof(homeslider_loop)=='undefined')
|
||||||
|
homeslider_loop=true;$('#homeslider').bxSlider({infiniteLoop:homeslider_loop,hideControlOnEnd:true,pager:false,autoHover:true,auto:homeslider_loop,speed:homeslider_speed,pause:homeslider_pause,controls:true});});;
|
||||||
@@ -0,0 +1,440 @@
|
|||||||
|
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
|
||||||
|
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="stringLine truncated
|
||||||
|
/*!
|
||||||
|
* jQuery Migrate - v1.2.1 - 2013-05-08
|
||||||
|
* https://github.com/jquery/jquery-migrate
|
||||||
|
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
|
||||||
|
*/
|
||||||
|
(function(jQuery,window,undefined){jQuery.migrateMute=true;var warnedAbout={};jQuery.migrateWarnings=[];if(!jQuery.migrateMute&&window.console&&window.console.log){window.console.log("JQMIGRATE: Logging is active");}
|
||||||
|
if(jQuery.migrateTrace===undefined){jQuery.migrateTrace=true;}
|
||||||
|
jQuery.migrateReset=function(){warnedAbout={};jQuery.migrateWarnings.length=0;};function migrateWarn(msg){var console=window.console;if(!warnedAbout[msg]){warnedAbout[msg]=true;jQuery.migrateWarnings.push(msg);if(console&&console.warn&&!jQuery.migrateMute){console.warn("JQMIGRATE: "+msg);if(jQuery.migrateTrace&&console.trace){console.trace();}}}}
|
||||||
|
function migrateWarnProp(obj,prop,value,msg){if(Object.defineProperty){try{Object.defineProperty(obj,prop,{configurable:true,enumerable:true,get:function(){migrateWarn(msg);return value;},set:function(newValue){migrateWarn(msg);value=newValue;}});return;}catch(err){}}
|
||||||
|
jQuery._definePropertyBroken=true;obj[prop]=value;}
|
||||||
|
if(document.compatMode==="BackCompat"){migrateWarn("jQuery is not compatible with Quirks Mode");}
|
||||||
|
var attrFn=jQuery("<input/>",{size:1}).attr("size")&&jQuery.attrFn,oldAttr=jQuery.attr,valueAttrGet=jQuery.attrHooks.value&&jQuery.attrHooks.value.get||function(){return null;},valueAttrSet=jQuery.attrHooks.value&&jQuery.attrHooks.value.set||function(){return undefined;},rnoType=/^(?:input|button)$/i,rnoAttrNodeType=/^[238]$/,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ruseDefault=/^(?:checked|selected)$/i;migrateWarnProp(jQuery,"attrFn",attrFn||{},"jQuery.attrFn is deprecated");jQuery.attr=function(elem,name,value,pass){var lowerName=name.toLowerCase(),nType=elem&&elem.nodeType;if(pass){if(oldAttr.length<4){migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");}
|
||||||
|
if(elem&&!rnoAttrNodeType.test(nType)&&(attrFn?name in attrFn:jQuery.isFunction(jQuery.fn[name]))){return jQuery(elem)[name](value);}}
|
||||||
|
if(name==="type"&&value!==undefined&&rnoType.test(elem.nodeName)&&elem.parentNode){migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");}
|
||||||
|
if(!jQuery.attrHooks[lowerName]&&rboolean.test(lowerName)){jQuery.attrHooks[lowerName]={get:function(elem,name){var attrNode,property=jQuery.prop(elem,name);return property===true||typeof property!=="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==false?name.toLowerCase():undefined;},set:function(elem,value,name){var propName;if(value===false){jQuery.removeAttr(elem,name);}else{propName=jQuery.propFix[name]||name;if(propName in elem){elem[propName]=true;}
|
||||||
|
elem.setAttribute(name,name.toLowerCase());}
|
||||||
|
return name;}};if(ruseDefault.test(lowerName)){migrateWarn("jQuery.fn.attr('"+lowerName+"') may use property instead of attribute");}}
|
||||||
|
return oldAttr.call(jQuery,elem,name,value);};jQuery.attrHooks.value={get:function(elem,name){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrGet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value') no longer gets properties");}
|
||||||
|
return name in elem?elem.value:null;},set:function(elem,value){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="button"){return valueAttrSet.apply(this,arguments);}
|
||||||
|
if(nodeName!=="input"&&nodeName!=="option"){migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");}
|
||||||
|
elem.value=value;}};var matched,browser,oldInit=jQuery.fn.init,oldParseJSON=jQuery.parseJSON,rquickExpr=/^([^<]*)(<[\w\W]+>)([^>]*)$/;jQuery.fn.init=function(selector,context,rootjQuery){var match;if(selector&&typeof selector==="string"&&!jQuery.isPlainObject(context)&&(match=rquickExpr.exec(jQuery.trim(selector)))&&match[0]){if(selector.charAt(0)!=="<"){migrateWarn("$(html) HTML strings must start with '<' character");}
|
||||||
|
if(match[3]){migrateWarn("$(html) HTML text after last tag is ignored");}
|
||||||
|
if(match[0].charAt(0)==="#"){migrateWarn("HTML string cannot start with a '#' character");jQuery.error("JQMIGRATE: Invalid selector string (XSS)");}
|
||||||
|
if(context&&context.context){context=context.context;}
|
||||||
|
if(jQuery.parseHTML){return oldInit.call(this,jQuery.parseHTML(match[2],context,true),context,rootjQuery);}}
|
||||||
|
return oldInit.apply(this,arguments);};jQuery.fn.init.prototype=jQuery.fn;jQuery.parseJSON=function(json){if(!json&&json!==null){migrateWarn("jQuery.parseJSON requires a valid JSON string");return null;}
|
||||||
|
return oldParseJSON.apply(this,arguments);};jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};};if(!jQuery.browser){matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;}
|
||||||
|
if(browser.chrome){browser.webkit=true;}else if(browser.webkit){browser.safari=true;}
|
||||||
|
jQuery.browser=browser;}
|
||||||
|
migrateWarnProp(jQuery,"browser",jQuery.browser,"jQuery.browser is deprecated");jQuery.sub=function(){function jQuerySub(selector,context){return new jQuerySub.fn.init(selector,context);}
|
||||||
|
jQuery.extend(true,jQuerySub,this);jQuerySub.superclass=this;jQuerySub.fn=jQuerySub.prototype=this();jQuerySub.fn.constructor=jQuerySub;jQuerySub.sub=this.sub;jQuerySub.fn.init=function init(selector,context){if(context&&context instanceof jQuery&&!(context instanceof jQuerySub)){context=jQuerySub(context);}
|
||||||
|
return jQuery.fn.init.call(this,selector,context,rootjQuerySub);};jQuerySub.fn.init.prototype=jQuerySub.fn;var rootjQuerySub=jQuerySub(document);migrateWarn("jQuery.sub() is deprecated");return jQuerySub;};jQuery.ajaxSetup({converters:{"text json":jQuery.parseJSON}});var oldFnData=jQuery.fn.data;jQuery.fn.data=function(name){var ret,evt,elem=this[0];if(elem&&name==="events"&&arguments.length===1){ret=jQuery.data(elem,name);evt=jQuery._data(elem,name);if((ret===undefined||ret===evt)&&evt!==undefined){migrateWarn("Use of jQuery.fn.data('events') is deprecated");return evt;}}
|
||||||
|
return oldFnData.apply(this,arguments);};var rscriptType=/\/(java|ecma)script/i,oldSelf=jQuery.fn.andSelf||jQuery.fn.addBack;jQuery.fn.andSelf=function(){migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");return oldSelf.apply(this,arguments);};if(!jQuery.clean){jQuery.clean=function(elems,context,fragment,scripts){context=context||document;context=!context.nodeType&&context[0]||context;context=context.ownerDocument||context;migrateWarn("jQuery.clean() is deprecated");var i,elem,handleScript,jsTags,ret=[];jQuery.merge(ret,jQuery.buildFragment(elems,context).childNodes);if(fragment){handleScript=function(elem){if(!elem.type||rscriptType.test(elem.type)){return scripts?scripts.push(elem.parentNode?elem.parentNode.removeChild(elem):elem):fragment.appendChild(elem);}};for(i=0;(elem=ret[i])!=null;i++){if(!(jQuery.nodeName(elem,"script")&&handleScript(elem))){fragment.appendChild(elem);if(typeof elem.getElementsByTagName!=="undefined"){jsTags=jQuery.grep(jQuery.merge([],elem.getElementsByTagName("script")),handleScript);ret.splice.apply(ret,[i+1,0].concat(jsTags));i+=jsTags.length;}}}}
|
||||||
|
return ret;};}
|
||||||
|
var eventAdd=jQuery.event.add,eventRemove=jQuery.event.remove,eventTrigger=jQuery.event.trigger,oldToggle=jQuery.fn.toggle,oldLive=jQuery.fn.live,oldDie=jQuery.fn.die,ajaxEvents="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",rajaxEvent=new RegExp("\\b(?:"+ajaxEvents+")\\b"),rhoverHack=/(?:^|\s)hover(\.\S+|)\b/,hoverHack=function(events){if(typeof(events)!=="string"||jQuery.event.special.hover){return events;}
|
||||||
|
if(rhoverHack.test(events)){migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");}
|
||||||
|
return events&&events.replace(rhoverHack,"mouseenter$1 mouseleave$1");};if(jQuery.event.props&&jQuery.event.props[0]!=="attrChange"){jQuery.event.props.unshift("attrChange","attrName","relatedNode","srcElement");}
|
||||||
|
if(jQuery.event.dispatch){migrateWarnProp(jQuery.event,"handle",jQuery.event.dispatch,"jQuery.event.handle is undocumented and deprecated");}
|
||||||
|
jQuery.event.add=function(elem,types,handler,data,selector){if(elem!==document&&rajaxEvent.test(types)){migrateWarn("AJAX events should be attached to document: "+types);}
|
||||||
|
eventAdd.call(this,elem,hoverHack(types||""),handler,data,selector);};jQuery.event.remove=function(elem,types,handler,selector,mappedTypes){eventRemove.call(this,elem,hoverHack(types)||"",handler,selector,mappedTypes);};jQuery.fn.error=function(){var args=Array.prototype.slice.call(arguments,0);migrateWarn("jQuery.fn.error() is deprecated");args.splice(0,0,"error");if(arguments.length){return this.bind.apply(this,args);}
|
||||||
|
this.triggerHandler.apply(this,args);return this;};jQuery.fn.toggle=function(fn,fn2){if(!jQuery.isFunction(fn)||!jQuery.isFunction(fn2)){return oldToggle.apply(this,arguments);}
|
||||||
|
migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");var args=arguments,guid=fn.guid||jQuery.guid++,i=0,toggler=function(event){var lastToggle=(jQuery._data(this,"lastToggle"+fn.guid)||0)%i;jQuery._data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;};toggler.guid=guid;while(i<args.length){args[i++].guid=guid;}
|
||||||
|
return this.click(toggler);};jQuery.fn.live=function(types,data,fn){migrateWarn("jQuery.fn.live() is deprecated");if(oldLive){return oldLive.apply(this,arguments);}
|
||||||
|
jQuery(this.context).on(types,this.selector,data,fn);return this;};jQuery.fn.die=function(types,fn){migrateWarn("jQuery.fn.die() is deprecated");if(oldDie){return oldDie.apply(this,arguments);}
|
||||||
|
jQuery(this.context).off(types,this.selector||"**",fn);return this;};jQuery.event.trigger=function(event,data,elem,onlyHandlers){if(!elem&&!rajaxEvent.test(event)){migrateWarn("Global events are undocumented and deprecated");}
|
||||||
|
return eventTrigger.call(this,event,data,elem||document,onlyHandlers);};jQuery.each(ajaxEvents.split("|"),function(_,name){jQuery.event.special[name]={setup:function(){var elem=this;if(elem!==document){jQuery.event.add(document,name+"."+jQuery.guid,function(){jQuery.event.trigger(name,null,elem,true);});jQuery._data(this,name,jQuery.guid++);}
|
||||||
|
return false;},teardown:function(){if(this!==document){jQuery.event.remove(document,name+"."+jQuery._data(this,name));}
|
||||||
|
return false;}};});})(jQuery,window);;jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
|
||||||
|
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;function formatedNumberToFloat(price,currencyFormat,currencySign)
|
||||||
|
{price=price.replace(currencySign,'');if(currencyFormat==1)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));else if(currencyFormat==2)
|
||||||
|
return parseFloat(price.replace(' ','').replace(',','.'));else if(currencyFormat==3)
|
||||||
|
return parseFloat(price.replace('.','').replace(' ','').replace(',','.'));else if(currencyFormat==4)
|
||||||
|
return parseFloat(price.replace(',','').replace(' ',''));return price;}
|
||||||
|
function formatNumber(value,numberOfDecimal,thousenSeparator,virgule)
|
||||||
|
{value=value.toFixed(numberOfDecimal);var val_string=value+'';var tmp=val_string.split('.');var abs_val_string=(tmp.length==2)?tmp[0]:val_string;var deci_string=('0.'+(tmp.length==2?tmp[1]:0)).substr(2);var nb=abs_val_string.length;for(var i=1;i<4;i++)
|
||||||
|
if(value>=Math.pow(10,(3*i)))
|
||||||
|
abs_val_string=abs_val_string.substring(0,nb-(3*i))+thousenSeparator+abs_val_string.substring(nb-(3*i));if(parseInt(numberOfDecimal)==0)
|
||||||
|
return abs_val_string;return abs_val_string+virgule+(deci_string>0?deci_string:'00');}
|
||||||
|
function formatCurrency(price,currencyFormat,currencySign,currencyBlank)
|
||||||
|
{blank='';price=parseFloat(price.toFixed(6));price=ps_round(price,priceDisplayPrecision);if(currencyBlank>0)
|
||||||
|
blank=' ';if(currencyFormat==1)
|
||||||
|
return currencySign+blank+formatNumber(price,priceDisplayPrecision,',','.');if(currencyFormat==2)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ',',')+blank+currencySign);if(currencyFormat==3)
|
||||||
|
return(currencySign+blank+formatNumber(price,priceDisplayPrecision,'.',','));if(currencyFormat==4)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,',','.')+blank+currencySign);if(currencyFormat==5)
|
||||||
|
return(formatNumber(price,priceDisplayPrecision,' ','.')+blank+currencySign);return price;}
|
||||||
|
function ps_round(value,precision)
|
||||||
|
{if(typeof(roundMode)=='undefined')
|
||||||
|
roundMode=2;if(typeof(precision)=='undefined')
|
||||||
|
precision=2;method=roundMode;if(method==0)
|
||||||
|
return ceilf(value,precision);else if(method==1)
|
||||||
|
return floorf(value,precision);precisionFactor=precision==0?1:Math.pow(10,precision);return Math.round(value*precisionFactor)/precisionFactor;}
|
||||||
|
function autoUrl(name,dest)
|
||||||
|
{var loc;var id_list;id_list=document.getElementById(name);loc=id_list.options[id_list.selectedIndex].value;if(loc!=0)
|
||||||
|
location.href=dest+loc;return;}
|
||||||
|
function autoUrlNoList(name,dest)
|
||||||
|
{var loc;loc=document.getElementById(name).checked;location.href=dest+(loc==true?1:0);return;}
|
||||||
|
function toggle(e,show)
|
||||||
|
{e.style.display=show?'':'none';}
|
||||||
|
function toggleMultiple(tab)
|
||||||
|
{var len=tab.length;for(var i=0;i<len;i++)
|
||||||
|
if(tab[i].style)
|
||||||
|
toggle(tab[i],tab[i].style.display=='none');}
|
||||||
|
function showElemFromSelect(select_id,elem_id)
|
||||||
|
{var select=document.getElementById(select_id);for(var i=0;i<select.length;++i)
|
||||||
|
{var elem=document.getElementById(elem_id+select.options[i].value);if(elem!=null)
|
||||||
|
toggle(elem,i==select.selectedIndex);}}
|
||||||
|
function openCloseAllDiv(name,option)
|
||||||
|
{var tab=$('*[name='+name+']');for(var i=0;i<tab.length;++i)
|
||||||
|
toggle(tab[i],option);}
|
||||||
|
function toggleElemValue(id_button,text1,text2)
|
||||||
|
{var obj=document.getElementById(id_button);if(obj)
|
||||||
|
obj.value=((!obj.value||obj.value==text2)?text1:text2);}
|
||||||
|
function addBookmark(url,title)
|
||||||
|
{if(window.sidebar)
|
||||||
|
return window.sidebar.addPanel(title,url,"");else if(window.external&&('AddFavorite'in window.external))
|
||||||
|
return window.external.AddFavorite(url,title);else if(window.opera&&window.print)
|
||||||
|
return true;return true;}
|
||||||
|
function writeBookmarkLink(url,title,text,img)
|
||||||
|
{var insert='';if(img)
|
||||||
|
insert=writeBookmarkLinkObject(url,title,'<img src="'+img+'" alt="'+escape(text)+'" title="'+removeQuotes(text)+'" />')+' ';insert+=writeBookmarkLinkObject(url,title,text);if(window.sidebar||window.opera&&window.print||(window.external&&('AddFavorite'in window.external)))
|
||||||
|
document.write(insert);}
|
||||||
|
function writeBookmarkLinkObject(url,title,insert)
|
||||||
|
{if(window.sidebar||window.external)
|
||||||
|
return('<a href="javascript:addBookmark(\''+escape(url)+'\', \''+removeQuotes(title)+'\')">'+insert+'</a>');else if(window.opera&&window.print)
|
||||||
|
return('<a rel="sidebar" href="'+escape(url)+'" title="'+removeQuotes(title)+'">'+insert+'</a>');return('');}
|
||||||
|
function checkCustomizations()
|
||||||
|
{var pattern=new RegExp(' ?filled ?');if(typeof customizationFields!='undefined')
|
||||||
|
for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{if(parseInt(customizationFields[i][1])==1&&($('#'+customizationFields[i][0]).html()==''||$('#'+customizationFields[i][0]).text()!=$('#'+customizationFields[i][0]).val())&&!pattern.test($('#'+customizationFields[i][0]).attr('class')))
|
||||||
|
return false;}
|
||||||
|
return true;}
|
||||||
|
function emptyCustomizations()
|
||||||
|
{if(typeof(customizationFields)=='undefined')return;$('.customization_block .success').fadeOut(function(){$(this).remove();});$('.customization_block .error').fadeOut(function(){$(this).remove();});for(var i=0;i<customizationFields.length;i++)
|
||||||
|
{$('#'+customizationFields[i][0]).html('');$('#'+customizationFields[i][0]).val('');}}
|
||||||
|
function ceilf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.ceil(tmp)/precisionFactor;}
|
||||||
|
function floorf(value,precision)
|
||||||
|
{if(typeof(precision)=='undefined')
|
||||||
|
precision=0;var precisionFactor=precision==0?1:Math.pow(10,precision);var tmp=value*precisionFactor;var tmp2=tmp.toString();if(tmp2.indexOf('.')===false)
|
||||||
|
return(value);if(tmp2.charAt(tmp2.length-1)==0)
|
||||||
|
return value;return Math.floor(tmp)/precisionFactor;}
|
||||||
|
function setCurrency(id_currency)
|
||||||
|
{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'index.php'+'?rand='+new Date().getTime(),data:'controller=change-currency&id_currency='+parseInt(id_currency),success:function(msg)
|
||||||
|
{location.reload(true);}});}
|
||||||
|
function isArrowKey(k_ev)
|
||||||
|
{var unicode=k_ev.keyCode?k_ev.keyCode:k_ev.charCode;if(unicode>=37&&unicode<=40)
|
||||||
|
return true;return false;}
|
||||||
|
function removeQuotes(value)
|
||||||
|
{value=value.replace(/\\"/g,'');value=value.replace(/"/g,'');value=value.replace(/\\'/g,'');value=value.replace(/'/g,'');return value;}
|
||||||
|
function sprintf(format)
|
||||||
|
{for(var i=1;i<arguments.length;i++)
|
||||||
|
format=format.replace(/%s/,arguments[i]);return format;}
|
||||||
|
function fancyMsgBox(msg,title)
|
||||||
|
{if(title)msg="<h2>"+title+"</h2><p>"+msg+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\"><input class=\"button\" type=\"button\" value=\"OK\" onclick=\"$.fancybox.close();\" /></p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
function fancyChooseBox(question,title,buttons,otherParams)
|
||||||
|
{var msg,funcName,action;if(title)msg="<h2>"+title+"</h2><p>"+question+"</p>";msg+="<br/><p class=\"submit\" style=\"text-align:right; padding-bottom: 0\">";var i=0;for(var caption in buttons){if(!buttons.hasOwnProperty(caption))continue;funcName=buttons[caption];if(typeof otherParams=='undefined')otherParams=0;otherParams=escape(JSON.stringify(otherParams));action=funcName?"$.fancybox.close();window['"+funcName+"'](JSON.parse(unescape('"+otherParams+"')), "+i+")":"$.fancybox.close()";msg+='<input class="button" style="margin-right: 5px" type="button" value="'+caption+'" onclick="'+action+'" />';i++;}
|
||||||
|
msg+="</p>";$.fancybox(msg,{'autoDimensions':false,'width':500,'height':'auto','transitionIn':'none','transitionOut':'none'});}
|
||||||
|
$().ready(function()
|
||||||
|
{$('form').submit(function()
|
||||||
|
{$(this).find('.hideOnSubmit').hide();});$('a._blank').attr('target','_blank');});;
|
||||||
|
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||||
|
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
||||||
|
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(Line truncated
|
||||||
|
$(document).ready(function(){quick_view();});;$('document').ready(function(){reloadProductComparison();});reloadProductComparison=function(){$('a.cmp_remove').click(function(){var idProduct=$(this).attr('rel').replace('ajax_id_product_','');$.ajax({url:'index.php?controller=products-comparison&ajax=1&action=remove&id_product='+idProduct,async:false,cache:false,success:function(){return true;}});});$('input:checkbox.comparator').click(function(){var idProduct=$(this).attr('value').replace('comparator_item_','');var checkbox=$(this);if(checkbox.is(':checked'))
|
||||||
|
{$.ajax({url:'index.php?controller=products-comparison&ajax=1&action=add&id_product='+idProduct,async:true,cache:false,success:function(data){if(data==='0')
|
||||||
|
{checkbox.attr('checked',false);alert(max_item);}},error:function(){checkbox.attr('checked',false);}});}
|
||||||
|
else
|
||||||
|
{$.ajax({url:'index.php?controller=products-comparison&ajax=1&action=remove&id_product='+idProduct,async:true,cache:false,success:function(data){if(data==='0')
|
||||||
|
checkbox.attr('checked',true);},error:function(){checkbox.attr('checked',true);}});}});};function PS_SE_HandleEvent()
|
||||||
|
{$(document).ready(function(){$('#id_country').change(function(){resetAjaxQueries();updateStateByIdCountry();});if(SE_RefreshMethod==0)
|
||||||
|
{$('#id_state').change(function(){resetAjaxQueries();updateCarriersList();});$('#zipcode').bind('keyup',function(e){if(e.keyCode=='13')
|
||||||
|
{resetAjaxQueries();updateCarriersList();}});}
|
||||||
|
$('#update_carriers_list').click(function(){updateCarriersList();});$('#carriercompare_submit').click(function(){resetAjaxQueries();saveSelection();return false;});updateStateByIdCountry();});}
|
||||||
|
function displayWaitingAjax(type,message)
|
||||||
|
{$('#SE_AjaxDisplay').find('p').html(message);$('#SE_AjaxDisplay').css('display',type);}
|
||||||
|
function updateStateByIdCountry()
|
||||||
|
{$('#id_state').children().remove();$('#availableCarriers').slideUp('fast');$('#states').slideUp('fast');displayWaitingAjax('block',SE_RefreshStateTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getStates&id_country='+$('#id_country').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(state in json)
|
||||||
|
{$('#id_state').append('<option value=\''+json[state].id_state+'\' '+(id_state==json[state].id_state?'selected="selected"':'')+'>'+json[state].name+'</option>');}
|
||||||
|
$('#states').slideDown('fast');}
|
||||||
|
if(SE_RefreshMethod==0)
|
||||||
|
updateCarriersList();displayWaitingAjax('none','');}});ajaxQueries.push(query);}
|
||||||
|
function updateCarriersList()
|
||||||
|
{$('#carriercompare_errors_list').children().remove();$('#availableCarriers').slideUp('normal',function(){$(this).find(('tbody')).children().remove();$('#noCarrier').slideUp('fast');displayWaitingAjax('block',SE_RetrievingInfoTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=getCarriers&id_country='+$('#id_country').val()+'&id_state='+$('#id_state').val()+'&zipcode='+$('#zipcode').val(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(carrier in json)
|
||||||
|
{var html='<tr class="'+(carrier%2?'alternate_':'')+'item">'+'<td class="carrier_action">'+'<input type="radio" name="id_carrier" value="'+json[carrier].id_carrier+'" id="id_carrier'+json[carrier].id_carrier+'" '+(id_carrier==json[carrier].id_carrier?'checked="checked"':'')+'/>'+'</td>'+'<td class="carrier_name">'+'<label for="id_carrier'+json[carrier].id_carrier+'">'+
|
||||||
|
(json[carrier].img?'<img src="'+json[carrier].img+'" alt="'+json[carrier].name+'" />':json[carrier].name)+'</label>'+'</td>'+'<td class="carrier_infos">'+((json[carrier].delay!=null)?json[carrier].delay:'')+'</td>'+'<td class="carrier_price">';if(json[carrier].price)
|
||||||
|
{html+='<span class="price">'+(displayPrice==1?formatCurrency(json[carrier].price_tax_exc,currencyFormat,currencySign,currencyBlank):formatCurrency(json[carrier].price,currencyFormat,currencySign,currencyBlank))+'</span>';}
|
||||||
|
else
|
||||||
|
{html+=txtFree;}
|
||||||
|
html+='</td>'+'</tr>';$('#carriers_list').append(html);}
|
||||||
|
displayWaitingAjax('none','');$('#availableCarriers').slideDown();}
|
||||||
|
else
|
||||||
|
{displayWaitingAjax('none','');$('#noCarrier').slideDown();}}});ajaxQueries.push(query);});}
|
||||||
|
function saveSelection()
|
||||||
|
{$('#carriercompare_errors').slideUp();$('#carriercompare_errors_list').children().remove();displayWaitingAjax('block',SE_RedirectTS);var query=$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/carriercompare/ajax.php'+'?rand='+new Date().getTime(),data:'method=saveSelection&'+$('#compare_shipping_form').serialize(),dataType:'json',success:function(json){if(json.length)
|
||||||
|
{for(error in json)
|
||||||
|
$('#carriercompare_errors_list').append('<li>'+json[error]+'</li>');$('#carriercompare_errors').slideDown();displayWaitingAjax('none','');}
|
||||||
|
else
|
||||||
|
{$('.SE_SubmitRefreshCard').fadeOut('fast');location.reload(true);}}});ajaxQueries.push(query);return false;}
|
||||||
|
var ajaxQueries=new Array();function resetAjaxQueries()
|
||||||
|
{for(i=0;i<ajaxQueries.length;++i)
|
||||||
|
ajaxQueries[i].abort();ajaxQueries=new Array();};if(typeof baseUri==="undefined"&&typeof baseDir!=="undefined")
|
||||||
|
baseUri=baseDir;var ajaxCart={nb_total_products:0,overrideButtonsInThePage:function(){$('.ajax_add_to_cart_button').unbind('click').click(function(){var idProduct=$(this).attr('rel').replace('nofollow','').replace('ajax_id_product_','');if($(this).attr('disabled')!='disabled')
|
||||||
|
ajaxCart.add(idProduct,null,false,this);return false;});$('#add_to_cart button').unbind('click').click(function(){ajaxCart.add($('#product_page_product_id').val(),$('#idCombination').val(),true,null,$('#quantity_wanted').val(),null);return false;});$('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){var customizationId=0;var productId=0;var productAttributeId=0;var customizableProductDiv=$($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]");if(customizableProductDiv&&$(customizableProductDiv).length)
|
||||||
|
{$(customizableProductDiv).each(function(){var ids=$(this).attr('id').split('_');if(typeof(ids[1])!='undefined')
|
||||||
|
{customizationId=parseInt(ids[1]);productId=parseInt(ids[2]);if(typeof(ids[3])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[3]);return false;}});}
|
||||||
|
if(!customizationId)
|
||||||
|
{var firstCut=$(this).parent().parent().attr('id').replace('cart_block_product_','');firstCut=firstCut.replace('deleteCustomizableProduct_','');ids=firstCut.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!='undefined')
|
||||||
|
productAttributeId=parseInt(ids[1]);}
|
||||||
|
var idAddressDelivery=$(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1];ajaxCart.remove(productId,productAttributeId,customizationId,idAddressDelivery);return false;});},expand:function(){if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
{$('#cart_block_summary').slideUp(200,function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_list').slideDown({duration:450,complete:function(){$(this).addClass('expanded').removeClass('collapsed');}});});$('#block_cart_expand').fadeOut('slow',function(){$('#block_cart_collapse').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=expand'});}},refresh:function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&ajax=true&token='+static_token,success:function(jsonData)
|
||||||
|
{ajaxCart.updateCart(jsonData);}});},collapse:function(){if($('#cart_block_list').hasClass('expanded'))
|
||||||
|
{$('#cart_block_list').slideUp('slow',function(){$(this).addClass('collapsed').removeClass('expanded');$('#cart_block_summary').slideDown(450,function(){$(this).addClass('expanded').removeClass('collapsed');});});$('#block_cart_collapse').fadeOut('slow',function(){$('#block_cart_expand').fadeIn('fast');});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseDir+'modules/blockcart/blockcart-set-collapse.php'+'?rand='+new Date().getTime(),async:true,cache:false,data:'ajax_blockcart_display=collapse'+'&rand='+new Date().getTime()});}},updateCartInformation:function(jsonData,addedFromProductPage)
|
||||||
|
{ajaxCart.updateCart(jsonData);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$('.ajax_add_to_cart_button').removeAttr('disabled');},add:function(idProduct,idCombination,addedFromProductPage,callerElement,quantity,whishlist){if(addedFromProductPage&&!checkCustomizations())
|
||||||
|
{alert(fieldRequired);return;}
|
||||||
|
emptyCustomizations();if(addedFromProductPage)
|
||||||
|
{$('#add_to_cart button').attr('disabled',true).addClass('disabled');$('.filled').removeClass('filled');}
|
||||||
|
else
|
||||||
|
$(callerElement).attr('disabled',true);if($('#cart_block_list').hasClass('collapsed'))
|
||||||
|
this.expand();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&add=1&ajax=true&qty='+((quantity&&quantity!=null)?quantity:'1')+'&id_product='+idProduct+'&token='+static_token+((parseInt(idCombination)&&idCombination!=null)?'&ipa='+parseInt(idCombination):''),success:function(jsonData,textStatus,jqXHR)
|
||||||
|
{if(whishlist&&!jsonData.errors)
|
||||||
|
WishlistAddProductCart(whishlist[0],idProduct,idCombination,whishlist[1]);var $element=$(callerElement).parents('.ajax_block_product').find('a.product_image img,a.product_img_link img');if(!$element.length)
|
||||||
|
$element=$('#bigpic');var $picture=$element.clone();var pictureOffsetOriginal=$element.offset();pictureOffsetOriginal.right=$(window).innerWidth()-pictureOffsetOriginal.left-$element.width();if($picture.length)
|
||||||
|
{$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right});}
|
||||||
|
if(typeof(contentOnly)!='undefined'){var $contentOnly=contentOnly;}
|
||||||
|
var pictureOffset=$picture.offset();if(($contentOnly&&$contentOnly!=true)||!$contentOnly){var cartBlock=$('#cart_block');if(!$('#cart_block')[0]||!$('#cart_block').offset().top||!$('#cart_block').offset().left)
|
||||||
|
cartBlock=$('#shopping_cart');var cartBlockOffset=cartBlock.offset();cartBlockOffset.right=$(window).innerWidth()-cartBlockOffset.left-cartBlock.width();}
|
||||||
|
if(cartBlockOffset!=undefined&&$picture.length&&(($contentOnly&&$contentOnly!=true)||!$contentOnly))
|
||||||
|
{$picture.appendTo('body');$picture.css({position:'absolute',top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right,zIndex:4242}).animate({width:$element.attr('width')*0.66,height:$element.attr('height')*0.66,opacity:0.2,top:cartBlockOffset.top+30,right:cartBlockOffset.right+15},1000).fadeOut(100,function(){ajaxCart.updateCartInformation(jsonData,addedFromProductPage);$(this).remove();if(!jsonData.hasError)
|
||||||
|
{$('.crossseling').html(jsonData.crossSelling)
|
||||||
|
$(jsonData.products).each(function(){if(this.id!=undefined&&this.id==parseInt(idProduct))
|
||||||
|
ajaxCart.updateLayer(this);});}});}
|
||||||
|
else if($contentOnly&&$contentOnly!=false){window.parent.ajaxCart.updateCartInformation(jsonData,addedFromProductPage);ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}
|
||||||
|
else{ajaxCart.updateCartInformation(jsonData,addedFromProductPage);}},error:function(XMLHttpRequest,textStatus,errorThrown)
|
||||||
|
{alert("Impossible to add the product to the cart.\n\ntextStatus: '"+textStatus+"'\nerrorThrown: '"+errorThrown+"'\nresponseText:\n"+XMLHttpRequest.responseText);if(addedFromProductPage)
|
||||||
|
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');else
|
||||||
|
$(callerElement).removeAttr('disabled');}});},remove:function(idProduct,idCombination,customizationId,idAddressDelivery){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:true,cache:false,dataType:"json",data:'controller=cart&delete=1&id_product='+idProduct+'&ipa='+((idCombination!=null&&parseInt(idCombination))?idCombination:'')+((customizationId&&customizationId!=null)?'&id_customization='+customizationId:'')+'&id_address_delivery='+idAddressDelivery+'&token='+static_token+'&ajax=true',success:function(jsonData){ajaxCart.updateCart(jsonData);if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery);},error:function(){alert('ERROR: unable to delete the product');}});},hideOldProducts:function(jsonData){if($('#cart_block_list dl.products').length>0)
|
||||||
|
{var removedProductId=null;var removedProductData=null;var removedProductDomId=null;$('#cart_block_list dl.products dt').each(function(){var domIdProduct=$(this).attr('id');var firstCut=domIdProduct.replace('cart_block_product_','');var ids=firstCut.split('_');var stayInTheCart=false;for(aProduct in jsonData.products)
|
||||||
|
{if(jsonData.products[aProduct]['id']==ids[0]&&(!ids[1]||jsonData.products[aProduct]['idCombination']==ids[1]))
|
||||||
|
{stayInTheCart=true;ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct],domIdProduct);}}
|
||||||
|
if(!stayInTheCart)
|
||||||
|
{removedProductId=$(this).attr('id');if(removedProductId!=null)
|
||||||
|
{var firstCut=removedProductId.replace('cart_block_product_','');var ids=firstCut.split('_');$('#'+removedProductId).addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow',function(){$(this).remove();if($('#cart_block dl.products dt').length==0)
|
||||||
|
{$("#cart_block").stop(true,true).slideUp(200);$('#cart_block_no_products:hidden').slideDown(450);$('#cart_block dl.products').remove();}});});$('#cart_block_combination_of_'+ids[0]+(ids[1]?'_'+ids[1]:'')+(ids[2]?'_'+ids[2]:'')).fadeTo('fast',0,function(){$(this).slideUp('fast',function(){$(this).remove();});});}}});}},hideOldProductCustomizations:function(product,domIdProduct)
|
||||||
|
{var customizationList=$('#customization_'+product['id']+'_'+product['idCombination']);if(customizationList.length>0)
|
||||||
|
{$(customizationList).find("li").each(function(){$(this).find("div").each(function(){var customizationDiv=$(this).attr('id');var tmp=customizationDiv.replace('deleteCustomizableProduct_','');var ids=tmp.split('_');if((parseInt(product.idCombination)==parseInt(ids[2]))&&!ajaxCart.doesCustomizationStillExist(product,ids[0]))
|
||||||
|
$('#'+customizationDiv).parent().addClass('strike').fadeTo('slow',0,function(){$(this).slideUp('slow');$(this).remove();});});});}
|
||||||
|
var removeLinks=$('#'+domIdProduct).find('.ajax_cart_block_remove_link');if(!product.hasCustomizedDatas&&!removeLinks.length)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="'+baseUri+'?controller=cart&delete=1&id_product='+product['id']+'&ipa='+product['idCombination']+'&token='+static_token+'"> </a>');if(product.is_gift)
|
||||||
|
$('#'+domIdProduct+' span.remove_link').html('');},doesCustomizationStillExist:function(product,customizationId)
|
||||||
|
{var exists=false;$(product.customizedDatas).each(function(){if(this.customizationId==customizationId)
|
||||||
|
{exists=true;return false;}});return(exists);},refreshVouchers:function(jsonData){if(typeof(jsonData.discounts)=='undefined'||jsonData.discounts.length==0)
|
||||||
|
$('#vouchers').hide();else
|
||||||
|
{$('#vouchers tbody').html('');for(i=0;i<jsonData.discounts.length;i++)
|
||||||
|
{if(parseFloat(jsonData.discounts[i].price_float)>0)
|
||||||
|
{var delete_link='';if(jsonData.discounts[i].code.length)
|
||||||
|
delete_link='<a class="delete_voucher" href="'+jsonData.discounts[i].link+'" title="'+delete_txt+'"><i class="icon-remove-sign"></i></a>';$('#vouchers tbody').append($('<tr class="bloc_cart_voucher" id="bloc_cart_voucher_'+jsonData.discounts[i].id+'">'
|
||||||
|
+' <td class="quantity">1x</td>'
|
||||||
|
+' <td class="name" title="'+jsonData.discounts[i].description+'">'+jsonData.discounts[i].name+'</td>'
|
||||||
|
+' <td class="price">-'+jsonData.discounts[i].price+'</td>'
|
||||||
|
+' <td class="delete">'+delete_link+'</td>'
|
||||||
|
+'</tr>'));}}
|
||||||
|
$('#vouchers').show();}},updateProductQuantity:function(product,quantity){$('#cart_block_product_'+product.id+'_'+(product.idCombination?product.idCombination:'0')+'_'+(product.idAddressDelivery?product.idAddressDelivery:'0')+' .quantity').fadeTo('fast',0,function(){$(this).text(quantity);$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1,function(){$(this).fadeTo('fast',0,function(){$(this).fadeTo('fast',1);});});});});});},displayNewProducts:function(jsonData){$(jsonData.products).each(function(){if(this.id!=undefined)
|
||||||
|
{if($('#cart_block dl.products').length==0)
|
||||||
|
{$('#cart_block_no_products').before('<dl class="products"></dl>');$('#cart_block_no_products').hide();}
|
||||||
|
var domIdProduct=this.id+'_'+(this.idCombination?this.idCombination:'0')+'_'+(this.idAddressDelivery?this.idAddressDelivery:'0');var domIdProductAttribute=this.id+'_'+(this.idCombination?this.idCombination:'0');if($('#cart_block_product_'+domIdProduct).length==0)
|
||||||
|
{var productId=parseInt(this.id);var productAttributeId=(this.hasAttributes?parseInt(this.attributes):0);var content='<dt class="unvisible" id="cart_block_product_'+domIdProduct+'">';content+='<a class="cart-images" href="'+this.link+'" title="'+this.name.substring(0,12)+'"><img src="'+this.image_cart+'" alt="'+this.name+'"></a>';var min=this.name.indexOf(';',10);var name=(this.name.length>12?this.name.substring(0,((min-10)<=7)?min:10)+'...':this.name);content+='<div class="cart-info"><div class="product-name"><a href="'+this.link+'" title="'+this.name+'" class="cart_block_product_name">'+name+'</a></div>';if(this.hasAttributes)
|
||||||
|
content+='<div class="product-atributes"><a href="'+this.link+'" title="'+this.name+'">'+this.attributes+'</a></div>';content+='<span class="quantity-formated"><span class="quantity">'+this.quantity+'</span>x </span>';if(typeof(freeProductTranslation)!='undefined')
|
||||||
|
content+='<span class="price">'+(parseFloat(this.price_float)>0?this.priceByLine:freeProductTranslation)+'</span></div>';if(typeof(this.is_gift)=='undefined'||this.is_gift==0)
|
||||||
|
content+='<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&token='+static_token+(this.hasAttributes?'&ipa='+parseInt(this.idCombination):'')+'"> </a></span>';else
|
||||||
|
content+='<span class="remove_link"></span>';content+='</dt>';if(this.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+domIdProduct+'" class="unvisible">';if(this.hasCustomizedDatas)
|
||||||
|
content+=ajaxCart.displayNewCustomizedDatas(this);if(this.hasAttributes)content+='</dd>';$('#cart_block dl.products').append(content);}
|
||||||
|
else
|
||||||
|
{var jsonProduct=this;if($.trim($('#cart_block_product_'+domIdProduct+' .quantity').html())!=jsonProduct.quantity||$.trim($('#cart_block_product_'+domIdProduct+' .price').html())!=jsonProduct.priceByLine)
|
||||||
|
{if(!this.is_gift)
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').text(jsonProduct.priceByLine);else
|
||||||
|
$('#cart_block_product_'+domIdProduct+' .price').html(freeProductTranslation);ajaxCart.updateProductQuantity(jsonProduct,jsonProduct.quantity);if(jsonProduct.hasCustomizedDatas)
|
||||||
|
{customizationFormatedDatas=ajaxCart.displayNewCustomizedDatas(jsonProduct);if(!$('#customization_'+domIdProductAttribute).length)
|
||||||
|
{if(jsonProduct.hasAttributes)
|
||||||
|
$('#cart_block_combination_of_'+domIdProduct).append(customizationFormatedDatas);else
|
||||||
|
$('#cart_block dl.products').append(customizationFormatedDatas);}
|
||||||
|
else
|
||||||
|
{$('#customization_'+domIdProductAttribute).html('');$('#customization_'+domIdProductAttribute).append(customizationFormatedDatas);}}}}
|
||||||
|
$('#cart_block dl.products .unvisible').slideDown(450).removeClass('unvisible');var removeLinks=$('#cart_block_product_'+domIdProduct).find('a.ajax_cart_block_remove_link');if(this.hasCustomizedDatas&&removeLinks.length)
|
||||||
|
$(removeLinks).each(function(){$(this).remove();});}});},displayNewCustomizedDatas:function(product)
|
||||||
|
{var content='';var productId=parseInt(product.id);var productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);var hasAlreadyCustomizations=$('#customization_'+productId+'_'+productAttributeId).length;if(!hasAlreadyCustomizations)
|
||||||
|
{if(!product.hasAttributes)
|
||||||
|
content+='<dd id="cart_block_combination_of_'+productId+'" class="unvisible">';if($('#customization_'+productId+'_'+productAttributeId).val()==undefined)
|
||||||
|
content+='<ul class="cart_block_customizations" id="customization_'+productId+'_'+productAttributeId+'">';}
|
||||||
|
$(product.customizedDatas).each(function()
|
||||||
|
{var done=0;customizationId=parseInt(this.customizationId);productAttributeId=typeof(product.idCombination)=='undefined'?0:parseInt(product.idCombination);content+='<li name="customization"><div class="deleteCustomizableProduct" id="deleteCustomizableProduct_'+customizationId+'_'+productId+'_'+(productAttributeId?productAttributeId:'0')+'"><a rel="nofollow" class="ajax_cart_block_remove_link" href="'+baseUri+'?controller=cart&delete=1&id_product='+productId+'&ipa='+productAttributeId+'&id_customization='+customizationId+'&token='+static_token+'"></a></div><span class="quantity-formated"><span class="quantity">'+parseInt(this.quantity)+'</span>x</span>';$(this.datas).each(function(){if(this['type']==CUSTOMIZE_TEXTFIELD)
|
||||||
|
{$(this.datas).each(function(){if(this['index']==0)
|
||||||
|
{content+=' '+this.truncatedValue.replace(/<br \/>/g,' ');done=1;return false;}})}});if(!done)
|
||||||
|
content+=customizationIdMessage+customizationId;if(!hasAlreadyCustomizations)content+='</li>';if(customizationId)
|
||||||
|
{$('#uploadable_files li div.customizationUploadBrowse img').remove();$('#text_fields input').attr('value','');}});if(!hasAlreadyCustomizations)
|
||||||
|
{content+='</ul>';if(!product.hasAttributes)content+='</dd>';}
|
||||||
|
return(content);},updateLayer:function(product){$('#layer_cart_product_title').text(product.name);$('#layer_cart_product_attributes').text('');if(product.hasAttributes&&product.hasAttributes==true)
|
||||||
|
$('#layer_cart_product_attributes').html(product.attributes);$('#layer_cart_product_price').text(product.price);$('#layer_cart_product_quantity').text(product.quantity);$('.layer_cart_img').prop({'src':product.image,'alt':product.name,'title':product.name});var h=parseInt($(window).height());var s=parseInt($(window).scrollTop());var t=$('#layer_cart').outerHeight(true);if(t<h)
|
||||||
|
var n=parseInt(((h-t)/2)+s)+'px';$('.layer_cart_overlay').css('width','100%');$('.layer_cart_overlay').css('height','100%');$('.layer_cart_overlay').show();$('#layer_cart').css({'top':n}).fadeIn('fast');crossselling_serialScroll();},updateCart:function(jsonData){if(jsonData.hasError)
|
||||||
|
{var errors='';for(error in jsonData.errors)
|
||||||
|
if(error!='indexOf')
|
||||||
|
errors+=$('<div />').html(jsonData.errors[error]).text()+"\n";alert(errors);}
|
||||||
|
else
|
||||||
|
{ajaxCart.updateCartEverywhere(jsonData);ajaxCart.hideOldProducts(jsonData);ajaxCart.displayNewProducts(jsonData);ajaxCart.refreshVouchers(jsonData);$('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item');$('#cart_block .products dt:first').addClass('first_item');$('#cart_block .products dt:not(:first,:last)').addClass('item');$('#cart_block .products dt:last').addClass('last_item');ajaxCart.overrideButtonsInThePage();}},updateCartEverywhere:function(jsonData){$('.ajax_cart_total').text($.trim(jsonData.productTotal));if(parseFloat(jsonData.shippingCostFloat)>0||jsonData.nbTotalProducts<1)
|
||||||
|
$('.ajax_cart_shipping_cost').text(jsonData.shippingCost);else if(typeof(freeShippingTranslation)!='undefined')
|
||||||
|
$('.ajax_cart_shipping_cost').html(freeShippingTranslation);$('.ajax_cart_tax_cost').text(jsonData.taxCost);$('.cart_block_wrapping_cost').text(jsonData.wrappingCost);$('.ajax_block_cart_total').text(jsonData.total);$('.ajax_block_products_total').text(jsonData.productTotal);$('.ajax_total_price_wt').text(jsonData.total_price_wt);if(parseFloat(jsonData.freeShippingFloat)>0)
|
||||||
|
{$('.ajax_cart_free_shipping').html(jsonData.freeShipping);$('.freeshipping').fadeIn(0);}
|
||||||
|
else if(parseFloat(jsonData.freeShippingFloat)==0)
|
||||||
|
$('.freeshipping').fadeOut(0);this.nb_total_products=jsonData.nbTotalProducts;if(parseInt(jsonData.nbTotalProducts)>0)
|
||||||
|
{$('.ajax_cart_no_product').hide();$('.ajax_cart_quantity').text(jsonData.nbTotalProducts);$('.ajax_cart_quantity').fadeIn('slow');$('.ajax_cart_total').fadeIn('slow');if(parseInt(jsonData.nbTotalProducts)>1)
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).hide();});$('.ajax_cart_product_txt_s').each(function(){$(this).show();});}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_product_txt').each(function(){$(this).show();});$('.ajax_cart_product_txt_s').each(function(){$(this).hide();});}}
|
||||||
|
else
|
||||||
|
{$('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){$(this).hide();});$('.ajax_cart_no_product').show('slow');}}};$(document).ready(function()
|
||||||
|
{$('#block_cart_collapse').click(function(){ajaxCart.collapse();});$('#block_cart_expand').click(function(){ajaxCart.expand();});ajaxCart.overrideButtonsInThePage();var cart_qty=0;var current_timestamp=parseInt(new Date().getTime()/1000);if(typeof $('.ajax_cart_quantity').html()=='undefined'||(typeof generated_date!='undefined'&&generated_date!=null&&(parseInt(generated_date)+30)<current_timestamp))
|
||||||
|
ajaxCart.refresh();else
|
||||||
|
cart_qty=parseInt($('.ajax_cart_quantity').html());var cart_block=new HoverWatcher('#cart_block');var shopping_cart=new HoverWatcher('#shopping_cart');$("#shopping_cart a:first").hover(function(){if(ajaxCart.nb_total_products>0||cart_qty>0)
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideDown(450);},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver()&&!cart_block.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$("#header_right #cart_block").hover(function(){},function(){setTimeout(function(){if(!shopping_cart.isHoveringOver())
|
||||||
|
$("#header_right #cart_block").stop(true,true).slideUp(450);},200);});$('.delete_voucher').live('click',function(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},async:true,cache:false,url:$(this).attr('href')+'?rand='+new Date().getTime()});$(this).parent().parent().remove();if($('body').attr('id')=='order'||$('body').attr('id')=='order-opc')
|
||||||
|
{if(typeof(updateAddressSelection)!='undefined')
|
||||||
|
updateAddressSelection();else
|
||||||
|
location.reload();}
|
||||||
|
return false;});$('#cart_navigation input').click(function(){$(this).attr('disabled',true).addClass('disabled');$(this).closest("form").get(0).submit();});$('#layer_cart .cross, #layer_cart .continue, .layer_cart_overlay').click(function(){$('.layer_cart_overlay').hide();$('#layer_cart').fadeOut('fast');return false;});});function HoverWatcher(selector){this.hovering=false;var self=this;this.isHoveringOver=function(){return self.hovering;}
|
||||||
|
$(selector).hover(function(){self.hovering=true;},function(){self.hovering=false;})}
|
||||||
|
function crossselling_serialScroll()
|
||||||
|
{$('#blockcart_caroucel').bxSlider({minSlides:2,maxSlides:4,slideWidth:178,slideMargin:20,moveSlides:1,infiniteLoop:false,hideControlOnEnd:true,pager:false});};;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);;;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);;;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(optioLine truncated
|
||||||
|
break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}
|
||||||
|
break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}
|
||||||
|
break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}
|
||||||
|
break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}
|
||||||
|
if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}
|
||||||
|
$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])
|
||||||
|
cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)
|
||||||
|
return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}
|
||||||
|
v+=options.multipleSeparator;}
|
||||||
|
$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}
|
||||||
|
function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}
|
||||||
|
var currentValue=$input.val();if(!skipPrevCheck&¤tValue==previousValue)
|
||||||
|
return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)
|
||||||
|
currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value){return[""];}
|
||||||
|
var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))
|
||||||
|
result[i]=$.trim(value);});return result;}
|
||||||
|
function lastWord(value){if(!options.multiple)
|
||||||
|
return value;var words=trimWords(value);return words[words.length-1];}
|
||||||
|
function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}
|
||||||
|
else
|
||||||
|
$input.val("");}});}
|
||||||
|
if(wasVisible)
|
||||||
|
$.Autocompleter.Selection(input,input.value.length,input.value.length);};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)
|
||||||
|
term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}
|
||||||
|
return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)
|
||||||
|
s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}
|
||||||
|
if(!data[q]){length++;}
|
||||||
|
data[q]=value;}
|
||||||
|
function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)
|
||||||
|
continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])
|
||||||
|
stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}
|
||||||
|
setTimeout(populate,25);function flush(){data={};length=0;}
|
||||||
|
return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)
|
||||||
|
return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}
|
||||||
|
return csub;}else
|
||||||
|
if(data[q]){return data[q];}else
|
||||||
|
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}
|
||||||
|
return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)
|
||||||
|
return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)
|
||||||
|
element.css("width",options.width);needsInit=false;}
|
||||||
|
function target(event){var element=event.target;while(element&&element.tagName!="LI")
|
||||||
|
element=element.parentNode;if(!element)
|
||||||
|
return[];return element;}
|
||||||
|
function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}
|
||||||
|
function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}
|
||||||
|
function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])
|
||||||
|
continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)
|
||||||
|
continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}
|
||||||
|
listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}
|
||||||
|
if($.fn.bgiframe)
|
||||||
|
list.bgiframe();}
|
||||||
|
return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
|
||||||
|
field.focus();};})(jQuery);;$('document').ready(function(){$('#favoriteproducts_block_extra_add').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_add').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_remove').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_remove').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_added').click(function(){$.ajax({url:favorite_products_url_remove+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_added').slideUp(function(){$('#favoriteproducts_block_extra_removed').slideDown("slow");});}}});});$('#favoriteproducts_block_extra_removed').click(function(){$.ajax({url:favorite_products_url_add+'&rand='+new Date().getTime(),type:"POST",headers:{"cache-control":"no-cache"},data:{"id_product":favorite_products_id_product},success:function(result){if(result=='0')
|
||||||
|
{$('#favoriteproducts_block_extra_removed').slideUp(function(){$('#favoriteproducts_block_extra_added').slideDown("slow");});}}});});});;function WishlistCart(id,action,id_product,id_product_attribute,quantity)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,cache:false,data:'action='+action+'&id_product='+id_product+'&quantity='+quantity+'&token='+static_token+'&id_product_attribute='+id_product_attribute,success:function(data)
|
||||||
|
{if(action=='add')
|
||||||
|
{if(isLoggedWishlist==true){alert('Adedd to wishlist')}
|
||||||
|
else{alert('You must be logged in to manage your wishlist.')}}
|
||||||
|
if($('#'+id).length!=0)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}}});}
|
||||||
|
function WishlistChangeDefault(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/cart.php',async:true,data:'id_wishlist='+id_wishlist+'&token='+static_token,cache:false,success:function(data)
|
||||||
|
{$('#'+id).slideUp('normal');document.getElementById(id).innerHTML=data;$('#'+id).slideDown('normal');}});}
|
||||||
|
function WishlistBuyProduct(token,id_product,id_product_attribute,id_quantity,button,ajax)
|
||||||
|
{if(ajax)
|
||||||
|
ajaxCart.add(id_product,id_product_attribute,false,button,1,[token,id_quantity]);else
|
||||||
|
{$('#'+id_quantity).val(0);WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].method='POST';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].action=baseUri+'?controller=cart';document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].elements['token'].value=static_token;document.forms['addtocart'+'_'+id_product+'_'+id_product_attribute].submit();}
|
||||||
|
return(true);}
|
||||||
|
function WishlistAddProductCart(token,id_product,id_product_attribute,id_quantity)
|
||||||
|
{if($('#'+id_quantity).val()<=0)
|
||||||
|
return(false);$.ajax({type:'GET',url:baseDir+'modules/blockwishlist/buywishlistproduct.php',data:'token='+token+'&static_token='+static_token+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute,async:true,cache:false,success:function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
{$('#'+id_quantity).val($('#'+id_quantity).val()-1);}}});return(true);}
|
||||||
|
function WishlistManage(id,id_wishlist)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'id_wishlist='+id_wishlist+'&refresh='+false,cache:false,success:function(data)
|
||||||
|
{$('#'+id).hide();document.getElementById(id).innerHTML=data;$('#'+id).fadeIn('slow');}});}
|
||||||
|
function WishlistProductManage(id,action,id_wishlist,id_product,id_product_attribute,quantity,priority)
|
||||||
|
{$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/managewishlist.php',data:'action='+action+'&id_wishlist='+id_wishlist+'&id_product='+id_product+'&id_product_attribute='+id_product_attribute+'&quantity='+quantity+'&priority='+priority+'&refresh='+true,cache:false,success:function(data)
|
||||||
|
{if(action=='delete')
|
||||||
|
$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');else if(action=='update')
|
||||||
|
{$('#wlp_'+id_product+'_'+id_product_attribute).fadeOut('fast');$('#wlp_'+id_product+'_'+id_product_attribute).fadeIn('fast');}}});}
|
||||||
|
function WishlistDelete(id,id_wishlist,msg)
|
||||||
|
{var res=confirm(msg);if(res==false)
|
||||||
|
return(false);$.ajax({type:'GET',async:true,url:baseDir+'modules/blockwishlist/mywishlist.php',cache:false,data:'deleted&id_wishlist='+id_wishlist,success:function(data)
|
||||||
|
{$('#'+id).fadeOut('slow');}});}
|
||||||
|
function WishlistVisibility(bought_class,id_button)
|
||||||
|
{if($('#hide'+id_button).css('display')=='none')
|
||||||
|
{$('.'+bought_class).slideDown('fast');$('#show'+id_button).hide();$('#hide'+id_button).css('display','block');}
|
||||||
|
else
|
||||||
|
{$('.'+bought_class).slideUp('fast');$('#hide'+id_button).hide();$('#show'+id_button).css('display','block');}}
|
||||||
|
function WishlistSend(id,id_wishlist,id_email)
|
||||||
|
{$.post(baseDir+'modules/blockwishlist/sendwishlist.php',{token:static_token,id_wishlist:id_wishlist,email1:$('#'+id_email+'1').val(),email2:$('#'+id_email+'2').val(),email3:$('#'+id_email+'3').val(),email4:$('#'+id_email+'4').val(),email5:$('#'+id_email+'5').val(),email6:$('#'+id_email+'6').val(),email7:$('#'+id_email+'7').val(),email8:$('#'+id_email+'8').val(),email9:$('#'+id_email+'9').val(),email10:$('#'+id_email+'10').val()},function(data)
|
||||||
|
{if(data)
|
||||||
|
alert(data);else
|
||||||
|
WishlistVisibility(id,'hideSendWishlist');});};$(document).ready(function(){$('#crossselling_list_car').bxSlider({minSlides:2,maxSlides:6,slideWidth:178,slideMargin:20,pager:false,nextText:'',prevText:'',moveSlides:1,infiniteLoop:false,hideControlOnEnd:true});});;$(document).ready(function(){$('#bxslider1').bxSlider({minSlides:2,maxSlides:6,slideWidth:178,slideMargin:20,pager:false,nextText:'',prevText:'',moveSlides:1,infiniteLoop:false,hideControlOnEnd:true});});;function openBranch(jQueryElement,noAnimation){jQueryElement.addClass('OPEN').removeClass('CLOSE');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').show();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideDown();}
|
||||||
|
function closeBranch(jQueryElement,noAnimation){jQueryElement.addClass('CLOSE').removeClass('OPEN');if(noAnimation)
|
||||||
|
jQueryElement.parent().find('ul:first').hide();else
|
||||||
|
jQueryElement.parent().find('ul:first').slideUp();}
|
||||||
|
function toggleBranch(jQueryElement,noAnimation){if(jQueryElement.hasClass('OPEN'))
|
||||||
|
closeBranch(jQueryElement,noAnimation);else
|
||||||
|
openBranch(jQueryElement,noAnimation);}
|
||||||
|
$(document).ready(function(){if(!$('ul.tree.dhtml').hasClass('dynamized'))
|
||||||
|
{$('ul.tree.dhtml ul').prev().before("<span class='grower OPEN'> </span>");$('ul.tree.dhtml ul li:last-child, ul.tree.dhtml li:last-child').addClass('last');$('ul.tree.dhtml span.grower.OPEN').addClass('CLOSE').removeClass('OPEN').parent().find('ul:first').hide();$('ul.tree.dhtml').show();$('ul.tree.dhtml .selected').parents().each(function(){if($(this).is('ul'))
|
||||||
|
toggleBranch($(this).prev().prev(),true);});toggleBranch($('ul.tree.dhtml .selected').prev(),true);$('ul.tree.dhtml span.grower').click(function(){toggleBranch($(this));});$('ul.tree.dhtml').addClass('dynamized');$('ul.tree.dhtml').removeClass('dhtml');}});;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
|
||||||
|
if(p==this){return false;}
|
||||||
|
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
|
||||||
|
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);;;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
|
||||||
|
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'fast',autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);jQuery(function(){jQuery('ul.sf-menu').superfish();});;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockcart/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockuserinfo/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktags/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocksearch/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocknewsletter/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blockwishlist/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/productcomments/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocklayered/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/crossselling/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);@import url(http://192.168.9.41/prestashop1601_2/themes/default_bootstrap/css/modules/blocktopmenu/css/http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);html{min-height:100%}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,blockquote,th,td{margin:0;padding:0}del,ins{text-decoration:none}caption,th{text-align:left}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}ul,ol{list-style-type:none}a{cursor:pointer}a:hover{text-decoration:none}@media only screen and (min-width:1200px){.container{padding-left:0;padding-right:0}}body{min-width:320px;height:100%;background:#333333;line-height:18px;font-size:13px}body.content_only{background:none}textarea{resize:none}#header{z-index:10}.columns-container{background:#fff}#columns{z-index:1;padding-bottom:50px}#center_column .page_product_box h3{color:#555454;text-transform:uppercase;font-family:"Open Sans",sans-serif;font-weight:600;font-size:18px;line-height:20px;padding:14px 20px 17px;margin:0 0 20px;position:relative;border:1px solid #d6d4d4;border-bottom:none;background:#fbfbfb}a,a:focus,a:active{text-decoration:none;outline:none}p.info-title{font-weight:bold;color:#333;margin-bottom:25px}p.info-account{margin:-4px 0 24px 0}.dark{color:#333}.main-page-indent{margin-bottom:30px}.alert{font-weight:bold}.alert ul,.alert ol{padding-left:15px;margin-left:27px}.alert ul li,.alert ol li{list-style-type:decimal;font-weight:normal}.alert.alert-success{text-shadow:1px 1px rgba(0,0,0,0.1)}.alert.alert-success:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px}.alert.alert-danger{text-shadow:1px 1px rgba(0,0,0,0.1)}.alert.alert-danger:before{font-family:"FontAwesome";content:"";font-size:20px;vertical-align:-2px;padding-right:7px;float:left}.required sup{color:#f13340;font-size:13px;font-weight:bold;top:0}.unvisible{display:none}label{color:#333}.checkbox{line-height:16px}.checkbox label{color:#777777}.close{opacity:1}.close:hover{opacity:1}input.button_mini,input.button_small,input.button,input.button_large,input.button_mini_disabled,input.button_small_disabled,input.button_disabled,input.button_large_disabled,input.exclusive_mini,input.exclusive_small,input.exclusive,input.exclusive_large,input.exclusiLine truncated
|
||||||
@@ -92,7 +92,7 @@ table#product_comparison .product_desc {
|
|||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
}
|
}
|
||||||
/* line 93, ../sass/comparator.scss */
|
/* line 93, ../sass/comparator.scss */
|
||||||
table#product_comparison .button-container a {
|
table#product_comparison .button-container a, table#product_comparison .button-container > span {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
/* line 97, ../sass/comparator.scss */
|
/* line 97, ../sass/comparator.scss */
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
padding: 23px 0 0 0;
|
padding: 23px 0 0 0;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
background: url(../img/contact-form.png) repeat-x white;
|
background: url(../img/contact-form.png) repeat-x white;
|
||||||
-webkit-box-shadow: rgba(0, 0, 0, 0.17) 0px 5px 13px;
|
-webkit-box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px;
|
||||||
-moz-box-shadow: rgba(0, 0, 0, 0.17) 0px 5px 13px;
|
-moz-box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px;
|
||||||
box-shadow: rgba(0, 0, 0, 0.17) 0px 5px 13px;
|
box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px;
|
||||||
/* min 992px max 1199px */
|
/* min 992px max 1199px */
|
||||||
}
|
}
|
||||||
/* line 25, ../sass/contact-form.scss */
|
/* line 25, ../sass/contact-form.scss */
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -194,7 +194,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background: #666\9;
|
background: #666\9;
|
||||||
background: rgba(80, 80, 80, 0.75);
|
background: rgba(80, 80, 80, 0);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
/* line 201, ../../sass/jquery/jquery.bxslider.scss */
|
/* line 201, ../../sass/jquery/jquery.bxslider.scss */
|
||||||
|
|||||||
@@ -111,9 +111,9 @@
|
|||||||
z-index: 99;
|
z-index: 99;
|
||||||
width: 220px;
|
width: 220px;
|
||||||
padding: 25px 30px;
|
padding: 25px 30px;
|
||||||
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 13px;
|
-webkit-box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px;
|
||||||
-moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 13px;
|
-moz-box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px;
|
||||||
box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 13px;
|
box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* line 91, ../../../../sass/modules/blocktopmenu/css/superfish-modified.scss */
|
/* line 91, ../../../../sass/modules/blocktopmenu/css/superfish-modified.scss */
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #777777;
|
color: #777777;
|
||||||
text-shadow: 1px 1px rgba(0, 0, 0, 0.2);
|
text-shadow: 1px 1px rgba(0, 0, 0, 0);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@media (min-width: 768px) and (max-width: 991px) {
|
@media (min-width: 768px) and (max-width: 991px) {
|
||||||
|
|||||||
@@ -94,10 +94,10 @@ img {
|
|||||||
width: 136px;
|
width: 136px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: rgba(255, 255, 255, 0.5);
|
background: rgba(255, 255, 255, 0);
|
||||||
-webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
|
-webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
|
||||||
-moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
|
-moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
/* line 73, ../sass/product.scss */
|
/* line 73, ../sass/product.scss */
|
||||||
#pb-right-column #image-block #view_full_size .span_link:after {
|
#pb-right-column #image-block #view_full_size .span_link:after {
|
||||||
@@ -191,9 +191,9 @@ img {
|
|||||||
#thumbs_list li a {
|
#thumbs_list li a {
|
||||||
display: block;
|
display: block;
|
||||||
border: 3px solid #fff;
|
border: 3px solid #fff;
|
||||||
-webkit-transition: all 0.3s ease;
|
-webkit-transition: all 0s ease;
|
||||||
-moz-transition: all 0.3s ease;
|
-moz-transition: all 0s ease;
|
||||||
-o-transition: all 0.3s ease;
|
-o-transition: all 0s ease;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
@@ -596,9 +596,9 @@ span.view_scroll_spacer {
|
|||||||
/* line 477, ../sass/product.scss */
|
/* line 477, ../sass/product.scss */
|
||||||
.product_attributes,
|
.product_attributes,
|
||||||
.box-cart-bottom {
|
.box-cart-bottom {
|
||||||
-webkit-box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0.05);
|
-webkit-box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0);
|
||||||
-moz-box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0.05);
|
-moz-box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0);
|
||||||
box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0.05);
|
box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0);
|
||||||
padding: 19px 19px 17px;
|
padding: 19px 19px 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -692,9 +692,9 @@ span.view_scroll_spacer {
|
|||||||
padding: 12px 36px 14px 82px;
|
padding: 12px 36px 14px 82px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: block !important;
|
display: block !important;
|
||||||
-webkit-transition: all 0.3s ease;
|
-webkit-transition: all 0s ease;
|
||||||
-moz-transition: all 0.3s ease;
|
-moz-transition: all 0s ease;
|
||||||
-o-transition: all 0.3s ease;
|
-o-transition: all 0s ease;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
@media (max-width: 1199px) {
|
@media (max-width: 1199px) {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
/*******************************************************
|
/*******************************************************
|
||||||
Product list Styles
|
Product list Styles
|
||||||
********************************************************/
|
********************************************************/
|
||||||
/* line 10, ../sass/product_list.scss */
|
|
||||||
ul.product_list .availability span {
|
ul.product_list .availability span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -10,41 +9,33 @@ ul.product_list .availability span {
|
|||||||
padding: 3px 8px 4px 8px;
|
padding: 3px 8px 4px 8px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
/* line 17, ../sass/product_list.scss */
|
|
||||||
ul.product_list .availability span.available-now {
|
ul.product_list .availability span.available-now {
|
||||||
background: #46a74e;
|
background: #46a74e;
|
||||||
border: 1px solid #36943e;
|
border: 1px solid #36943e;
|
||||||
}
|
}
|
||||||
/* line 22, ../sass/product_list.scss */
|
|
||||||
ul.product_list .availability span.out-of-stock {
|
ul.product_list .availability span.out-of-stock {
|
||||||
background: #ff7430;
|
background: #ff7430;
|
||||||
border: 1px solid #ea5e1a;
|
border: 1px solid #ea5e1a;
|
||||||
}
|
}
|
||||||
/* line 29, ../sass/product_list.scss */
|
|
||||||
ul.product_list .color-list-container {
|
ul.product_list .color-list-container {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
/* line 34, ../sass/product_list.scss */
|
|
||||||
ul.product_list .color-list-container ul li {
|
ul.product_list .color-list-container ul li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: 1px solid #d6d4d4;
|
border: 1px solid #d6d4d4;
|
||||||
}
|
}
|
||||||
/* line 38, ../sass/product_list.scss */
|
|
||||||
ul.product_list .color-list-container ul li a {
|
ul.product_list .color-list-container ul li a {
|
||||||
display: block;
|
display: block;
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
}
|
}
|
||||||
/* line 47, ../sass/product_list.scss */
|
|
||||||
ul.product_list .product-image-container {
|
ul.product_list .product-image-container {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
/* line 50, ../sass/product_list.scss */
|
|
||||||
ul.product_list .product-image-container img {
|
ul.product_list .product-image-container img {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
/* line 54, ../sass/product_list.scss */
|
|
||||||
ul.product_list .product-image-container .quick-view {
|
ul.product_list .product-image-container .quick-view {
|
||||||
font: 700 13px/16px Arial, Helvetica, sans-serif;
|
font: 700 13px/16px Arial, Helvetica, sans-serif;
|
||||||
color: #777676;
|
color: #777676;
|
||||||
@@ -62,13 +53,11 @@ ul.product_list .product-image-container .quick-view {
|
|||||||
box-shadow: rgba(0, 0, 0, 0.16) 0 2px 8px;
|
box-shadow: rgba(0, 0, 0, 0.16) 0 2px 8px;
|
||||||
}
|
}
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
/* line 54, ../sass/product_list.scss */
|
|
||||||
ul.product_list .product-image-container .quick-view {
|
ul.product_list .product-image-container .quick-view {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
/* line 54, ../sass/product_list.scss */
|
|
||||||
ul.product_list .product-image-container .quick-view {
|
ul.product_list .product-image-container .quick-view {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -77,25 +66,21 @@ ul.product_list .product-image-container .quick-view {
|
|||||||
/*******************************************************
|
/*******************************************************
|
||||||
Product list(Grid) Styles
|
Product list(Grid) Styles
|
||||||
********************************************************/
|
********************************************************/
|
||||||
/* line 83, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li {
|
ul.product_list.grid > li {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@media (min-width: 480px) and (max-width: 767px) {
|
@media (min-width: 480px) and (max-width: 767px) {
|
||||||
/* line 83, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li {
|
ul.product_list.grid > li {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 92, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container {
|
ul.product_list.grid > li .product-container {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
/* line 97, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .product-image-container {
|
ul.product_list.grid > li .product-container .product-image-container {
|
||||||
border: 1px solid #d6d4d4;
|
border: 1px solid #d6d4d4;
|
||||||
padding: 9px;
|
padding: 9px;
|
||||||
@@ -103,14 +88,12 @@ ul.product_list.grid > li .product-container .product-image-container {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
/* line 97, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .product-image-container {
|
ul.product_list.grid > li .product-container .product-image-container {
|
||||||
max-width: 290px;
|
max-width: 290px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 109, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .product-image-container .content_price {
|
ul.product_list.grid > li .product-container .product-image-container .content_price {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -120,125 +103,100 @@ ul.product_list.grid > li .product-container .product-image-container .content_p
|
|||||||
padding: 9px 0;
|
padding: 9px 0;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 118, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .product-image-container .content_price span {
|
ul.product_list.grid > li .product-container .product-image-container .content_price span {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
/* line 124, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container h5 {
|
ul.product_list.grid > li .product-container h5 {
|
||||||
padding: 0 15px 7px 15px;
|
padding: 0 15px 7px 15px;
|
||||||
min-height: 53px;
|
min-height: 53px;
|
||||||
}
|
}
|
||||||
/* line 129, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .product-desc {
|
ul.product_list.grid > li .product-container .product-desc {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 133, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .content_price {
|
ul.product_list.grid > li .product-container .content_price {
|
||||||
padding-bottom: 9px;
|
padding-bottom: 9px;
|
||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
}
|
}
|
||||||
/* line 135, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .old-price, ul.product_list.grid > li .product-container .price, ul.product_list.grid > li .product-container .price-percent-reduction {
|
ul.product_list.grid > li .product-container .old-price, ul.product_list.grid > li .product-container .price, ul.product_list.grid > li .product-container .price-percent-reduction {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
/* line 137, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .product-flags {
|
ul.product_list.grid > li .product-container .product-flags {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 139, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .old-price {
|
ul.product_list.grid > li .product-container .old-price {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
/* line 141, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .button-container {
|
ul.product_list.grid > li .product-container .button-container {
|
||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
}
|
}
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
/* line 141, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .button-container {
|
ul.product_list.grid > li .product-container .button-container {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 147, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .button-container .ajax_add_to_cart_button, ul.product_list.grid > li .product-container .button-container span.button {
|
ul.product_list.grid > li .product-container .button-container .ajax_add_to_cart_button, ul.product_list.grid > li .product-container .button-container span.button {
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
/* line 150, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons {
|
ul.product_list.grid > li .product-container .functional-buttons {
|
||||||
background: url(../img/functional-bt-shadow.png) repeat-x;
|
background: url(../img/functional-bt-shadow.png) repeat-x;
|
||||||
padding: 11px 0 5px;
|
padding: 11px 0 5px;
|
||||||
}
|
}
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
/* line 150, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons {
|
ul.product_list.grid > li .product-container .functional-buttons {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 156, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div {
|
ul.product_list.grid > li .product-container .functional-buttons div {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: left;
|
float: left;
|
||||||
padding: 3px 0 4px 0;
|
padding: 3px 0 4px 0;
|
||||||
}
|
}
|
||||||
/* line 161, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div a, ul.product_list.grid > li .product-container .functional-buttons div label {
|
ul.product_list.grid > li .product-container .functional-buttons div a, ul.product_list.grid > li .product-container .functional-buttons div label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #777676;
|
color: #777676;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
/* line 165, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div a:hover, ul.product_list.grid > li .product-container .functional-buttons div label:hover {
|
ul.product_list.grid > li .product-container .functional-buttons div a:hover, ul.product_list.grid > li .product-container .functional-buttons div label:hover {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
/* line 168, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.wishlist {
|
ul.product_list.grid > li .product-container .functional-buttons div.wishlist {
|
||||||
border-right: 1px solid #d6d4d4;
|
border-right: 1px solid #d6d4d4;
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) and (max-width: 1199px) {
|
@media (min-width: 992px) and (max-width: 1199px) {
|
||||||
/* line 168, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.wishlist {
|
ul.product_list.grid > li .product-container .functional-buttons div.wishlist {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
/* line 173, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.wishlist i {
|
ul.product_list.grid > li .product-container .functional-buttons div.wishlist i {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 480px) and (max-width: 767px) {
|
@media (min-width: 480px) and (max-width: 767px) {
|
||||||
/* line 168, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.wishlist {
|
ul.product_list.grid > li .product-container .functional-buttons div.wishlist {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
/* line 179, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.wishlist i {
|
ul.product_list.grid > li .product-container .functional-buttons div.wishlist i {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 185, ../sass/product_list.scss */
|
ul.product_list.grid > li .product-container .functional-buttons div.compare label:before {
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.compare:before {
|
|
||||||
content: "";
|
content: "";
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-family: 'FontAwesome';
|
font-family: 'FontAwesome';
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) and (max-width: 1199px) {
|
@media (min-width: 992px) and (max-width: 1199px) {
|
||||||
/* line 185, ../sass/product_list.scss */
|
ul.product_list.grid > li .product-container .functional-buttons div.compare label:before {
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.compare:before {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 480px) and (max-width: 767px) {
|
@media (min-width: 480px) and (max-width: 767px) {
|
||||||
/* line 185, ../sass/product_list.scss */
|
ul.product_list.grid > li .product-container .functional-buttons div.compare label:before {
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.compare:before {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 200, ../sass/product_list.scss */
|
ul.product_list.grid > li .product-container .functional-buttons div.compare label.checked:before {
|
||||||
ul.product_list.grid > li .product-container .functional-buttons div.compare.compare.checked:before {
|
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
/* line 209, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container:hover {
|
ul.product_list.grid > li .product-container:hover {
|
||||||
-webkit-box-shadow: rgba(0, 0, 0, 0.17) 0 0 13px;
|
-webkit-box-shadow: rgba(0, 0, 0, 0.17) 0 0 13px;
|
||||||
-moz-box-shadow: rgba(0, 0, 0, 0.17) 0 0 13px;
|
-moz-box-shadow: rgba(0, 0, 0, 0.17) 0 0 13px;
|
||||||
@@ -246,31 +204,25 @@ ul.product_list.grid > li .product-container .functional-buttons div.compare.com
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
/* line 214, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container:hover .content_price {
|
ul.product_list.grid > li .product-container:hover .content_price {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 217, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container:hover .product-image-container .content_price {
|
ul.product_list.grid > li .product-container:hover .product-image-container .content_price {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/* line 220, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container:hover .product-image-container .quick-view {
|
ul.product_list.grid > li .product-container:hover .product-image-container .quick-view {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/* line 223, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li .product-container:hover .button-container, ul.product_list.grid > li .product-container:hover .functional-buttons {
|
ul.product_list.grid > li .product-container:hover .button-container, ul.product_list.grid > li .product-container:hover .functional-buttons {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
/* line 229, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li.first-in-line {
|
ul.product_list.grid > li.first-in-line {
|
||||||
clear: left;
|
clear: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 480px) and (max-width: 991px) {
|
@media (min-width: 480px) and (max-width: 991px) {
|
||||||
/* line 233, ../sass/product_list.scss */
|
|
||||||
ul.product_list.grid > li.first-item-of-tablet-line {
|
ul.product_list.grid > li.first-item-of-tablet-line {
|
||||||
clear: left;
|
clear: left;
|
||||||
}
|
}
|
||||||
@@ -280,58 +232,47 @@ ul.product_list.grid > li .product-container .functional-buttons div.compare.com
|
|||||||
Product list(List) Styles
|
Product list(List) Styles
|
||||||
********************************************************/
|
********************************************************/
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
/* line 245, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .left-block {
|
ul.product_list.list > li .left-block {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 250, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .product-container {
|
ul.product_list.list > li .product-container {
|
||||||
border-top: 1px solid #d6d4d4;
|
border-top: 1px solid #d6d4d4;
|
||||||
padding: 30px 0 30px;
|
padding: 30px 0 30px;
|
||||||
}
|
}
|
||||||
/* line 255, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .product-image-container {
|
ul.product_list.list > li .product-image-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
border: 1px solid #d6d4d4;
|
border: 1px solid #d6d4d4;
|
||||||
padding: 9px;
|
padding: 9px;
|
||||||
}
|
}
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
/* line 255, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .product-image-container {
|
ul.product_list.list > li .product-image-container {
|
||||||
max-width: 290px;
|
max-width: 290px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 263, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .product-image-container .content_price {
|
ul.product_list.list > li .product-image-container .content_price {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
/* line 267, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .product-flags {
|
ul.product_list.list > li .product-flags {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin: -5px 0 10px 0;
|
margin: -5px 0 10px 0;
|
||||||
}
|
}
|
||||||
/* line 271, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .product-flags .discount {
|
ul.product_list.list > li .product-flags .discount {
|
||||||
color: #f13340;
|
color: #f13340;
|
||||||
}
|
}
|
||||||
/* line 275, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li h5 {
|
ul.product_list.list > li h5 {
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
/* line 277, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .product-desc {
|
ul.product_list.list > li .product-desc {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
/* line 279, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .center-block {
|
ul.product_list.list > li .center-block {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
/* line 287, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content {
|
ul.product_list.list > li .right-block .right-block-content {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-left: 1px solid #d6d4d4;
|
border-left: 1px solid #d6d4d4;
|
||||||
@@ -340,79 +281,65 @@ ul.product_list.list > li .product-desc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 991px) {
|
@media (max-width: 991px) {
|
||||||
/* line 287, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content {
|
ul.product_list.list > li .right-block .right-block-content {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
/* line 287, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content {
|
ul.product_list.list > li .right-block .right-block-content {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 302, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .content_price {
|
ul.product_list.list > li .right-block .right-block-content .content_price {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
@media (max-width: 991px) {
|
@media (max-width: 991px) {
|
||||||
/* line 302, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .content_price {
|
ul.product_list.list > li .right-block .right-block-content .content_price {
|
||||||
padding-top: 13px;
|
padding-top: 13px;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
/* line 302, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .content_price {
|
ul.product_list.list > li .right-block .right-block-content .content_price {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 313, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .content_price span {
|
ul.product_list.list > li .right-block .right-block-content .content_price span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-top: -4px;
|
margin-top: -4px;
|
||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
}
|
}
|
||||||
/* line 318, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .content_price span.old-price {
|
ul.product_list.list > li .right-block .right-block-content .content_price span.old-price {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
/* line 323, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .button-container {
|
ul.product_list.list > li .right-block .right-block-content .button-container {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
/* line 323, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .button-container {
|
ul.product_list.list > li .right-block .right-block-content .button-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 329, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .button-container .btn {
|
ul.product_list.list > li .right-block .right-block-content .button-container .btn {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
/* line 329, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .button-container .btn {
|
ul.product_list.list > li .right-block .right-block-content .button-container .btn {
|
||||||
float: left;
|
float: left;
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
/* line 337, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 991px) {
|
@media (max-width: 991px) {
|
||||||
/* line 337, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
/* line 344, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons > div {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons > div {
|
||||||
float: left;
|
float: left;
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
@@ -420,23 +347,19 @@ ul.product_list.list > li .right-block .right-block-content .button-container .b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
/* line 337, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons {
|
||||||
float: none;
|
float: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
/* line 356, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons a i, ul.product_list.list > li .right-block .right-block-content .functional-buttons a:before, ul.product_list.list > li .right-block .right-block-content .functional-buttons label i, ul.product_list.list > li .right-block .right-block-content .functional-buttons label:before {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons a i, ul.product_list.list > li .right-block .right-block-content .functional-buttons a:before, ul.product_list.list > li .right-block .right-block-content .functional-buttons label i, ul.product_list.list > li .right-block .right-block-content .functional-buttons label:before {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 359, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons a, ul.product_list.list > li .right-block .right-block-content .functional-buttons label {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons a, ul.product_list.list > li .right-block .right-block-content .functional-buttons label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #777676;
|
color: #777676;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
/* line 364, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons a i, ul.product_list.list > li .right-block .right-block-content .functional-buttons label i {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons a i, ul.product_list.list > li .right-block .right-block-content .functional-buttons label i {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
@@ -453,19 +376,15 @@ ul.product_list.list > li .right-block .right-block-content .functional-buttons
|
|||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
/* line 376, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons a:hover, ul.product_list.list > li .right-block .right-block-content .functional-buttons label:hover {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons a:hover, ul.product_list.list > li .right-block .right-block-content .functional-buttons label:hover {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
/* line 379, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons a:hover i, ul.product_list.list > li .right-block .right-block-content .functional-buttons label:hover i {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons a:hover i, ul.product_list.list > li .right-block .right-block-content .functional-buttons label:hover i {
|
||||||
background: #333333;
|
background: #333333;
|
||||||
}
|
}
|
||||||
/* line 385, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
/* line 390, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare label:before {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare label:before {
|
||||||
content: "";
|
content: "";
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -481,25 +400,27 @@ ul.product_list.list > li .right-block .right-block-content .functional-buttons
|
|||||||
-o-border-radius: 100px;
|
-o-border-radius: 100px;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
padding: 4px 0 0 0;
|
padding: 6px 0 0 0;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
/* line 405, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare label:hover {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare label:hover {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
/* line 408, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare label:hover:before {
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare label:hover:before {
|
||||||
background: #333333;
|
background: #333333;
|
||||||
}
|
}
|
||||||
|
ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare label.checked:before {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #929292;
|
||||||
|
color: #929292;
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
/* line 426, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li:hover .product-image-container .quick-view {
|
ul.product_list.list > li:hover .product-image-container .quick-view {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 479px) {
|
@media (max-width: 479px) {
|
||||||
/* line 243, ../sass/product_list.scss */
|
|
||||||
ul.product_list.list > li {
|
ul.product_list.list > li {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -508,25 +429,21 @@ ul.product_list.list > li .right-block .right-block-content .functional-buttons
|
|||||||
/*******************************************************
|
/*******************************************************
|
||||||
Product list(Index page) Styles
|
Product list(Index page) Styles
|
||||||
********************************************************/
|
********************************************************/
|
||||||
/* line 443, ../sass/product_list.scss */
|
|
||||||
#index ul.product_list.tab-pane > li {
|
#index ul.product_list.tab-pane > li {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
/* line 443, ../sass/product_list.scss */
|
|
||||||
#index ul.product_list.tab-pane > li {
|
#index ul.product_list.tab-pane > li {
|
||||||
/* min 1200px */
|
/* min 1200px */
|
||||||
padding-bottom: 35px;
|
padding-bottom: 35px;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* line 451, ../sass/product_list.scss */
|
|
||||||
#index ul.product_list.tab-pane > li .availability {
|
#index ul.product_list.tab-pane > li .availability {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
/* line 454, ../sass/product_list.scss */
|
|
||||||
#index ul.product_list.tab-pane > li.last-line {
|
#index ul.product_list.tab-pane > li.last-line {
|
||||||
border: none;
|
border: none;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
@@ -534,11 +451,9 @@ ul.product_list.list > li .right-block .right-block-content .functional-buttons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 480px) and (max-width: 767px) {
|
@media (min-width: 480px) and (max-width: 767px) {
|
||||||
/* line 462, ../sass/product_list.scss */
|
|
||||||
#index ul.product_list.tab-pane > li.first-item-of-tablet-line {
|
#index ul.product_list.tab-pane > li.first-item-of-tablet-line {
|
||||||
clear: none;
|
clear: none;
|
||||||
}
|
}
|
||||||
/* line 463, ../sass/product_list.scss */
|
|
||||||
#index ul.product_list.tab-pane > li.first-item-of-mobile-line {
|
#index ul.product_list.tab-pane > li.first-item-of-mobile-line {
|
||||||
clear: left;
|
clear: left;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,11 +69,16 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
{/if}
|
||||||
<script src="{$js_dir}/tools/bootstrap.min.js"></script>
|
<script src="{$js_dir}/tools/bootstrap.min.js"></script>
|
||||||
|
<!--[if IE 7]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}">
|
||||||
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
<script src="{$js_dir}/tools/jquery.total-storage.min.js"></script>
|
<script src="{$js_dir}/tools/jquery.total-storage.min.js"></script>
|
||||||
<script src="{$js_dir}/jquery/jquery.uniform-modify.js"></script>
|
<script src="{$js_dir}/jquery/jquery.uniform-modify.js"></script>
|
||||||
<script src="{$js_dir}/jquery/highdpi.js"></script>
|
<script src="{$js_dir}/jquery/highdpi.js"></script>
|
||||||
<script src="{$js_dir}/jquery/jquery.bxslider.js"></script>
|
<script src="{$js_dir}/jquery/jquery.bxslider.js"></script>
|
||||||
<script src="{$js_dir}/jquery/footable.js"></script>
|
<script src="{$js_dir}/jquery/footable.js"></script>
|
||||||
|
<script src="{$js_dir}/jquery/resonsive_utilites.js"></script>
|
||||||
{$HOOK_HEADER}
|
{$HOOK_HEADER}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -117,7 +122,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<ul id="first-languages" class="countries_ul">
|
<ul id="first-languages" class="countries_ul toogle_content">
|
||||||
{foreach from=$languages key=k item=language name="languages"}
|
{foreach from=$languages key=k item=language name="languages"}
|
||||||
<li {if $language.iso_code == $lang_iso}class="selected"{/if}>
|
<li {if $language.iso_code == $lang_iso}class="selected"{/if}>
|
||||||
{if $language.iso_code != $lang_iso}
|
{if $language.iso_code != $lang_iso}
|
||||||
@@ -164,7 +169,7 @@
|
|||||||
{if $cookie->id_currency == $f_currency.id_currency}<strong>{$f_currency.iso_code}</strong>{/if}
|
{if $cookie->id_currency == $f_currency.id_currency}<strong>{$f_currency.iso_code}</strong>{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
<ul id="first-currencies" class="currencies_ul">
|
<ul id="first-currencies" class="currencies_ul toogle_content">
|
||||||
{foreach from=$currencies key=k item=f_currency}
|
{foreach from=$currencies key=k item=f_currency}
|
||||||
<li {if $cookie->id_currency == $f_currency.id_currency}class="selected"{/if}>
|
<li {if $cookie->id_currency == $f_currency.id_currency}class="selected"{/if}>
|
||||||
<a href="javascript:setCurrency({$f_currency.id_currency});" title="{$f_currency.name}" rel="nofollow">{$f_currency.name}</a>
|
<a href="javascript:setCurrency({$f_currency.id_currency});" title="{$f_currency.name}" rel="nofollow">{$f_currency.name}</a>
|
||||||
|
|||||||
@@ -52,15 +52,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="firstname">{l s='First name'} <sup>*</sup></label>
|
<label for="firstname">{l s='First name'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="text" id="firstname" name="firstname" value="{$smarty.post.firstname}" />
|
<input class="is_required validate form-control" data-validate="isName" type="text" id="firstname" name="firstname" value="{$smarty.post.firstname}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="lastname">{l s='Last name'} <sup>*</sup></label>
|
<label for="lastname">{l s='Last name'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="text" name="lastname" id="lastname" value="{$smarty.post.lastname}" />
|
<input class="is_required validate form-control" data-validate="isName" type="text" name="lastname" id="lastname" value="{$smarty.post.lastname}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="email">{l s='E-mail address'} <sup>*</sup></label>
|
<label for="email">{l s='E-mail address'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="email" name="email" id="email" value="{$smarty.post.email}" />
|
<input class="is_required validate form-control" data-validate="isEmail" type="email" name="email" id="email" value="{$smarty.post.email}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{l s='Date of Birth'}</label>
|
<label>{l s='Date of Birth'}</label>
|
||||||
@@ -107,15 +107,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="required form-group">
|
<div class="required form-group">
|
||||||
<label for="old_passwd">{l s='Current Password'} <sup>*</sup></label>
|
<label for="old_passwd">{l s='Current Password'} <sup>*</sup></label>
|
||||||
<input class="form-control" type="password" name="old_passwd" id="old_passwd" />
|
<input class="is_required validate form-control" type="password" data-validate="isPasswd" name="old_passwd" id="old_passwd" />
|
||||||
</div>
|
</div>
|
||||||
<div class="password form-group">
|
<div class="password form-group">
|
||||||
<label for="passwd">{l s='New Password'}</label>
|
<label for="passwd">{l s='New Password'}</label>
|
||||||
<input class="form-control" type="password" name="passwd" id="passwd" />
|
<input class="is_required validate form-control" type="password" data-validate="isPasswd" name="passwd" id="passwd" />
|
||||||
</div>
|
</div>
|
||||||
<div class="password form-group">
|
<div class="password form-group">
|
||||||
<label for="confirmation">{l s='Confirmation'}</label>
|
<label for="confirmation">{l s='Confirmation'}</label>
|
||||||
<input class="form-control" type="password" name="confirmation" id="confirmation" />
|
<input class="is_required validate form-control" type="password" data-validate="isPasswd" name="confirmation" id="confirmation" />
|
||||||
</div>
|
</div>
|
||||||
{if $newsletter}
|
{if $newsletter}
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/*********************************************************** TMMenuDropDown **********************************/
|
||||||
|
function tmDropDown (elementType, elementClick, elementSlide, activeClass){
|
||||||
|
elementType = elementType; // special if hidden element isn't next (like for cart block here)
|
||||||
|
elementClick = elementClick; // element to click
|
||||||
|
elementSlide = elementSlide; // element to show/hide
|
||||||
|
activeClass = activeClass; // active class for "element to click"
|
||||||
|
|
||||||
|
|
||||||
|
//show/hide elements
|
||||||
|
$(elementClick).on('click touchstart', function(){
|
||||||
|
if (elementType != 'cart')
|
||||||
|
var subUl = $(this).next(elementSlide);
|
||||||
|
else
|
||||||
|
var subUl = $(this).parents('#header').find(elementSlide);
|
||||||
|
if(subUl.is(':hidden')) {
|
||||||
|
subUl.slideDown(),
|
||||||
|
$(this).addClass(activeClass)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
subUl.slideUp(),
|
||||||
|
$(this).removeClass(activeClass)
|
||||||
|
}
|
||||||
|
$(elementClick).not(this).next(elementSlide).slideUp(),
|
||||||
|
$(elementClick).not(this).removeClass(activeClass);
|
||||||
|
return false
|
||||||
|
}),
|
||||||
|
|
||||||
|
//enable clicks on showed elements
|
||||||
|
$(elementSlide).on('click touchstart', function(e){
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
|
||||||
|
// hide showed elements on document click
|
||||||
|
$(document).on('click touchstart', function(){
|
||||||
|
if (elementType != 'cart')
|
||||||
|
var elementHide = $(elementClick).next(elementSlide);
|
||||||
|
else
|
||||||
|
var elementHide = $(elementClick).parents('#header').find(elementSlide);
|
||||||
|
$(elementHide).slideUp();
|
||||||
|
})
|
||||||
|
};
|
||||||
|
$(document).ready(function(){
|
||||||
|
tmDropDown ('', '#header .current', 'ul.toogle_content', 'active'); // all of this should be defined or left empty brackets
|
||||||
|
//tmDropDown ('cart', 'li#shopping_cart > a', '#cart_block', 'active'); // all of this should be defined or left empty brackets
|
||||||
|
});
|
||||||
@@ -453,6 +453,7 @@ $(function() {
|
|||||||
updateState();
|
updateState();
|
||||||
updateNeedIDNumber();
|
updateNeedIDNumber();
|
||||||
updateZipCode();
|
updateZipCode();
|
||||||
|
$("select.form-control,input[type='checkbox']").uniform();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (isGuest)
|
else if (isGuest)
|
||||||
@@ -726,8 +727,6 @@ function bindInputs()
|
|||||||
// Recyclable checkbox
|
// Recyclable checkbox
|
||||||
$('#recyclable').click(function() {
|
$('#recyclable').click(function() {
|
||||||
updateCarrierSelectionAndGift();
|
updateCarrierSelectionAndGift();
|
||||||
$("select.form-control,input[type='checkbox']").uniform();
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Gift checkbox update
|
// Gift checkbox update
|
||||||
@@ -737,7 +736,6 @@ function bindInputs()
|
|||||||
else
|
else
|
||||||
$('#gift_div').hide();
|
$('#gift_div').hide();
|
||||||
updateCarrierSelectionAndGift();
|
updateCarrierSelectionAndGift();
|
||||||
$("select.form-control,input[type='checkbox']").uniform();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($('#gift').is(':checked'))
|
if ($('#gift').is(':checked'))
|
||||||
@@ -755,6 +753,7 @@ function bindInputs()
|
|||||||
$('#cgv').click(function() {
|
$('#cgv').click(function() {
|
||||||
updatePaymentMethodsDisplay();
|
updatePaymentMethodsDisplay();
|
||||||
});
|
});
|
||||||
|
$("select.form-control,input[type='checkbox']").uniform();
|
||||||
}
|
}
|
||||||
|
|
||||||
function multishippingMode(it)
|
function multishippingMode(it)
|
||||||
|
|||||||
@@ -23,14 +23,15 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$('document').ready(function(){
|
|
||||||
reloadProductComparison();
|
|
||||||
});
|
|
||||||
|
|
||||||
reloadProductComparison = function() {
|
reloadProductComparison = function() {
|
||||||
|
$('input:checkbox.comparator').each(function() {
|
||||||
|
var checkedCheckbox = $(this);
|
||||||
|
if (checkedCheckbox.is(':checked'))
|
||||||
|
checkedCheckbox.parent().addClass('checked');
|
||||||
|
});
|
||||||
$('a.cmp_remove').click(function(){
|
$('a.cmp_remove').click(function(){
|
||||||
|
|
||||||
var idProduct = $(this).attr('rel').replace('ajax_id_product_', '');
|
var idProduct = $(this).prop('rel').replace('ajax_id_product_', '');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct,
|
url: 'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct,
|
||||||
@@ -41,14 +42,12 @@ reloadProductComparison = function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('input:checkbox.comparator').click(function(){
|
$('input:checkbox.comparator').click(function(){
|
||||||
|
var totalValueNow = parseInt($('.bt_compare').next('.compare_product_count').val());
|
||||||
var idProduct = $(this).attr('value').replace('comparator_item_', '');
|
var idProduct = $(this).prop('value').replace('comparator_item_', '');
|
||||||
var checkbox = $(this);
|
var checkbox = $(this);
|
||||||
|
|
||||||
if(checkbox.is(':checked'))
|
if(checkbox.is(':checked'))
|
||||||
{
|
{
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'index.php?controller=products-comparison&ajax=1&action=add&id_product=' + idProduct,
|
url: 'index.php?controller=products-comparison&ajax=1&action=add&id_product=' + idProduct,
|
||||||
async: true,
|
async: true,
|
||||||
@@ -56,12 +55,19 @@ reloadProductComparison = function() {
|
|||||||
success: function(data){
|
success: function(data){
|
||||||
if (data === '0')
|
if (data === '0')
|
||||||
{
|
{
|
||||||
checkbox.attr('checked', false);
|
checkbox.prop('checked', false);
|
||||||
alert(max_item);
|
alert(max_item);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
checkbox.prop('checked', true),
|
||||||
|
checkbox.parent().addClass('checked'),
|
||||||
|
totalVal = totalValueNow +1,
|
||||||
|
$('.bt_compare').next('.compare_product_count').val(totalVal),
|
||||||
|
totalValue(totalVal)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(){
|
error: function(){
|
||||||
checkbox.attr('checked', false);
|
checkbox.prop('checked', false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -73,12 +79,20 @@ reloadProductComparison = function() {
|
|||||||
cache: false,
|
cache: false,
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if (data === '0')
|
if (data === '0')
|
||||||
checkbox.attr('checked', true);
|
|
||||||
},
|
checkbox.prop('checked', true);
|
||||||
|
checkbox.parent().removeClass('checked');
|
||||||
|
totalVal = totalValueNow -1;
|
||||||
|
$('.bt_compare').next('.compare_product_count').val(totalVal),
|
||||||
|
totalValue(totalVal)
|
||||||
|
},
|
||||||
error: function(){
|
error: function(){
|
||||||
checkbox.attr('checked', true);
|
checkbox.prop('checked', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function totalValue(value) {
|
||||||
|
$('.bt_compare').find('.total-compare-val').html(value);
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||||
|
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||||
|
window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document);
|
||||||
|
|
||||||
|
/*! Respond.js v1.3.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
|
||||||
|
(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this);
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* 2007-2013 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2013 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
$(document).on('keyup', 'input.validate, textarea.validate', function() {
|
||||||
|
if ($(this).hasClass('is_required') || $(this).val().length)
|
||||||
|
{
|
||||||
|
if (window['validate_'+$(this).attr('data-validate')]($(this).val()))
|
||||||
|
$(this).parent().removeClass('form-error').addClass('form-ok');
|
||||||
|
else
|
||||||
|
$(this).parent().addClass('form-error').removeClass('form-ok');
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -46,8 +46,8 @@
|
|||||||
|
|
||||||
{if $nbManufacturers > 0}
|
{if $nbManufacturers > 0}
|
||||||
<div class="content_sortPagiBar">
|
<div class="content_sortPagiBar">
|
||||||
<div class="sortPagiBar clearfix hidden-xs">
|
<div class="sortPagiBar clearfix">
|
||||||
<ul class="display">
|
<ul class="display hidden-xs">
|
||||||
<li class="display-title">{l s='View:'}</li>
|
<li class="display-title">{l s='View:'}</li>
|
||||||
<li id="grid"><a onclick="display('grid');"><i class="icon-th-large"></i>{l s='Grid'}</a></li>
|
<li id="grid"><a onclick="display('grid');"><i class="icon-th-large"></i>{l s='Grid'}</a></li>
|
||||||
<li id="list"><a onclick="display('list');"><i class="icon-th-list"></i>{l s='List'}</a></li>
|
<li id="list"><a onclick="display('list');"><i class="icon-th-list"></i>{l s='List'}</a></li>
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
<div id="search_block_top">
|
<div id="search_block_top">
|
||||||
<form method="get" action="{$link->getPageLink('search')|escape:'html'}" id="searchbox">
|
<form method="get" action="{$link->getPageLink('search')|escape:'html'}" id="searchbox">
|
||||||
<div>
|
<div>
|
||||||
<label for="search_query_top"><!-- image on background --></label>
|
|
||||||
<input type="hidden" name="controller" value="search" />
|
<input type="hidden" name="controller" value="search" />
|
||||||
<input type="hidden" name="orderby" value="position" />
|
<input type="hidden" name="orderby" value="position" />
|
||||||
<input type="hidden" name="orderway" value="desc" />
|
<input type="hidden" name="orderway" value="desc" />
|
||||||
|
|||||||
@@ -55,7 +55,6 @@
|
|||||||
{if isset($search_query) AND $search_query}<input type="hidden" name="search_query" value="{$search_query|escape:'htmlall':'UTF-8'}" />{/if}
|
{if isset($search_query) AND $search_query}<input type="hidden" name="search_query" value="{$search_query|escape:'htmlall':'UTF-8'}" />{/if}
|
||||||
{if isset($tag) AND $tag AND !is_array($tag)}<input type="hidden" name="tag" value="{$tag|escape:'htmlall':'UTF-8'}" />{/if}
|
{if isset($tag) AND $tag AND !is_array($tag)}<input type="hidden" name="tag" value="{$tag|escape:'htmlall':'UTF-8'}" />{/if}
|
||||||
<button type="submit" class="btn btn-default button exclusive-medium"><span>{l s='Show all'}</span></button>
|
<button type="submit" class="btn btn-default button exclusive-medium"><span>{l s='Show all'}</span></button>
|
||||||
<input name="n" id="nb_item" class="hidden" value="{$nb_products}" />
|
|
||||||
{if is_array($requestNb)}
|
{if is_array($requestNb)}
|
||||||
{foreach from=$requestNb item=requestValue key=requestKey}
|
{foreach from=$requestNb item=requestValue key=requestKey}
|
||||||
{if $requestKey != 'requestUrl'}
|
{if $requestKey != 'requestUrl'}
|
||||||
@@ -63,6 +62,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
{/if}
|
||||||
|
<input name="n" id="nb_item" class="hidden" value="{$nb_products}" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -113,7 +113,17 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="product-count">
|
<div class="product-count">
|
||||||
Showing 1-12 of 1125 items
|
{if ($n*$p) < $nb_products }
|
||||||
|
{assign var='productShowing' value=$n*$p}
|
||||||
|
{else}
|
||||||
|
{assign var='productShowing' value=($n*$p-$nb_products-$n*$p)*-1}
|
||||||
|
{/if}
|
||||||
|
{if $p==1}
|
||||||
|
{assign var='productShowingStart' value=1}
|
||||||
|
{else}
|
||||||
|
{assign var='productShowingStart' value=$n*$p-$n+1}
|
||||||
|
{/if}
|
||||||
|
{l s='Showing'} {$productShowingStart} - {$productShowing} {l s='of'} {$nb_products}{if $nb_products > 1} {l s='items'}{else} {l s='item'}{/if}
|
||||||
</div>
|
</div>
|
||||||
<!-- /Pagination -->
|
<!-- /Pagination -->
|
||||||
{/if}
|
{/if}
|
||||||
@@ -34,7 +34,8 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<form method="post" action="{$link->getPageLink('products-comparison')|escape:'html'}" onsubmit="true" class="compare-form">
|
<form method="post" action="{$link->getPageLink('products-comparison')|escape:'html'}" onsubmit="true" class="compare-form">
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" id="bt_compare{if isset($paginationId)}_{$paginationId}{/if}" class="btn btn-default button button-medium bt_compare"><span>{l s='Compare'} (0)<i class="icon-chevron-right right"></i></span></button>
|
<button type="submit" id="bt_compare{if isset($paginationId)}_{$paginationId}{/if}" class="btn btn-default button button-medium bt_compare"><span>{l s='Compare'} (<strong class="total-compare-val">{count($compared_products)}</strong>)<i class="icon-chevron-right right"></i></span></button>
|
||||||
|
<input type="hidden" name="compare_product_count" class="compare_product_count" value="{count($compared_products)}" />
|
||||||
<input type="hidden" name="compare_product_list" class="compare_product_list" value="" />
|
<input type="hidden" name="compare_product_list" class="compare_product_list" value="" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -34,6 +34,12 @@
|
|||||||
{assign var='nbItemsPerLineTablet' value=2}
|
{assign var='nbItemsPerLineTablet' value=2}
|
||||||
{assign var='nbItemsPerLineMobile' value=3}
|
{assign var='nbItemsPerLineMobile' value=3}
|
||||||
{else}
|
{else}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('document').ready(function(){
|
||||||
|
if (typeof reloadProductComparison != 'undefined')
|
||||||
|
reloadProductComparison()
|
||||||
|
});
|
||||||
|
</script>
|
||||||
{assign var='nbItemsPerLine' value=4}
|
{assign var='nbItemsPerLine' value=4}
|
||||||
{assign var='nbItemsPerLineTablet' value=3}
|
{assign var='nbItemsPerLineTablet' value=3}
|
||||||
{assign var='nbItemsPerLineMobile' value=2}
|
{assign var='nbItemsPerLineMobile' value=2}
|
||||||
@@ -122,7 +128,7 @@
|
|||||||
{if isset($comparator_max_item) && $comparator_max_item}
|
{if isset($comparator_max_item) && $comparator_max_item}
|
||||||
<div class="compare">
|
<div class="compare">
|
||||||
<label for="comparator_item_{$product.id_product}">
|
<label for="comparator_item_{$product.id_product}">
|
||||||
<input type="checkbox" class="comparator hidden" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked="checked"{/if} autocomplete="off"/>
|
<input type="checkbox" class="comparator hidden" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compared_products) && in_array($product.id_product, $compared_products)}checked="checked"{/if} autocomplete="off"/>
|
||||||
{l s='Add to Compare'}</label>
|
{l s='Add to Compare'}</label>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -282,7 +282,6 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
|||||||
|
|
||||||
|
|
||||||
<!-- availability -->
|
<!-- availability -->
|
||||||
<link itemprop="availability" href="http://schema.org/InStock">
|
|
||||||
<p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
|
<p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
|
||||||
{*<span id="availability_label">{l s='Availability:'}</span>*}
|
{*<span id="availability_label">{l s='Availability:'}</span>*}
|
||||||
<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span>
|
<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span>
|
||||||
@@ -353,6 +352,7 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
|||||||
|
|
||||||
<div class="price">
|
<div class="price">
|
||||||
<p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
<p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||||
|
<link itemprop="availability" href="http://schema.org/InStock">
|
||||||
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
||||||
<span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>
|
<span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>
|
||||||
<!--{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))}
|
<!--{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))}
|
||||||
|
|||||||
@@ -28,6 +28,12 @@
|
|||||||
<h1 class="page-heading">{l s='Product Comparison'}</h1>
|
<h1 class="page-heading">{l s='Product Comparison'}</h1>
|
||||||
|
|
||||||
{if $hasProduct}
|
{if $hasProduct}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('document').ready(function(){
|
||||||
|
if (typeof reloadProductComparison != 'undefined')
|
||||||
|
reloadProductComparison()
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<div class="products_block table-responsive">
|
<div class="products_block table-responsive">
|
||||||
<table id="product_comparison" class="table table-bordered">
|
<table id="product_comparison" class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -108,7 +114,7 @@
|
|||||||
{if ($product->quantity > 0 OR $product->allow_oosp)}
|
{if ($product->quantity > 0 OR $product->allow_oosp)}
|
||||||
<a class="button ajax_add_to_cart_button btn btn-default" rel="ajax_id_product_{$product->id}" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$product->id}&token={$static_token}&add")|escape:'html'}" title="{l s='Add to cart'}"><span>{l s='Add to cart'}</span></a>
|
<a class="button ajax_add_to_cart_button btn btn-default" rel="ajax_id_product_{$product->id}" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$product->id}&token={$static_token}&add")|escape:'html'}" title="{l s='Add to cart'}"><span>{l s='Add to cart'}</span></a>
|
||||||
{else}
|
{else}
|
||||||
<span class="exclusive btn btn-default disabled">{l s='Add to cart'}</span>
|
<span class="ajax_add_to_cart_button button btn btn-default disabled"><span>{l s='Add to cart'}</span></span>
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ table#product_comparison {
|
|||||||
}
|
}
|
||||||
.button-container {
|
.button-container {
|
||||||
|
|
||||||
a {
|
a, > span {
|
||||||
margin-bottom:10px;
|
margin-bottom:10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1078,6 +1078,7 @@ ul.footer_links {
|
|||||||
.clearfix > span {
|
.clearfix > span {
|
||||||
padding:3px 0 0 12px;
|
padding:3px 0 0 12px;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
|
float:left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#uniform-nb_item { float:left;}
|
#uniform-nb_item { float:left;}
|
||||||
@@ -1179,6 +1180,9 @@ ul.footer_links {
|
|||||||
}
|
}
|
||||||
ul.pagination {
|
ul.pagination {
|
||||||
margin:8px 0px 8px 0;
|
margin:8px 0px 8px 0;
|
||||||
|
@media (max-width: $screen-sm-max) { // max 991px
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
@@ -1670,8 +1674,6 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px }
|
|||||||
background:#484848;
|
background:#484848;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {display:block;}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#contact-link {
|
#contact-link {
|
||||||
@@ -1697,12 +1699,8 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px }
|
|||||||
#contact-link a, .header-row #header_user_info a, #currencies-block-top div.current, #languages-block-top div.current {
|
#contact-link a, .header-row #header_user_info a, #currencies-block-top div.current, #languages-block-top div.current {
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover, &.active {
|
||||||
background:#2b2b2b;
|
background:#2b2b2b;
|
||||||
|
|
||||||
+ ul {
|
|
||||||
display:block;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2627,11 +2625,6 @@ p.cheque-indent {
|
|||||||
|
|
||||||
#pagination {
|
#pagination {
|
||||||
|
|
||||||
/* 480 -> 1199 */
|
|
||||||
@media (min-width: $screen-xs) and (max-width: $screen-md-max) {
|
|
||||||
width:auto;
|
|
||||||
text-align:right;
|
|
||||||
}
|
|
||||||
.showall {
|
.showall {
|
||||||
margin-right:0;
|
margin-right:0;
|
||||||
|
|
||||||
@@ -2641,26 +2634,10 @@ p.cheque-indent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* < 480*/
|
|
||||||
@media (max-width: $screen-xs) {
|
|
||||||
.product-count, #pagination {
|
|
||||||
width:100%;
|
|
||||||
text-align:center;
|
|
||||||
|
|
||||||
.showall {
|
|
||||||
display:none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-pagination-content.bottom-line {
|
.top-pagination-content.bottom-line {
|
||||||
border-bottom:1px solid $base-border-color;
|
border-bottom:1px solid $base-border-color;
|
||||||
/* < 767 */
|
|
||||||
@media (max-width: $screen-xs-max) {
|
|
||||||
border-top:1px solid $base-border-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*****************************************************************************************************
|
/*****************************************************************************************************
|
||||||
|
|||||||
@@ -181,27 +181,27 @@ ul.product_list.grid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.compare {
|
&.compare {
|
||||||
|
label {
|
||||||
&:before {
|
|
||||||
content:"";
|
|
||||||
display:inline-block;
|
|
||||||
font-family:'FontAwesome';
|
|
||||||
@media (min-width: $screen-md) and (max-width: $screen-md-max) { // min 992px max 1199px
|
|
||||||
display:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $screen-xs) and (max-width: $screen-xs-max) { // min 480px max 767px
|
|
||||||
display:none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.compare.checked {
|
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content:"";
|
content:"";
|
||||||
|
display:inline-block;
|
||||||
|
font-family:'FontAwesome';
|
||||||
|
@media (min-width: $screen-md) and (max-width: $screen-md-max) { // min 992px max 1199px
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: $screen-xs) and (max-width: $screen-xs-max) { // min 480px max 767px
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
&.checked {
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content:"";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ ul.product_list.list {
|
|||||||
background:#929292;
|
background:#929292;
|
||||||
@include border-radius(100px);
|
@include border-radius(100px);
|
||||||
margin-right:3px;
|
margin-right:3px;
|
||||||
padding:4px 0 0 0;
|
padding:6px 0 0 0;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,6 +409,14 @@ ul.product_list.list {
|
|||||||
background:#333333;
|
background:#333333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.checked {
|
||||||
|
&:before {
|
||||||
|
background:#fff;
|
||||||
|
border:1px solid #929292;
|
||||||
|
color:#929292;
|
||||||
|
padding-top:5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
{if $nbSuppliers > 0}
|
{if $nbSuppliers > 0}
|
||||||
<div class="content_sortPagiBar">
|
<div class="content_sortPagiBar">
|
||||||
<div class="sortPagiBar clearfix">
|
<div class="sortPagiBar clearfix">
|
||||||
<ul class="display">
|
<ul class="display hidden-xs">
|
||||||
<li class="display-title">{l s='View:'}</li>
|
<li class="display-title">{l s='View:'}</li>
|
||||||
<li id="grid"><a onclick="display('grid');"><i class="icon-th-large"></i>{l s='Grid'}</a></li>
|
<li id="grid"><a onclick="display('grid');"><i class="icon-th-large"></i>{l s='Grid'}</a></li>
|
||||||
<li id="list"><a onclick="display('list');"><i class="icon-th-list"></i>{l s='List'}</a></li>
|
<li id="list"><a onclick="display('list');"><i class="icon-th-list"></i>{l s='List'}</a></li>
|
||||||
|
|||||||
Reference in new issue
Block a user