jQuery.noConflict();

(function($) { 
	$(function() {
		
		// Webkit fix --------
		(function(){
				// remove layerX and layerY
				var all = $.event.props,
						len = all.length,
						res = [];
				while (len--) {
					var el = all[len];
					if (el != 'layerX' && el != 'layerY') res.push(el);
				}
				$.event.props = res;
		}());
		// /Webkit fix --------

		$('.content_img').each( function(i, item)
		{
			var $item = $(this),
				pic_height,
				pic_width;
		
			var _img = $("<img />")
		    .attr("src", item.src+ "?" + new Date().getTime())
		    .load(function(e)
		    {
		    	console.log('asdasdasd');
		        pic_width = this.width;
		        pic_height = this.height;

		        $item.wrap('<div class="image-bg-wrapper" />');

				var $parent = $item.parent();
				$parent.append('<div class="shadow-left" />')
				$parent.append('<div class="shadow-right" />')
				$parent.css( { height: pic_height + 40, width: pic_width + 20 } );
		    });
		});

	});
})(jQuery);
