


	$(document).ready(function () {

	
	
	var blank = new Image();

	
	blank.src = '/Blackorange/assets/common/empty.gif';
	
	
	var veryBadBrowser = (/MSIE ((5\.5)|6|7|8)/.test(navigator.userAgent) && navigator.platform == "Win32");

	if (veryBadBrowser) {
	
		
	
		 // get all pngs on page
		 $('#portfolioItems img[src$=.png]').each(function() {
				

				
			fixPng(this);
			
			/*		   
		   if (!this.complete) {
			 this.onload = function() {  };
		   } else {
			 fixPng(this);
		   }
		   */
		   
		 });
	}


	function fixPng(png) {
		
		//alert(png.src);
		
		
		var src = png.src; // get src
		
		//if (!png.style.width) { png.style.width = 420/*$(png).width()*/; } // set width and height
		//if (!png.style.height) { png.style.height = 314/*$(png).height()*/; } // replace by blank image
		
		png.onload = function() { };
		png.src = blank.src;
		
		png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')"; // set filter (display original image)
	}

	
	
	$("a[rel^='prettyPhoto']").prettyPhoto( {theme: 'light_square' });
	
	$('#portfolioItems').cycle({
	   fx:     'blindY',
	   speed:   1000,
	   timeout: 4000,
	   cleartypeNoBg: true 
	});


});





	
function pageLoad(){
	
	
	
	$('.portfolioItemText').each(function(index) {
		$(this).css('display', 'block');
    	//alert(index + ': ' + $(this).text());
 	 });
	$('.portfolioItemImage').each(function(index) {
		$(this).css('display', 'block');
    	//alert(index + ': ' + $(this).text());
 	 });

	
	
}
		
		
