
			showLoadingMessage = function() {
            document.getElementById("spinner").style.visibility = "visible";
        }
        hideLoadingMessage = function() {
            document.getElementById("spinner").style.visibility = "hidden";
        }
		function example_ajax_request() {
  $('#example-placeholder').html('<p><img src="/images/ajax-loader.gif" width="220" height="19" /></p>');
  $('#example-placeholder').load("/examples/ajax-loaded.html");
}
$(document).ready(function() 
{ 
$("#morecomment").click(function () {
$("#morecommentdiv").slideDown("slow");
$("#morecomment").hide();
return false;
});
});
function updatepanierless(id){
var new2=1*$("#champ_qty_panier_"+id).val() -1;
var price=Math.round(100 * $("#u_price_"+id).val())/100;
$("#champ_qty_panier_"+id).val(new2);
$("#price_"+id).html(new2*price);
return false;
}
function updatepaniermore(id){
var new2=1*$("#champ_qty_panier_"+id).val() +1;
var price=Math.round(100 * $("#u_price_"+id).val())/100;
$("#champ_qty_panier_"+id).val(new2);
$("#price_"+id).html(new2*price);
return false;
}
$(document).ready(function() {
	$("a.anchorLink").anchorAnimate()
});

jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 1100
	}, settings);	
	
	return this.each(function(){
		var caller = this
		$(caller).click(function (event) {	
			event.preventDefault()
			var locationHref = window.location.href
			var elementClick = $(caller).attr("href")
			
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick
			});
		  	return false;
		})
	})
}
jQuery(function ($) {
	// Load dialog on page load
	//$('#basic-modal-content').modal();

	// Load dialog on click
	var src = "http://www.sexshop-ilxelle.com/points-fidelite-faq.html?modal=2";

	$('.lien-fidelity').click(function (e) {
		$.modal('<iframe src="' + src + '" height="450" width="830" style="border:0">', {
	containerCss:{
		backgroundColor:"#fff",
		borderColor:"#fff",
		height:450,
		padding:0,
		width:830
	},
	overlayClose:true,
	opacity :80,
		zIndex : 300000
});

		return false;
	});

	var src2 = "http://www.sexshop-ilxelle.com/paiement-securise-sexshop.html?modal=2";

	$('#lien-paiement').click(function (e) {
		$.modal('<iframe src="' + src2 + '" height="450" width="830" style="border:0">', {
	containerCss:{
		backgroundColor:"#fff",
		borderColor:"#fff",
		height:450,
		padding:0,
		width:830
	},
	overlayClose:true,
	opacity :80,
		zIndex : 300000
});

		return false;
	});

	var src3 = "expedition-livraison-produits-sexshop.html?modal=2";

	$('#lien-livraison').click(function (e) {
		$.modal('<iframe src="' + src3 + '" height="450" width="830" style="border:0">', {
	containerCss:{
		backgroundColor:"#fff",
		borderColor:"#fff",
		height:450,
		padding:0,
		width:830
	},
	overlayClose:true,
	opacity :80,
		zIndex : 300000
});

		return false;
	});
});

function getxmlHttpObj()
{
		var xmlHttp;
		try
		{
			// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{
			// Internet Explorer
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		return xmlHttp;
}

function getPrice(price,product_id,attr_arr)
{
		opt_id = document.getElementById("optionsid").value;

		xmlHttpObj = getxmlHttpObj();

		xmlHttpObj.onreadystatechange=function()
		{
			if(xmlHttpObj.readyState==4)
			{
				document.getElementById("display_price").innerHTML =  xmlHttpObj.responseText;
			}
		}
		xmlHttpObj.open("GET","ajax_onchange_price.php?price="+price+"&option_id="+opt_id+"&product_id="+product_id+"&product_opt="+attr_arr,true);
		xmlHttpObj.send();
		
}

/*!
*  JqueryAsynchImageLoader (JAIL) : plugin for jQuery
*
* Developed by
* Sebastiano Armeli-Battana (@sebarmeli) - http://www.sebastianoarmelibattana.com
* Dual licensed under the MIT or GPL Version 3 licenses.
* @version 0.9.5
*/
;(function(a){var b=a(window);a.fn.asynchImageLoader=a.fn.jail=function(d){d=a.extend({timeout:10,effect:false,speed:400,selector:null,offset:0,event:"load+scroll",callback:jQuery.noop,callbackAfterEachImage:jQuery.noop,placeholder:false,container:window},d);var c=this;a.jail.initialStack=this;this.data("triggerEl",(d.selector)?a(d.selector):b);if(d.placeholder!==false){c.each(function(){a(this).attr("src",d.placeholder);});}if(/^load/.test(d.event)){a.asynchImageLoader.later.call(this,d);}else{a.asynchImageLoader.onEvent.call(this,d,c);}return this;};a.asynchImageLoader=a.jail={_purgeStack:function(c){var d=0;while(true){if(d===c.length){break;}else{if(c[d].getAttribute("longdesc")){d++;}else{c.splice(d,1);}}}},_loadOnEvent:function(g){var f=a(this),d=g.data.options,c=g.data.images;a.asynchImageLoader._loadImage(d,f);f.unbind(d.event,a.asynchImageLoader._loadOnEvent);a.asynchImageLoader._purgeStack(c);if(!!d.callback){a.asynchImageLoader._purgeStack(a.jail.initialStack);a.asynchImageLoader._launchCallback(a.jail.initialStack,d);}},_bufferedEventListener:function(g){var c=g.data.images,d=g.data.options,f=c.data("triggerEl");clearTimeout(c.data("poller"));c.data("poller",setTimeout(function(){c.each(function e(){a.asynchImageLoader._loadImageIfVisible(d,this,f);});a.asynchImageLoader._purgeStack(c);if(!!d.callback){a.asynchImageLoader._purgeStack(a.jail.initialStack);a.asynchImageLoader._launchCallback(a.jail.initialStack,d);}},d.timeout));},onEvent:function(d,c){c=c||this;if(d.event==="scroll"||d.selector){var e=c.data("triggerEl");if(c.length>0){e.bind(d.event,{images:c,options:d},a.asynchImageLoader._bufferedEventListener);if(d.event==="scroll"||!d.selector){b.resize({images:c,options:d},a.asynchImageLoader._bufferedEventListener);}return;}else{if(!!e){e.unbind(d.event,a.asynchImageLoader._bufferedEventListener);}}}else{c.bind(d.event,{options:d,images:c},a.asynchImageLoader._loadOnEvent);}},later:function(d){var c=this;if(d.event==="load"){c.each(function(){a.asynchImageLoader._loadImageIfVisible(d,this,c.data("triggerEl"));});}a.asynchImageLoader._purgeStack(c);a.asynchImageLoader._launchCallback(c,d);setTimeout(function(){if(d.event==="load"){c.each(function(){a.asynchImageLoader._loadImage(d,a(this));});}else{c.each(function(){a.asynchImageLoader._loadImageIfVisible(d,this,c.data("triggerEl"));});}a.asynchImageLoader._purgeStack(c);a.asynchImageLoader._launchCallback(c,d);if(d.event==="load+scroll"){d.event="scroll";a.asynchImageLoader.onEvent(d,c);}},d.timeout);},_launchCallback:function(c,d){if(c.length===0&&!a.jail.isCallback){d.callback.call(this,d);a.jail.isCallback=true;}},_loadImageIfVisible:function(d,g,f){var e=a(g),c=(/scroll/i.test(d.event))?f:b;if(a.asynchImageLoader._isInTheScreen(c,e,d.offset)){a.asynchImageLoader._loadImage(d,e);}},_isInTheScreen:function(j,c,h){var f=j[0]===window,n=(f?{top:0,left:0}:j.offset()),g=n.top+(f?j.scrollTop():0),i=n.left+(f?j.scrollLeft():0),e=i+j.width(),k=g+j.height(),m=c.offset(),l=c.width(),d=c.height();return(g-h)<=(m.top+d)&&(k+h)>=m.top&&(i-h)<=(m.left+l)&&(e+h)>=m.left;},_loadImage:function(c,d){d.hide();d.attr("src",d.attr("longdesc"));d.removeAttr("longdesc");if(c.effect){if(c.speed){d[c.effect](c.speed);}else{d[c.effect]();}}else{d.show();}c.callbackAfterEachImage.call(this,c);}};}(jQuery));
    $(function(){
        $('img.lazy').jail();
		
    });$('img.lazy2').jail({
            offset:160
        }).asynchImageLoader({
            event: "focus",
            placeholder : '/img/loader.gif'
        });
