$(document).ready(function() {	
	if(!$.browser.msie) {
		$('#col1 div, div.works div').bind({
			mouseover: function() {
				$('#col1 div, div.works div').not(this).stop().fadeTo(300, 0.4);
			},
			mouseout: function() {
				$('#col1 div, div.works div').stop().fadeTo(300, 1);
			}
		});
	}
	
	$('#col4 ul a').bind({
		mouseover: function() {
			$(this).stop().animate({backgroundColor:'#4e5967', 'color':'#ddd'}, 300);
		},
		mouseout: function() {
			$(this).stop().animate({backgroundColor:'#d8d9da', 'color': '#7b7b7b'}, 300);
		}
	});
	
	var pages = ['grafike', 'aplikacione', 'marketing', 'rrjeta'];
	var adresa = String(document.location);
	var hash = adresa.substring(adresa.lastIndexOf('#') + 1);
	
	if ($.inArray(hash, pages) != -1) { 
		$('div.' + hash).animate({opacity:0.2}, 500).animate({opacity:1}, 500);
	}
	
	$('#col5 a').tipsy({
		fade: true
	});
	
	$('#text-slider').bxSlider({
		auto: true,
		pause: 6000
	});
});
