ставь тему ips focus.
либо ковыряйся в этом скрипте, чтобы настроить под себя, но там придется и стили импортировать и еще кучу всего сделать, не думаю, что осилишь
$("html").addClass('ipsfocus_bg1');
$(document).ready(function(){
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};
// Firefox calculates width differently due to scrollbar on Windows
if( navigator.userAgent.toLowerCase().indexOf('firefox') > -1 ){
var browserResponsiveWidth = 963;
}else{
var browserResponsiveWidth = 980;
}
// Relocate search bar
var relocateSearch = function(){
var currentBrowserWidth = $(window).width();
if(currentBrowserWidth > browserResponsiveWidth){
$("#elSearch").prependTo("#searchWrap");
} else {
$("#elSearch").prependTo("#respSearch");
}
}
relocateSearch();
var resizeWindow = function(){
var currentBrowserWidth = $(window).width();
if(currentBrowserWidth > browserResponsiveWidth){
// Desktops
$("#elSearch").prependTo("#searchWrap");
$("body").addClass("ipsfocus_desktop");
} else {
// Tablets and mobiles
$("#elSearch").prependTo("#respSearch");
$("body").removeClass("ipsfocus_desktop");
}
}
resizeWindow();
// Bug fix: The resize event is triggered when tablets and mobiles are scrolled, breaking the search bar in Android and Chrome
var cachedWidth = $(window).width();
// Run width functions after 100ms pause
$(window).resize(debounce(function(){
var newWidth = $(window).width();
if(newWidth !== cachedWidth){
resizeWindow();
relocateSearch();
cachedWidth = newWidth;
}
}, 100));
// Hide post controls as a guest to prevent empty bar
$(".cPost .ipsComment_controls li.ipsHide:only-child").parent().hide();
// Hide gallery descriptions if they don't exist
if ($('.galleryDescription .ipsType_richText').is(':empty')){
$(".galleryDescription").hide();
}
// Hide empty divs in ipsPageHeader to prevent unnecessary margins
$('.ipsPageHeader .ipsSpacer_top').each(function(){
if(!/[\S]/.test($(this).html())) {
$(this).hide();
}
});
/* Navigation */
function ipsfocusNavigation() {
var navwidth = 0;
var morewidth = $('.ipsNavBar_primary .focusNav_more').outerWidth(true);
$('.ipsNavBar_primary > ul > li:not(.focusNav_more)').each(function() {
navwidth += $(this).outerWidth( true );
});
var availablespace = $('.ipsNavBar_primary').outerWidth(true) - morewidth;
if (availablespace > 0 && navwidth > availablespace) {
var lastItem = $('.ipsNavBar_primary > ul > li:not(.focusNav_more)').last();
lastItem.attr('data-width', lastItem.outerWidth(true));
lastItem.prependTo($('.ipsNavBar_primary .focusNav_more > ul'));
ipsfocusNavigation();
} else {
var firstMoreElement = $('.ipsNavBar_primary li.focusNav_more li').first();
if (navwidth + firstMoreElement.data('width') < availablespace) {
firstMoreElement.insertBefore($('.ipsNavBar_primary .focusNav_more'));
}
}
if ($('.focusNav_more li').length > 0) {
$('.focusNav_more').css('display','inline-block');
} else {
$('.focusNav_more').css('display','none');
}
}
$(window).on('load',function(){
$(".navAlign").removeClass("hiddenLinks");
ipsfocusNavigation();
});
$(window).on('resize',function(){
ipsfocusNavigation();
});
// Make hover navigation work with touch devices
// http://osvaldas.info/drop-down-navigation-responsive-and-touch-friendly
;(function(e,t,n,r){e.fn.doubleTapToGo=function(r){if(!("ontouchstart"in t)&&!navigator.msMaxTouchPoints&&!navigator.userAgent.toLowerCase().match(/windows phone os 7/i))return false;this.each(function(){var t=false;e(this).on("click",function(n){var r=e(this);if(r[0]!=t[0]){n.preventDefault();t=r}});e(n).on("click touchstart MSPointerDown",function(n){var r=true,i=e(n.target).parents();for(var s=0;s<i.length;s++)if(i[s]==t[0])r=false;if(r)t=false})});return this}})(jQuery,window,document);
$('.ipsNavBar_primary > ul > li:has(ul)').doubleTapToGo();
var browserResponsiveWidth = 980;
var defaultBrowserWidth = $(window).width();
var headerHeight = $("#header").height();
var headerWrap = $(".headerWrap");
var headerBackgrounds = $(".headerBackgrounds");
var headerBlur = $(".headerBlur");
var blurEnd = 110;
var headerEffects = function(){
var amountScrolled = $(window).scrollTop();
// Make navigation fixed
if( amountScrolled >= headerHeight ){
headerWrap.addClass("fixedBlur");
} else {
headerWrap.removeClass("fixedBlur");
}
// Blur header
if( (amountScrolled <= blurEnd) ){
headerWrap.removeClass("blurred");
} else {
headerWrap.addClass("blurred");
}
// Parallax effect
var translateHeader = amountScrolled / 2;
if( amountScrolled <= headerHeight ){
headerBackgrounds.css( "margin-top", translateHeader + "px" );
} else {
headerBackgrounds.css( "margin-top", (headerHeight / 2) + "px" );
}
}
if( $('body').hasClass('ipsfocus_desktop') ){
$(window).scroll(function(){
headerEffects();
});
};
});