var $j=jQuery.noConflict();function fitAudio(){"use strict";$j("audio.blog_audio").mediaelementplayer({audioWidth:"100%"})}function initBlog(){"use strict";var i,r;$j(".blog_holder.masonry").length&&((i=$j(".blog_holder.masonry")).isotope({itemSelector:"article",resizable:!1,masonry:{columnWidth:".blog_holder_grid_sizer",gutter:".blog_holder_grid_gutter"}}),$j(".filter").on("click",function(){var o=$j(this).attr("data-filter");return i.isotope({filter:o}),!1}),i.hasClass("masonry_infinite_scroll")?i.infinitescroll({navSelector:".blog_infinite_scroll_button span",nextSelector:".blog_infinite_scroll_button span a",itemSelector:"article",loading:{finishedMsg:finished_text,msgText:loading_text}},function(o){i.append(o).isotope("appended",$j(o)),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.masonry").isotope("layout")},400)}):i.hasClass("masonry_load_more")&&(r=1,$j(".blog_load_more_button a").on("click",function(o){o.preventDefault();var t=$j(this).attr("href"),e=".blog_load_more_button a",l=$j(e).attr("href");$j.get(t+"",function(o){var t=$j(".masonry_load_more",o).wrapInner("").html();l=$j(e,o).attr("href"),i.append($j(t)).isotope("reloadItems").isotope({sortBy:"original-order"}),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.masonry").isotope("layout")},400),$j(".blog_load_more_button span").data("rel")>r?$j(".blog_load_more_button a").attr("href",l):$j(".blog_load_more_button").remove()}),r++})),$j(".blog_holder.masonry, .blog_load_more_button_holder").animate({opacity:"1"},400,function(){$j(".blog_holder.masonry").isotope("layout")}))}function initBlogMasonryGallery(){"use strict";var i,r;resizeBlogMasonryGallery($j(".blog_holder_grid_sizer").width()),$j(".blog_holder.blog_masonry_gallery").length&&($j(".blog_holder.blog_masonry_gallery").each(function(){var o=$j(this);o.waitForImages(function(){o.animate({opacity:1}),o.isotope({itemSelector:"article",masonry:{columnWidth:".blog_holder_grid_sizer"}})})}),(i=$j(".blog_holder.blog_masonry_gallery")).hasClass("masonry_infinite_scroll")?i.infinitescroll({navSelector:".blog_infinite_scroll_button span",nextSelector:".blog_infinite_scroll_button span a",itemSelector:"article",loading:{finishedMsg:finished_text,msgText:loading_text}},function(o){i.isotope("appended",$j(o)),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.blog_masonry_gallery").isotope("layout")},400)}):i.hasClass("masonry_load_more")&&(r=1,$j(".blog_load_more_button a").on("click",function(o){o.preventDefault();var t=$j(this).attr("href"),e=".blog_load_more_button a",l=$j(e).attr("href");$j.get(t+"",function(o){var t=$j(".masonry_load_more",o).wrapInner("").html();l=$j(e,o).attr("href"),i.append($j(t)).isotope("reloadItems").isotope({sortBy:"original-order"}),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.blog_masonry_gallery").isotope("layout")},400),$j(".blog_load_more_button span").data("rel")>r?$j(".blog_load_more_button a").attr("href",l):$j(".blog_load_more_button").remove()}),r++})),$j(window).resize(function(){resizeBlogMasonryGallery($j(".blog_holder_grid_sizer").width()),$j(".blog_holder.blog_masonry_gallery").isotope("reloadItems")}))}function resizeBlogMasonryGallery(o){"use strict";var t=$j(".blog_holder.blog_masonry_gallery .rectangle_portrait"),e=$j(".blog_holder.blog_masonry_gallery .rectangle_landscape"),l=$j(".blog_holder.blog_masonry_gallery .square_big"),i=$j(".blog_holder.blog_masonry_gallery .square_small");t.css("height",2*o),e.css("height",o),l.css("height",2*o),l.width()<350&&l.css("height",l.width()),i.css("height",o)}function initBlogMasonryFullWidth(){"use strict";var i,r;$j(".masonry_full_width").length&&(i=$j(".masonry_full_width"),$j(".filter").on("click",function(){var o=$j(this).attr("data-filter");return i.isotope({filter:o}),!1}),i.hasClass("masonry_infinite_scroll")?i.infinitescroll({navSelector:".blog_infinite_scroll_button span",nextSelector:".blog_infinite_scroll_button span a",itemSelector:"article",loading:{finishedMsg:finished_text,msgText:loading_text}},function(o){i.isotope("appended",$j(o)),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.masonry_full_width").isotope("layout")},400)}):i.hasClass("masonry_load_more")&&(r=1,$j(".blog_load_more_button a").on("click",function(o){o.preventDefault();var t=$j(this).attr("href"),e=".blog_load_more_button a",l=$j(e).attr("href");$j.get(t+"",function(o){var t=$j(".masonry_load_more",o).wrapInner("").html();l=$j(e,o).attr("href"),i.append($j(t)).isotope("reloadItems").isotope({sortBy:"original-order"}),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.masonry_full_width").isotope("layout")},400),$j(".blog_load_more_button span").data("rel")>r?$j(".blog_load_more_button a").attr("href",l):$j(".blog_load_more_button").remove()}),r++})),i.isotope({itemSelector:"article",resizable:!1,masonry:{columnWidth:".blog_holder_grid_sizer",gutter:".blog_holder_grid_gutter"}}),$j(".masonry_full_width, .blog_load_more_button_holder").animate({opacity:"1"},400,function(){$j(".blog_holder.masonry_full_width").isotope("layout")}))}$j(document).ready(function(){"use strict";fitAudio()}),$j(window).on("load",function(){"use strict";initBlog(),initBlogMasonryFullWidth(),initBlogMasonryGallery()}),$j(window).resize(function(){fitAudio(),initBlog(),initBlogMasonryFullWidth(),initBlogMasonryGallery()})