/* <![CDATA[ */
jQuery(document).ready(function() {		
	jQuery("a[class^='fancybox']").fancybox({
		'overlayOpacity'	:	0.7,
		'overlayColor'		:	'#000000',
		'zoomSpeedIn'		:	500,
		'zoomSpeedOut'		:	500
	});
	/* jQuery("a[title],img[title]").tipTip(); */

	/* jQuery("a[title],img[title]").tipTip(); */

	var $portfolioItem = jQuery('.showcaseCtn .post');
	$portfolioItem.find('.showcase-image').css('background-color','#000');
	jQuery('.zoom-icon').css({'opacity':'0','visibility':'visible'});
	jQuery('.cat-title').css({'opacity':'0','visibility':'visible'});
	jQuery('.portfolio-title').css({'opacity':'0','visibility':'visible'});
	
	$portfolioItem.hover(function(){
		jQuery(this).find('img.portfolio').stop(true, true).animate({opacity: 0.3},500);
		jQuery(this).find('.zoom-icon').stop(true, true).animate({opacity: 1, left: 200},400);
		jQuery(this).find('.cat-title').css({opacity:0}).stop(true, true).animate({opacity: 1, bottom: 60},400);
		jQuery(this).find('.portfolio-title').css({opacity:0}).stop(true, true).animate({opacity: 1, top: 50},400);
	}, function(){
		jQuery(this).find('.portfolio-title').stop(true, true).animate({opacity: 0, top: 0},400);
		jQuery(this).find('.cat-title').stop(true, true).animate({opacity: 0, bottom: 0},400);
		jQuery(this).find('.zoom-icon').stop(true, true).animate({opacity: 0, left: 100},400);
		jQuery(this).find('img.portfolio').stop(true, true).animate({opacity: 1},500);
	});
	
	
	jQuery( ".accordion" ).accordion({
			autoHeight: false,
			navigation: true,
			collapsible: true,
			active: false
		});
	jQuery('.featured').cycle({
			timeout: 6000,
			fx: 'fade',
			pager: '#nav',
			slideExpr: 'div.slide'
			});
	 $('.sliderContainer').cycle({
        fx:      'fade',
        timeout:  6000,
        sync: 1,
        });
     jQuery('.postslider').cycle({
			timeout: 6000,
			fx: 'fade',
			pager: '#nav',
			slideExpr: 'div.slideshow a'
			});
    Cufon.replace('h2, h3, h4',{
						  hover: true 
		});
	jQuery("ul.sub-menu").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)  
  
    jQuery("ul.menu li span").click(function() { //When trigger is clicked...  
  
        //Following events are applied to the subnav itself (moving subnav up and down)  
        $(this).parent().find("ul.sub-menu").slideDown('fast').show(); //Drop down the subnav on click  
  
        $(this).parent().hover(function() {  
        }, function(){  
            $(this).parent().find("ul.sub-menu").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
        });  
  
        //Following events are applied to the trigger (Hover events for the trigger)  
        }).hover(function() {  
            $(this).addClass("subhover"); //On hover over, add class "subhover"  
        }, function(){  //On Hover Out  
            $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
    });  
	
});
/* ]]> */
