jQuery(function($){
	$(window).load(function() {

			/*main function*/
			function wpexPortfolioIsotope() {
				var $container = $('.portfolio-isotope');
				$container.isotope({
					itemSelector: '.portfolio-entry'
				});
			} wpexPortfolioIsotope();
			
			/*resize*/
			var isIE8 = $.browser.msie && +$.browser.version === 8;
			if (!isIE8) {
				$(window).resize(function () {
					wpexPortfolioIsotope();
				});
			}
			
			/* Orientation change */
			if (window.addEventListener) {
				window.addEventListener("orientationchange", function() {
					wpexPortfolioIsotope();
				});
			}
		
	});
});