$(function()
{
var adjustParam = 58;
var adjustHeight = ( parseInt( $('#col-center').height() ) + adjustParam );
adjustHeight = ( adjustHeight - (adjustHeight * 2) );
$('#modifica-formato-but a').click(function(){
$('#modifica-formato-but-a').hide();
$('#modifica-formato-but-loading').show();
});
$('#panel-formato-button').qtip({
overwrite: true,
content: $('#panel-formato-box'),
show: {
event: 'click',
show: true,
delay: 1
},
hide: {
event: 'click unfocus'
},
events: {
render: function(event, api) {
$(this).promise().done(function(){
$("#close-panel-formato")
.click(api.hide)
.click(function(evt){evt.preventDefault();});
});
},
toggle: function(event, api) {
api.elements.target.parent().toggleClass('std active');
$('#cart-small-box-formato').toggleClass('active');
},
show: function(event, api) {
fLoadingParziale(1);
$('#modifica-formato-but-loading').hide();
$('#modifica-formato-but-a').show();
},
hide: function(event, api) {
fLoadingParziale(0);
}
},
position: {
target: $('#target-tip'),
my: 'top left',
at: 'bottom left',
adjust: { y: adjustHeight, x: 250 }
},
style: {
tip: {
corner: false
},
classes: 'qtip-light q-tipi'
}
});
$('#modifica-supporto-but a').click(function(){
$('#modifica-supporto-but-a').hide();
$('#modifica-supporto-but-loading').show();
});
$('#panel-supporto-button').qtip({
overwrite: true,
content: $('#panel-supporto-box'),
show: {
event: 'click',
show: true,
delay: 1
},
hide: {
event: 'click unfocus'
},
events: {
render: function(event, api) {
$(this).promise().done(function(){
$("#close-panel-supporto")
.click(api.hide)
.click(function(evt){evt.preventDefault();});
});
},
toggle: function(event, api) {
api.elements.target.parent().toggleClass('std active');
$('#cart-small-box-supporto').toggleClass('active');
},
show: function(event, api) {
fLoadingParziale(1);
$('#modifica-supporto-but-loading').hide();
$('#modifica-supporto-but-a').show();
},
hide: function(event, api) {
fLoadingParziale(0);
}
},
position: {
target: $('#target-tip'),
my: 'top left',
at: 'bottom left',
adjust: { y: adjustHeight, x: 250 }
},
style: {
tip: {
corner: false
},
classes: 'qtip-light q-tipi'
}
});
$('#modifica-opzioni-but a').click(function(){
$('#modifica-opzioni-but-a').hide();
$('#modifica-opzioni-but-loading').show();
});
$('#panel-opzioni-button').qtip({
overwrite: true,
content: $('#panel-opzioni-box'),
show: {
event: 'click',
show: true,
delay: 1
},
hide: {
event: 'click unfocus'
},
events: {
render: function(event, api) {
$(this).promise().done(function(){
$("#close-panel-opzioni")
.click(api.hide)
.click(function(evt){evt.preventDefault();});
});
},
toggle: function(event, api) {
api.elements.target.parent().toggleClass('std active');
$('#cart-small-box-opzioni').toggleClass('active');
},
show: function(event, api) {
fLoadingParziale(1);
$('#modifica-opzioni-but-loading').hide();
$('#modifica-opzioni-but-a').show();
},
hide: function(event, api) {
fLoadingParziale(0);
}
},
position: {
target: $('#target-tip'),
my: 'top left',
at: 'bottom left',
adjust: { y: adjustHeight, x: 250 }
},
style: {
tip: {
corner: false
},
classes: 'qtip-light q-tipi'
}
});
$('#modifica-cornice-but a').click(function(){
$('#modifica-cornice-but-a').hide();
$('#modifica-cornice-but-loading').show();
});
$('#panel-cornice-button').qtip({
overwrite: true,
content: $('#panel-cornice-box'),
show: {
event: 'click',
show: true,
delay: 1
},
hide: {
event: 'click unfocus'
},
events: {
render: function(event, api) {
$(this).promise().done(function(){
$("#close-panel-cornice")
.click(api.hide)
.click(function(evt){evt.preventDefault();});
});
},
toggle: function(event, api) {
api.elements.target.parent().toggleClass('std active');
$('#cart-small-box-cornice').toggleClass('active');
},
show: function(event, api) {
fLoadingParziale(1);
$('#modifica-cornice-but-loading').hide();
$('#modifica-cornice-but-a').show();
},
hide: function(event, api) {
fLoadingParziale(0);
}
},
position: {
target: $('#target-tip'),
my: 'top left',
at: 'bottom left',
adjust: { y: adjustHeight, x: 250 }
},
style: {
tip: {
corner: false
},
classes: 'qtip-light q-tipi q-cornice'
}
});
$('#modifica-effetto-but a').click(function(){
$('#modifica-effetto-but-a').hide();
$('#modifica-effetto-but-loading').show();
});
$('#panel-effetto-button').qtip({
overwrite: true,
content: $('#panel-effetto-box'),
show: {
event: 'click',
show: true,
delay: 1
},
hide: {
event: 'click unfocus'
},
events: {
render: function(event, api) {
$(this).promise().done(function(){
$("#close-panel-effetto")
.click(api.hide)
.click(function(evt){evt.preventDefault();});
});
},
toggle: function(event, api) {
api.elements.target.parent().toggleClass('std active');
$('#cart-small-box-effetto').toggleClass('active');
},
show: function(event, api) {
fLoadingParziale(1);
$('#modifica-effetto-but-loading').hide();
$('#modifica-effetto-but-a').show();
},
hide: function(event, api) {
fLoadingParziale(0);
}
},
position: {
target: $('#target-tip'),
my: 'top left',
at: 'bottom left',
adjust: { y: adjustHeight, x: 250 }
},
style: {
tip: {
corner: false
},
classes: 'qtip-light q-tipi'
}
});
$('#tue-immagini-but a').click(function(){
$('#tue-immagini-but-a').hide();
$('#tue-immagini-but-loading').show();
});
$('#panel-immagini-button').qtip({
overwrite: true,
content: $('#panel-immagini-box'),
show: {
event: 'click',
show: true,
delay: 1
},
hide: {
event: 'click unfocus'
},
events: {
render: function(event, api) {
$(this).promise().done(function(){
$("#close-panel-immagini")
.click(api.hide)
.click(function(evt){evt.preventDefault();});
});
},
toggle: function(event, api) {
api.elements.target.parent().toggleClass('std active');
},
show: function(event, api) {
fLoadingParziale(1);
$('#tue-immagini-but-loading').hide();
$('#tue-immagini-but-a').show();
},
hide: function(event, api) {
fLoadingParziale(0);
}
},
position: {
target: $('#target-tip'),
my: 'top left',
at: 'bottom left',
adjust: { y: adjustHeight, x: 250 }
},
style: {
tip: {
corner: false
},
classes: 'qtip-light q-tipi'
}
});
fPreviewImages();
fPreviewImagesSupporto();
});
function fPreviewImages()
{
xOffset = 0;
yOffset = 0;
$(".i_preview").hover(function(e)
{
this.t = this.title;
this.title = '';
var c = (this.t != '') ? '
' + this.t : '';
$('body').append( '
' + c + '
' ); $('#i_preview') .css('top',(e.pageY - xOffset) + 'px') .css('left',(e.pageX + yOffset) + 'px') .fadeIn('fast'); }, function() { this.title = this.t; $('#i_preview').remove(); }); $('.i_preview').mousemove(function(e) { $('#i_preview') .css('top',(window.pageY - xOffset) + 'px') .css('left',(e.pageX + yOffset) + 'px'); }); } function fPreviewImagesSupporto() { xOffset = 0; yOffset = 0; $('.i_preview_supporto').hover(function(e) { this.t = this.title; this.title = ''; var c = (this.t != '') ? '' + this.t + '' : ''; $('body').append('' + c + '
'); $('#i_preview_supporto') .css('top',(e.pageY - xOffset) + 'px') .css('left',(e.pageX + yOffset) + 'px') .fadeIn('fast'); }, function() { this.title = this.t; $('#i_preview_supporto').remove(); }); $('.i_preview_supporto').mousemove(function(e) { $('#i_preview_supporto') .css('top',(window.pageY - xOffset) + 'px') .css('left',(e.pageX + yOffset) + 'px'); }); }