‘;
} else {
var sFallBack = ‘Click on right here to subscribe‘;
}
$(‘#lee-services-list .loading’).cover();
$(‘#lee-services-list’).html(‘

‘+sFallBack+’

‘);
$(‘.lee-featured-subscription’).html(sFallBack);
}

serve as lee_formatPackage(oService){
check out {
var bOnlyModal = true;
var oSettings = lee_getPackageSettings(oService.HomeMembership);
var newService = {};
if(parseInt(oService.WebFeatureFG) === 2) go back false;
if(oService.WebStartPrice != ”){
var customized = JSON.parse(oService.WebStartPrice);
$.each and every(customized, serve as(okay,v){
newService[k] = v;
});
}
if(bOnlyModal && newService.in_modal && newService.in_modal.toLowerCase() === ‘false’) go back false;
if(!bOnlyModal && newService.not_members && newService.not_members.toLowerCase() === ‘true’) go back false;

newService.has_featured_class = newService.featured ? ‘featured-package’ : ”;
newService.type = parseInt((newService.type) ? newService.type : oSettings.type);
newService.identify = (newService.package_title && newService.package_title != ”) ? newService.package_title : oSettings.identify;

newService.degree = oService.HomeMembership;
newService.html = oService.WebOfferHTML;
newService.disabled = newService.disable_purchase ? ‘disabled’ : ”;

var value = lee_formatPackagePrice(newService.start_price);
newService.start_price = value.value;
newService.format_dollars = (value.format_dollars) ? value.format_dollars : ”;
newService.format_cents = (value.format_cents) ? value.format_cents : ”;
newService.start_at_rate = (newService.fixed_rate === ‘true’) ? ‘for the low value of’ : ‘beginning at’;

if( !newService.time period ) newService.time period = ‘per thirty days’;

newService.has_promotion_class = ”;
if( newService.promotional_price && newService.promotional_price != ” ){
newService.has_promotion_class = ‘has-promotion’;
var promotion = lee_formatPackagePrice(newService.promotional_price);
newService.promotional_price = promotion.value;
newService.promotional_format_dollars = (promotion.format_dollars) ? promotion.format_dollars : ”;
newService.promotional_format_cents = (promotion.format_cents) ? promotion.format_cents : ”;
}

newService.banner_class = ”;
if( newService.banner && newService.banner != ” ){
newService.banner_class = ‘has-banner’;
}
newService.description = (newService.description) ? newService.description : ”;

newService.special_title_class = newService.special_title ? ‘has-special-title’ : ”;
newService.special_label_class = newService.label ? ‘has-label’ : ”;

newService.action_button = ‘Signal Up’;
if(newService.disabled === ‘disabled’){
newService.start_at_rate = ‘Name us at’;
newService.start_price = ‘843-317-NEWS’;
newService.time period = ‘to get began’;
newService.action_button = ‘Name Lately’;
}

window.lee_service_impressions.push({
‘identification’: newService.degree,
‘title’: newService.identify,
‘value’: newService.start_price,
‘logo’: “scnow.com”,
‘class’: ‘subscription’,
‘checklist’: ‘Block’,
‘place’: newService.type
});

go back newService;

} catch(e){
if(window.console) console.warn(e);
go back false;
}
}

serve as lee_sortPackages(belongings) {
var sortOrder = 1;
if(belongings[0] === “-“) {
sortOrder = -1;
belongings = belongings.substr(1);
}
go back serve as (a,b) {
var consequence = (a[property] b[property]) ? 1 : 0;
go back consequence * sortOrder;
}
}

serve as lee_getPackageSettings(sPackage){
transfer(sPackage.toLowerCase()){
case ‘dob’:
go back {identify: ‘Virtual Elementary’, type: 0};
wreck;
case ‘dop’:
go back {identify: ‘Virtual Plus’, type: 1};
wreck;
case ‘dopl’:
go back {identify: ‘Virtual Platinum’, type: 2};
wreck;
case ‘silv’:
go back {identify: ‘Silver’, type: 3};
wreck;
case ‘gold’:
go back {identify: ‘Gold’, type: 4};
wreck;
case ‘plat’:
go back {identify: ‘Platinum’, type: 5};
wreck;
}
}

serve as lee_replacePackageTokens(sPackage, oService, sCol){
var hasPromotion = false;
$.each and every(oService, serve as(okay,v){
if( okay === ‘html’){
v = v.change(new RegExp(‘{{area}}’, ‘gi’), ‘scnow.com’)
.change(new RegExp(‘{{site_name}}’, ‘gi’), ‘SCNow’)
.change(new RegExp(‘{{business_name}}’, ‘gi’), ‘SCNOW’)
.change(new RegExp(‘{{site_phone}}’, ‘gi’), ‘843-317-NEWS’);
}
sPackage = sPackage.change(new RegExp(‘{{‘+okay+’}}’, ‘gi’), v);
});
if(sCol) sPackage = sPackage.change(‘{{col}}’, sCol);
go back sPackage;
}
if(window.lee_services_active && window.lee_services_active != ‘offline’){
check out {
var oPackages = [],
oFeatured = false,
sHtml = ”,
sTemplate = $(‘#lee-service-template’).html();

$.each and every(window.leeMembershipPackages, serve as(i, oService){
var oService = lee_formatPackage(oService);
if(oService){
oPackages.push(oService);
if(oService.featured === ‘true’) oFeatured = oService;
}
});

if(oPackages.period === 0){ throw ‘No applications outlined’; }

oPackages.type(lee_sortPackages(‘type’));

if(!oFeatured) oFeatured = oPackages[0];
if(oPackages.period === 1){
window.lee_modal_service = oPackages[0];
sTemplate = $(‘#lee-service-template-single’).html();
$(‘#lee-services-list’).addClass(‘unmarried’);
} else {
$(‘#lee-services-list’).addClass(‘more than one’);
}

transfer(oPackages.period){
case 6: var sCol = ‘2’; wreck;
case 5: var sCol = ‘5ths’; wreck;
case 4: var sCol = ‘3’; wreck;
case 3: var sCol = ‘4’; wreck;
case 2: var sCol = ‘6’; wreck;
default: var sCol = ’12’; wreck;
}

$(‘#lee-services-modal’).addClass(‘packages_’+oPackages.period);

$.each and every(oPackages, serve as(i, oService){
sHtml += lee_replacePackageTokens(sTemplate, oService, sCol);
});

$(‘#lee-services-list .applications’).html(sHtml).promise().then(serve as(){
$(‘#lee-services-list .loading’).cover();
$(‘#lee-services-list .applications’).css(‘opacity’, 1);
});

if(!__tnt.consumer.amenities){
if( $(‘.lee-featured-subscription’).period > 0 && oFeatured ){
$(‘.lee-featured-subscription’).each and every(serve as(){
var html = $(this).html();
if( !oFeatured.featured_button_text ){
if(oFeatured.promotional_price){
oFeatured.featured_button_text = oFeatured.promotional_format_dollars+oFeatured.promotional_price+oFeatured.promotional_format_cents+’ ‘+oFeatured.time period;
} else {
oFeatured.featured_button_text = ‘Sign up for for ‘+oFeatured.format_dollars+oFeatured.start_price+oFeatured.format_cents+’ ‘+oFeatured.time period;
}
}
html = lee_replacePackageTokens(html, oFeatured);
$(this).html(html);
if(oFeatured.promotional_price) $(this).addClass(‘has-promotiom’);
if( $(this).hasClass(‘show-after-loaded’) ) $(this).exhibit();
});
}
}

} catch (e) {
if(window.console) console.warn(e);
lee_serviceError();
}

window.lee_fetched_services = true;
} else {
lee_serviceError(‘offline’);
}
});

Browsing Los Angeles