Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
jQuery(document).ready(function($) {
function imagewidgetCaptionLink(){
$('#page-business-home .widget_widget_sp_image').each(function(){
var thelink = $(this).children('.widget_sp_image-image-link').attr('href');
// console.log('yo '+thelink);
});
}
function leftNav(){
//console.log('leftNav()...');
$('.subpage-sidebar .widget_nav_menu:first-child .menu .sub-menu').attr('class', 'sub-menu nav nav-pills nav-stacked');
$('.subpage-sidebar .widget_nav_menu:first-child .menu').attr('class', 'nav nav-pills nav-stacked');
$('.subpage-sidebar .widget_nav_menu:first-child .menu-about-container').attr('id', 'nav-secondary');
$('.subpage-sidebar .widget_nav_menu:first-child .widget-head').hide();
$('.subpage-sidebar .widget_nav_menu:first-child').attr('class', '');
$('.subpage-sidebar .widget_nav_menu:first-child').show();
}
function cv(){
$('#page-user-profile .entry-content a').each(function(index, element){
var href = $(this).attr('href');
var pdf = href.indexOf('pdf');
var PDF = href.indexOf('PDF');
if (pdf > 0 || PDF > 0){
console.log("found it");
$(this).attr('class', 'btn btn-default').attr('style', 'float:right;').insertBefore('.entry-title').html('Download CV');
return false;
}
});
//attr('class', 'btn btn-success').attr('style', 'float:right;');
};
function stripCategories(){
$('.widget_categories option').each(function(index, element) {
var text = $(this).html();
if (text.substring(0,8)=='presstop'){
$(this).remove();
}
});
}
function positionNav(){
if($(window).width() > $('#mega-menu-primary').attr('data-breakpoint')){
if(!$('#navspan').hasClass('col-sm-12')) $('#navspan').css('top',($('#masthead').outerHeight(true)-$('#navspan').outerHeight())/2+'px');
$('#mega-menu-primary > li > .mega-sub-menu').each(function(i,e){
$(this).css('margin-top',($('#masthead').outerHeight(true)-$('#navspan').position().top+1)+'px');
});
}
//$('#navspan').css('top','0px');
}
$(document).ready(function(){
//megamenuAdjust();
leftNav();
cv();
stripCategories();
positionNav();
//imagewidgetCaptionLink();
});
$(window).resize(function() {
positionNav();
//megamenuAdjust();
//console.log('resize');
});
$( window ).load(function() {
var centerText = function(){
$('.text-overlay').each(function(){
$(this).find('.widget_sp_image-description').css('top',Math.floor(($(this).find('img').height()-$(this).find('.widget_sp_image-description').height())/2).toString()+'px');
});
}
centerText();
$(window).on('resize', function(){
centerText();
});
$('.text-overlay .widget_sp_image-description a').addClass('visible');
});
// Change mobile loading order of sidebar for regular pages
$('#page-page #page-business-main .col-sm-3.subpage-sidebar').addClass('col-sm-pull-9');
// Using in-page tabs as a secondary menu at the top of a page
$(".entry-content > .in-page-tabs").prependTo("#content");
$("#content .in-page-tabs .nav-tabs").wrap("<div class='container'></div>");
});