");
base.$elem.find(".owl-wrapper").wrap("
");
base.wrapperOuter = base.$elem.find(".owl-wrapper-outer");
base.$elem.css("display","inline-block");
},
baseClass : function(){
var base = this;
var hasBaseClass = base.$elem.hasClass(base.options.baseClass);
var hasThemeClass = base.$elem.hasClass(base.options.theme);
base.$elem.data("owl-originalStyles", base.$elem.attr("style"))
.data("owl-originalClasses", base.$elem.attr("class"));
if(!hasBaseClass){
base.$elem.addClass(base.options.baseClass);
}
if(!hasThemeClass){
base.$elem.addClass(base.options.theme);
}
},
updateItems : function(){
var base = this;
if(base.options.responsive === false){
return false;
}
if(base.options.singleItem === true){
base.options.items = base.orignalItems = 1;
base.options.itemsDesktop = false;
base.options.itemsDesktopSmall = false;
base.options.itemsTablet = false;
base.options.itemsTabletSmall = false;
base.options.itemsMobile = false;
return false;
}
var width = $(base.options.responsiveBaseWidth).width();
if(width > (base.options.itemsDesktop[0] || base.orignalItems) ){
base.options.items = base.orignalItems
}
if(width base.itemsAmount && base.options.itemsScaleUp === true){
base.options.items = base.itemsAmount;
}
},
response : function(){
var base = this,
smallDelay;
if(base.options.responsive !== true){
return false
}
var lastWindowWidth = $(window).width();
base.resizer = function(){
if($(window).width() !== lastWindowWidth){
if(base.options.autoPlay !== false){
clearInterval(base.autoPlayInterval);
}
clearTimeout(smallDelay);
smallDelay = setTimeout(function(){
lastWindowWidth = $(window).width();
base.updateVars();
},base.options.responsiveRefreshRate);
}
}
$(window).resize(base.resizer)
},
updatePosition : function(){
var base = this;
if(base.browser.support3d === true){
if(base.positionsInArray[base.currentItem] > base.maximumPixels){
base.transition3d(base.positionsInArray[base.currentItem]);
} else {
base.transition3d(0);
base.currentItem = 0;
}
} else{
if(base.positionsInArray[base.currentItem] > base.maximumPixels){
base.css2slide(base.positionsInArray[base.currentItem]);
} else {
base.css2slide(0);
base.currentItem = 0;
}
}
if(base.options.autoPlay !== false){
base.checkAp();
}
},
appendItemsSizes : function(){
var base = this;
var roundPages = 0;
var lastItem = base.itemsAmount - base.options.items;
base.$owlItems.each(function(index){
var $this = $(this);
$this
.css({"width": base.itemWidth})
.data("owl-item",Number(index));
if(index % base.options.items === 0 || index === lastItem){
if(!(index > lastItem)){
roundPages +=1;
}
}
$this.data("owl-roundPages",roundPages)
});
},
appendWrapperSizes : function(){
var base = this;
var width = 0;
var width = base.$owlItems.length * base.itemWidth;
base.$owlWrapper.css({
"width": width*2,
"left": 0
});
base.appendItemsSizes();
},
calculateAll : function(){
var base = this;
base.calculateWidth();
base.appendWrapperSizes();
base.loops();
base.max();
},
calculateWidth : function(){
var base = this;
base.itemWidth = Math.round(base.$elem.width()/base.options.items)
},
max : function(){
var base = this;
var maximum = ((base.itemsAmount * base.itemWidth) - base.options.items * base.itemWidth) * -1;
if(base.options.items > base.itemsAmount){
base.maximumItem = 0;
maximum = 0
base.maximumPixels = 0;
} else {
base.maximumItem = base.itemsAmount - base.options.items;
base.maximumPixels = maximum;
}
return maximum;
},
min : function(){
return 0;
},
loops : function(){
var base = this;
base.positionsInArray = [0];
var elWidth = 0;
for(var i = 0; i
").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem);
}
if(base.options.pagination === true){
base.buildPagination();
}
if(base.options.navigation === true){
base.buildButtons();
}
},
buildButtons : function(){
var base = this;
var buttonsWrapper = $("');
$kp.css({'position':'fixed','top':100,'left':100,'z-index':10002});
var w = Math.round(($(window).width() - $kp.width()) / 2);
$kp.css({'left':w});
$kp.slideDown('slow');
}
function run_kos_slidenote(){
var $sn = $('.kos_signup.met_slidenote').first();
$sn.css({'position':'fixed','bottom':0,'right':0,'z-index':10001});
$sn.slideDown('slow');
}
function run_kos_aftersubmit(res){
var $f = $('form input[name=id][value='+res.id+']').closest('form');
if (res.error){ alert(res.error);}
else if (res.html) {
var $ks = $f.closest('div.kos_signup');
var ow = $ks.outerWidth();
$ks.css('width',ow);
$f.replaceWith(res.html);
}
}
function run_kos_html(res){
if (res.html){
$('body').append(res.html);
$('.kos_signup form').off('submit');
$('.kos_signup form').on('submit',function(){
var $f = $(this);
var da = {};
$f.find('input[type=text], input[type=hidden], textarea, input[type=checkbox]:checked, input[type=radio]:checked').each(function(i,e){
var v = $(e).val();
var n = $(e).attr('name');
da[n] = v;
});
$.ajax({
url: 'https://www.finance.si/master.php',
data: da,
dataType:'jsonp',
crossDomain: true,
jsonpCallback:'run_kos_aftersubmit'
});
return false;
});
run_kos_signup();
}
}
function run_kos_signup(){
$('.kos_signup a.close').click(function(){
$(this).parents('.kos_semitrans').remove();
$(this).closest('.kos_signup').remove();
return false;
});
var $kp = $('.kos_signup.met_popup');
if ($kp.length > 0){
setTimeout(run_kos_popup,3000);
}
var $kp = $('.kos_signup.met_slidenote');
if ($kp.length > 0){
setTimeout(run_kos_slidenote,3000);
}
}
if (typeof $ !== "function"){
var $ = jQuery;
}
$(document).ready(function(){
var doit = true;
if (typeof kos_signup_id !== "undefined"){
var da = {op:'kos_signup_get_html',host:window.location.host,id:kos_signup_id};
if (typeof kos_signup_cooldown !== "undefined"){
da.cooldown = kos_signup_cooldown;
}
$.ajax({
url: 'https://www.finance.si/master.php',
data: da,
dataType:'jsonp',
crossDomain: true,
jsonpCallback:'run_kos_html'
});
}
else {
run_kos_signup();
}
});