// JavaScript Document
 
$(function() { 


	
	var template_path = "http://recreatemedia.com/wp-content/themes/recreate";
	var pathname = window.location.href;
	

	$("#clientLink[title]").tooltip({ position: "bottom left", opacity: 0.6, offset:[-20, 10]})
	
	
	Shadowbox.init({player:"html"});
	/*Initial Load*/
	$('.threedlogo').flash({swf:template_path + "/resources/swf/3dvideo.swf",height:300,width:500}); 
	
	
	if(pathname == 'http://recreatemedia.com/home/' || pathname == 'http://recreatemedia.com/'){
	$('.leftflash').flash({swf:template_path + "/resources/swf/home.swf",height:575,width:450,params:{wmode:'opaque'}});
	}else if(pathname == 'http://recreatemedia.com/portfolio/'){
		$('.leftflash').flash({swf:template_path + "/resources/swf/portfolio.swf",height:575,width:450,params:{wmode:'opaque'}});
		$(".scrollable").scrollable({speed: 200, easing: 'linear', size: 3});
		$(".portfolio").tabs(".portfoliogenre", {tabs: 'h2', effect: 'slide', initialIndex: null});
		}else if(pathname == 'http://recreatemedia.com/services/'){
			$('.leftflash').flash({swf:template_path + "/resources/swf/services.swf",height:575,width:450,params:{wmode:'opaque'}});
			$(".services").tabs(".servicescontent", {tabs: 'h2', effect: 'slide', initialIndex: null});	
		}else if(pathname == 'http://recreatemedia.com/blog/'){
			$('.leftflash').flash({swf:template_path + "/resources/swf/home.swf",height:575,width:450,params:{wmode:'opaque'}});
		}else if(pathname == 'http://recreatemedia.com/contact/'){
			$('.leftflash').flash({swf:template_path + "/resources/swf/home.swf",height:575,width:450,params:{wmode:'opaque'}});	
		}
	
	
		
	/*Nav Hover*/
	$('.nav_a').mouseover(function() {
        		$(this).animate({ borderWidth: 10 }, 'fast');
	});
	
	$('.nav_a').mouseout(function() {
        		$(this).animate({ borderWidth: 0 }, 'fast');
	});
	
	
	
	
	/*Homepage BG Color Animatio*/
	$('.hometext div').live('mouseover',function() {
        		$(this).css({'background-color': '#eeeeee'}, 'fast');
	});
	
	$('.hometext div').live('mouseout',function() {
        		$(this).css({'background-color': '#ffffff'}, 'fast');
	});
	
	
	/*Portfolio page item rollover animation*/
	$('.portthumb.captionfull').live('mouseover',function(){
		$(".iteminfo", this).stop().animate({top:'-200px'},{queue:false,duration:200});
	});
    
    	$('.portthumb.captionfull').live('mouseout',function() {
		$(".iteminfo", this).stop().animate({top:'0px'},{queue:false,duration:200});
	});
	
	
	
	
});

