
jQuery(document).ready(function() {
	
		$("div.circle").mouseover(function(){
      $(this).addClass("circle_over");
      $('#tab_circle_0').fadeOut(100);
      $('#tab_'+$(this).attr('id')).fadeIn(100);
    }).mouseout(function(){
      $(this).removeClass("circle_over");
      $('#tab_'+$(this).attr('id')).fadeOut(100);
    });
    
    $("div.left-column, div.partners-container, div.header, div.c_overlay, div.c_overlay_2").mouseover(function(){
      $('#tab_circle_0').fadeIn(100);
    });

		$(".single-work-container .right .thumb a").hover(function(){
     	$(this).parent().children('span').css('display', 'block');
     	$(this).css('filter', 'alpha(opacity=53)');
     	$(this).css('-moz-opacity', '0.53');
     	$(this).css('opacity', '0.53');
    }, function() {
    	$(this).parent().children('span').css('display', 'none');
    		$(this).css('filter', 'alpha(opacity=100)');
     	$(this).css('-moz-opacity', '1');
     	$(this).css('opacity', '1');
    });
    
    $(".jCarouselLite ul li a, .jCarouselLite_noscroll ul li a").hover(function(){
     	$(this).parent().next('a.play_b').css('display', 'block');
     	$(this).css('filter', 'alpha(opacity=80)');
     	$(this).css('-moz-opacity', '0.80');
     	$(this).css('opacity', '0.80');
    }, function() {
    	$(this).parent().next('a.play_b').css('display', 'none');
    		$(this).css('filter', 'alpha(opacity=100)');
     	$(this).css('-moz-opacity', '1');
     	$(this).css('opacity', '1');
    });
    
    $("a.play_b").hover(function(){
     	$(this).css('display', 'block');
     	$(this).prev().children('a.link_project').css('filter', 'alpha(opacity=80)');
     	$(this).prev().children('a.link_project').css('-moz-opacity', '0.80');
     	$(this).prev().children('a.link_project').css('opacity', '0.80');
    }, function() {
    	$(this).css('display', 'none');
    		$(this).prev().children('a.link_project').css('filter', 'alpha(opacity=100)');
     	$(this).prev().children('a.link_project').css('-moz-opacity', '1');
     	$(this).prev().children('a.link_project').css('opacity', '1');
    });
    
    
    
    $(".single-work-container .right .thumb span").hover(function(){
     	$(this).css('display', 'block');
     	$(this).parent().children('a').css('filter', 'alpha(opacity=53)');
     	$(this).parent().children('a').css('-moz-opacity', '0.53');
     	$(this).parent().children('a').css('opacity', '0.53');
    }, function() {
    	$(this).css('display', 'block');
    		$(this).parent().children('a').css('filter', 'alpha(opacity=53)');
     	$(this).parent().children('a').css('-moz-opacity', '0.53');
     	$(this).parent().children('a').css('opacity', '0.53');
    });

});	


	function swap_mov(src, width, height, ext) {
		
		if (ext=='jpg' || ext=='jpeg' || ext=='gif' || ext=='png' || ext=='tiff') {
			var mov = '<img src="'+src+'" alt="" />';
		} else {
		var mov = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+width+'" height="'+height+'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">'+
						    '<param name="SRC" value="'+src+'" />'+
						    '<param name="AUTOPLAY" value="true" />'+
						    '<param name="controller" value="true" />'+
						    '<param name="mode" value="transparent" />'+
						    '<param name="allowScriptAccess" value="always" />'+
						    '<embed src="'+src+'" allowScriptAccess="always"  width="'+width+'" height="'+height+'" type="video/quicktime" autoplay="true" controller="true" target="myself" pluginspage="http://www.apple.com/quicktime/download/" />'+
						  '</object>';

		}
		$('#work-container').html(mov);
		
	}
	
	function clickButton(e, buttonid) { 
		var bt = document.getElementById(buttonid); 
		if (typeof bt == 'object') { 
			if(navigator.appName.indexOf("Netscape")>(-1)) { 
				if (e.keyCode == 13) { 
					bt.click(); return false; 
				} 
			} 
			if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)) { 
				if (event.keyCode == 13) { 
					bt.click(); return false; 
				} 
			} 
		} 
	}

	
	
