var top = {
trigger: "hover",
container: "body",
placement: "top",
html: !0,
viewport: {
selector: "body",
padding: 2
},
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
},
bottom = {
trigger: "hover",
container: "body",
placement: "bottom",
html: !0,
viewport: {
selector: "body",
padding: 2
},
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
},
left = {
trigger: "hover",
container: "body",
placement: "left",
html: !0,
viewport: {
selector: "body",
padding: 2
},
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
},
right = {
trigger: "hover",
container: "body",
placement: "right",
html: !0,
viewport: {
selector: "body",
padding: 2
},
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
};
$('[data-toggle="popover"]').each(function() {
var width = $(window).width();
if(width<768){
if ($(this).hasClass("xs-bottom")){ $(this).popover(bottom);}
else if ($(this).hasClass("xs-top")){ $(this).popover(top);}
else if ($(this).hasClass("xs-left")){ $(this).popover(left);}
else if($(this).hasClass("xs-right")){ $(this).popover(right);}
}else if(width>=768 && width<992){
if ($(this).hasClass("sm-bottom")){ $(this).popover(bottom);}
else if ($(this).hasClass("sm-top")){ $(this).popover(top);}
else if ($(this).hasClass("sm-left")){ $(this).popover(left);}
else if($(this).hasClass("sm-right")){ $(this).popover(right);}
}else if(width>=992 && width<1200){
if ($(this).hasClass("md-bottom")){ $(this).popover(bottom);}
else if ($(this).hasClass("md-top")){ $(this).popover(top);}
else if ($(this).hasClass("md-left")){ $(this).popover(left);}
else if($(this).hasClass("md-right")){ $(this).popover(right);}
}else if(width>=1200 && width<1600){
if ($(this).hasClass("lg-bottom")){ $(this).popover(bottom);}
else if ($(this).hasClass("lg-top")){ $(this).popover(top);}
else if ($(this).hasClass("lg-left")){ $(this).popover(left);}
else if($(this).hasClass("lg-right")){ $(this).popover(right);}
}else if(width>=1600){
if ($(this).hasClass("xlg-bottom")){ $(this).popover(bottom);}
else if ($(this).hasClass("xlg-top")){ $(this).popover(top);}
else if ($(this).hasClass("xlg-left")){ $(this).popover(left);}
else if($(this).hasClass("xlg-right")){ $(this).popover(right);}
}
});
$(function() {
var width = $(window).width(),
size = width < 768 ? 'xs' : width < 992 ? 'sm' : width < 1200 ? 'md' : width > 1600 ? 'xlg' : 'lg',
options = {
html: !0,
trigger: 'hover',
container: 'body',
viewport: {
selector: 'body',
padding: 2
},
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
};
$( '[data-toggle="popover"]' ).each( function() {
var toggle = $(this);
$.each([ 'bottom', 'top', 'left', 'right' ], function( i, value ) {
var cls = size + '-' + value;
if ( toggle.hasClass( cls ) ) options.placement = value;
if ( cls === 'xs-top' && toggle.hasClass( 'error' ) ) {
options.delay = { show: 500, hide: 10 };
delete options.viewport;
}
toggle.popover( options );
});
});
});
var re = /(?:^|\s)(?:xs|sm|md|lg|xlg)-(bottom|top|left|right)(?:$|\s)/;
$('[data-toggle="popover"]').each(function() {
var classList = $(this).attr('class');
var ok = re.exec(classList);
if (ok !== null) {
$(this).popover({
trigger: "hover",
container: "body",
placement: ok[1],
html: !0,
viewport: {
selector: "body",
padding: 2
},
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
});
}
});