jQuery.noConflict();

jQuery(document).ready(function(){
								
	jQuery(".news_post").hoverIntent( makeTall, makeShort );
	function makeTall(){  
	thisHeight = jQuery(this).children(".news_thumb").children("img").attr("height")+10;
	jQuery(this).children(".news_thumb").animate({"height":thisHeight},400);
	}
	function makeShort(){ 
	jQuery(this).children(".news_thumb").animate({"height":0},400);
	}
	
	/*jQuery("div.news_post").click(function(){
    window.location = jQuery(this).attr("url");
    return false;
	});*/
								
		jQuery('span.view-large').hide();
	myOp = 1;
	
	jQuery('.backtotop').click(function(){ 
		jQuery('html, body').animate({scrollTop:0}, 'slow'); return false; 
	});
		
		// Grid jQuery plugin: http://desandro.com/resources/jquery-masonry/
		
		jQuery('#sort').masonry({ 
			columnWidth: 300,
			animate: true,
			itemSelector: '.box'
			//easing: 'linear'
		}, 
		function() { jQuery(this).css({
			margin: '10px'
			});
		});
		
		// MouseOver Events
		
		jQuery('.box').hoverIntent(function(){
			jQuery('img', this).fadeTo("fast", 0.1).addClass('box-hover');
			jQuery('span.view-large', this).fadeTo("fast", 1)},
			function(){
			jQuery('img', this).fadeTo("fast", myOp).removeClass('box-hover');
			jQuery('span.view-large', this).fadeTo("fast", 0)
		});
		
		jQuery('.big-box').hoverIntent(function(){
			jQuery('img', this).fadeTo("fast", 0.1).addClass('box-hover');
			jQuery('span.view-large', this).fadeTo("fast", 1)},
			function(){
			jQuery('img', this).fadeTo("fast", myOp).removeClass('box-hover');
			jQuery('span.view-large', this).fadeTo("fast", 0)
		});
		
		jQuery('#clients-link').click(function(){
			jQuery("#client-list").fadeToggle("fast","linear");
		});
		
		// Colorbox
		//jQuery("a[rel='gallery']").colorbox();
		
	});

