// JavaScript Document

//-------------------------------------------------------- 

 $(function(){
	$('a.iframe').fancybox({
		'overlayColor': '#000'	,
		'showCloseButton': true,
		'width': 850,
		'height': 478,
		'swf': {
			'skin': 'video/SkinOverAll.swf'
		}
	 });
  });
 
 
//-------------------------------------------------------- 


function popup(mylink, windowname, properties){
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string') href=mylink;
  else
  href=mylink.href;
  window.open( href, windowname, properties );
  return false;
}


//-------------------------------------------------------- 


function writeText(el,txt){
  document.getElementById(el).innerHTML = txt;
 }


//BREADCUMBS-------------------------------------------------------- 

 function breadcrumbs(){
  sURL = new String;
  bits = new Object;
  var x = 0;
  var stop = 0;
  var output = "<a href=\"/\">Home</a>  >  ";
  sURL = location.href;
  sURL = sURL.slice(8,sURL.length);
  chunkStart = sURL.indexOf("/");
  sURL = sURL.slice(chunkStart+1,sURL.length)
  while(!stop){
    chunkStart = sURL.indexOf("/");
    if (chunkStart != -1){
      bits[x] = sURL.slice(0,chunkStart)
      sURL = sURL.slice(chunkStart+1,sURL.length);
    }else{
      stop = 1;
    }
    x++;
  }
  for(var i in bits){
    output += "<a href=\"";
    for(y=1;y<x-i;y++){
      output += "../";
    }
    output += bits[i] + "/\">" + bits[i] + "</a>  >  ";
  }
  document.write(output + document.title);
}


// JQUERY __________________________________________________________	

jQuery(document).ready(function() {
								
// REVIEWS HIDE/SHOW __________________________________________________________	
	
	  $('.fullReview').hide();
	  var isActive = 0;

	  $('.reviews li a:not(.noExpand)').click(function(){
			
		var ids = $(this).attr('href');
		
		if(isActive){
		//$('.reviews li span').removeClass('mute');
		//$('.fullReview:visible').slideUp(600, function(){
  //			  $(ids).slideDown(300);
  //			 });
		  $('.fullReview:visible').hide();
		  $(ids).slideDown(300);
		};
  
		 $(ids).slideDown(300);
		//$(this).siblings('span').addClass('mute');
		  isActive = 1;
		  return false;							   
	  });	
	
	
// JQUERY ___________________________________________________

});
