$(document).ready(function() {
	if($.browser.msie && $.browser.version < '7') {
		 document.styleSheets[0].addRule('.transparent', 'behavior: url(/scripts/iepngfix.htc)');
	}
	$('#navUl > li').bind('mouseover', function(e) {
		$(this).addClass('over');
	});
	$('#navUl > li').bind('mouseout', function(e) {
		$(this).removeClass('over');
	});

	if(jQuery.browser.msie && jQuery.browser.version < '9') {
		$('#photosContainer img').each(function(i) {
			var cSrc = $(this).attr('src');
			var cWidth = $(this).attr('width');
			var cHeight = $(this).attr('height');
			$(this).parent().append('<div id="photo_C'+i+'"></div>');
			$('#photo_C'+i).css({ 'margin' : '12px 0px 0px 15px' })
			$('#photo_C'+i).append('<div id="photo_'+i+'"></div>');
			$(this).remove();
			$('#photo_'+i).css({
				'clip' : 'rect(0px '+cWidth+'px '+cHeight+'px 0px)',
				'display' : 'block',
				'filter' : 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+cSrc+'",sizingMethod="crop")',
				'height' : cHeight+'px',
				'width' : cWidth+'px'
			});
		});
	}
	$('#photosContainer').cycle({ fx: 'fade', cleartype: true, cleartypeNoBg: true });
	$(".external").click(function (e) {
		e.preventDefault();
		window.open(this.href);
		return false;
	});
});
