init.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. $(document).ready(function() {
  2. $("h1.josefin a").mouseover(function(){$(this).stop().animate({color: "#ccc"},{queue:false, duration:300}) });
  3. $("h1.josefin a").mouseout(function(){$(this).stop().animate({color: "#fff"},{queue:false, duration:300}) });
  4. $("h2.josefin a").mouseover(function(){$(this).stop().animate({color: "#ccc"},{queue:false, duration:300}) });
  5. $("h2.josefin a").mouseout(function(){$(this).stop().animate({color: "#fff"},{queue:false, duration:300}) });
  6. $('.films').sorted();
  7. $('.tabs').show(); //FOUC
  8. $('.slided').show(); //FOUC
  9. $('.slided').film({
  10. slider: '.slider',
  11. slide: '.slide',
  12. addNav: true,
  13. addPagination: true,
  14. speed: 300 // ms.
  15. });
  16. //jQuery('.film-link').live('click', function(e){
  17. ///e.preventDefault();
  18. //var link = jQuery(this).attr('href');
  19. ///jQuery('.film-media').html('<div class="media-loading"><p>Loading...</p></div>');
  20. //jQuery('.film-media').load(link+'.attachment');
  21. //});
  22. $('.video').magnificPopup({
  23. disableOn: 700,
  24. type: 'iframe',
  25. mainClass: 'mfp-fade',
  26. removalDelay: 160,
  27. preloader: false,
  28. fixedContentPos: false
  29. });
  30. });
  31. /*** Skeleton V1.1 copyright 2011, Dave Gamache www.getskeleton.com http://www.opensource.org/licenses/mit-license.php */
  32. (function ($) {
  33. function hashchange () {
  34. var hash = window.location.hash
  35. , el = $('ul.tabs [href*="' + hash + '"]')
  36. , content = $(hash)
  37. if (el.length && !el.hasClass('active') && content.length) {
  38. el.closest('.tabs').find('.active').removeClass('active');
  39. el.addClass('active');
  40. content.show().addClass('active').siblings().hide().removeClass('active');
  41. }
  42. }
  43. $(window).on('hashchange', hashchange);
  44. hashchange();
  45. $(hashchange);
  46. })(jQuery);