jQuery.noConflict();
var $j = jQuery;
 
$j(document).ready(function(){
    $j("#myController").jFlow({
        slides: "#slides",  // the div where all your sliding divs are nested in
        controller: ".jFlowControl", // must be class, use . sign
        slideWrapper : "#jFlowSlide", // must be id, use # sign
        selectedWrapper: "jFlowSelected",  // just pure text, no sign
        width: "492px",  // this is the width for the content-slider
        height: "340px",  // this is the height for the content-slider
        duration: 300,  // time in miliseconds to transition one slide
        prev: ".jFlowPrev", // must be class, use . sign
        next: ".jFlowNext" // must be class, use . sign
    });
    
    $j("a.jFlowControl").hover(
  		function () {
  	 	      
  	 	        $j(this).addClass('jFlowSelected2');
  	 	        
  	 	   		$j(".jFlowSelected2 img").animate({
				opacity: 1
  				}, 300, function() {
					// Animation complete.
  				});
				
 		},
		function () {
		
				
				if($j(this).hasClass("jFlowSelected") == false){
   		  	    	$j(".jFlowSelected2 img").animate({
					opacity: 0.2
  					}, 300, function() {
					// Animation complete.
  					});
  				}
  				$j(this).removeClass('jFlowSelected2');
		}
	);
	
	
	
	$j(".customerReviewsMiddle img").animate({
	opacity: 0.5
	}, 300, function() {
	// Animation complete.
	});
	
	
	$j(".customerReviewsMiddle img").hover(
  		function () {
  	 	      
  	 	        
  	 	   		$j(this).animate({
				opacity: 1
  				}, 300, function() {
					// Animation complete.
  				});
				
 		},
		function () {
		
				
   		  	    	$j(this).animate({
					opacity: 0.5
  					}, 300, function() {
					// Animation complete.
  					});
  			
		}
	);
	
	
	
	
	
	$j("a.jFlowControl").click(function(){
		
		scrollWin();
		
	});
	
	function scrollWin(){
		
		if($j.browser.opera){$j('html').animate({scrollTop: $j('#servicesSlideContent').offset().top}, 1000);} 
		else $j('html,body').animate({scrollTop: $j('#servicesSlideContent').offset().top}, 1000);
		
	}
	
	/*
	
	$j("a.facebookLink").hover(
  		function () {
  	 	      
  	 	        $j(this).addClass('facebookLink2');
  	 	        
  	 	   		$j(".facebookLink2 img").animate({
				opacity: 1
  				}, 300, function() {
					// Animation complete.
  				});
				
 		},
		function () {
		
				
				$j(".facebookLink2 img").animate({
				opacity: 0.5
  				}, 300, function() {
				// Animation complete.
  				});
  				$j(this).removeClass('facebookLink2');
		}
	);
	
	
	$j("a.facebookLink img").animate({
	opacity: 0.5
  	}, 300, function() {
	// Animation complete.
  	});

	*/
    
});

/*
* equal height sidebar and subpage
*/
   
function equalHeight(group) {

   var sidebarH = $j('#contentRight').height();
   var subpageContentH = $j('#contentLeft').height();
   
    
   tallest = 0;
   group.each(function() {
      thisHeight = $j(this).height();
      if(thisHeight > tallest) {
         tallest = thisHeight;
      }
   });
   group.height(tallest);
   
   var h = $j('.subpage').height() - 70;
   
   if(subpageContentH > sidebarH){
   $j('.facebookUpdates').height($j('.facebookUpdates').height()+(subpageContentH-sidebarH));
   }else	   
   $j('.subpage').height(h);
   
   
   
   
}
$j(document).ready(function() {
   equalHeight($j(".equalHeight"));
});

/***/

window.onload = function(){
	 
	 $j('a#btn'+SWFAddress.getValue()).trigger('click');
}