/*
* This file contains calls to various javascript files
*
* Editing this file might lead to some broken theme features.
*
*/
/* Add a custom back to top button */
jQuery(document).ready(function() {
var offset = 220;
var duration = 500;
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);
} else {
jQuery('.back-to-top').fadeOut(duration);
}
});
jQuery('.back-to-top').click(function(event) {
event.preventDefault();
jQuery('html, body').animate({scrollTop: 0}, duration);
return false;
});
jQuery('#main-slider').flexslider( {
animation: "slide",
prevText: "",
nextText: "",
start: function(slider) {
slider.removeClass('loading');
}
});
});
/* Bootstrap styling */
jQuery( document ).ready( function( $ ) {
$( 'input.search-field' ).addClass( 'form-control' );
// here for each comment reply link of wordpress
$( '.comment-reply-link' ).addClass( 'btn btn-primary' );
// here for the submit button of the comment reply form
$( '#commentsubmit' ).addClass( 'btn btn-primary' );
// The WordPress Default Widgets
// Now we'll add some classes for the wordpress default widgets - let's go
// the search widget
$( 'input.search-field' ).addClass( 'form-control' );
$( 'input.search-submit' ).addClass( 'btn btn-default' );
$( '.widget_rss ul' ).addClass( 'media-list' );
$( '.widget_recent_comments ul#recentcomments' ).css( 'list-style', 'none').css( 'padding-left', '0' );
$( 'table#wp-calendar' ).addClass( 'table table-striped');
$(document.body).show();
} );