function itemLoadCallbackFunction(carousel, state)
{
	Cufon.refresh();
};


jQuery(document).ready(function($){

$('.swapImage').click(function() {
	var newImg = $(this).attr("imgLarge");
	$("#large").attr("src", newImg);
});						
						 
$("#categoryPicker ul li img").effect("scale", { percent: 95, direction: 'both' }, 1);
$("#categoryPicker ul li").css("opacity", "0.5");
						   
$(".catGirl span.detail").css("display", "none");
	
$("#carouselGirls img").bind("load", function () { 
	$(this).fadeIn(5000, ''); 
});						   

$("ul.demomain").ytplaylist({playerHeight: 398, playerWidth: 531, addThumbs:true, autoPlay: false, holderId: 'ytvideo2', showRelated: false});

/* NOT USING THIS ANYMORE??
jQuery('#slideshow').after('<ul id="nav">').cycle({ 
    fx:     'fade', 
    speed:  'fast', 
    timeout: 0, 
    pager:  '#nav', 
     
    // callback fn that creates a thumbnail to use as pager anchor 
    pagerAnchorBuilder: function(idx, slide) { 
        return '<li><a href="#"><img src="' + slide.src + '" width="100"  /></a></li>'; 
    } 
});
*/									

$('#mycarousel').jcarousel({
	wrap: 'circular',
	itemFirstInCallback: itemLoadCallbackFunction
});


if(!jQuery.browser.msie){
	

orginalSizeHeight = $("#categoryPicker ul li.skinny img").height();
orginalSizeWidth= $("#categoryPicker ul li.skinny img").width();

$("#categoryPicker ul li.skinny").hover(function(){
		  
	$(this).find("img").animate({
		width: $(this).find("img").width()*1.1,
		height: $(this).find("img").height()*1.1
  	}, 100 , function() {
    // Animation complete.
  });
	
	
	$(this).animate({
		opacity: 1
	  }, 100, function() {
    // Animation complete.
  });

	
},function(){
	
	$(this).find("img").animate({
		width: (orginalSizeWidth/100)*95,
		height: (orginalSizeHeight/100)*95
	 }, 100 , function() {
    // Animation complete.
  });

	
	$(this).animate({
		opacity: 0.5
	 }, 100 , function() {
    // Animation complete.
  });
});
	

orginalAsianSizeHeight = $("#categoryPicker ul li.asian img").height();
orginalAsianSizeWidth= $("#categoryPicker ul li.asian img").width();

$("#categoryPicker ul li.asian").hover(function(){
		  
	$(this).find("img").animate({
		width: $(this).find("img").width()*1.1,
		height: $(this).find("img").height()*1.1
  	}, 150 , function() {
    // Animation complete.
  });
	
	
	$(this).animate({
		opacity: 1
	  }, 100, function() {
    // Animation complete.
  });

	
},function(){
	
	$(this).find("img").animate({
		width: orginalAsianSizeWidth,
		height: orginalAsianSizeHeight
	 }, 150 , function() {
    // Animation complete.
  });

	
	$(this).animate({
		opacity: 0.5
	 }, 100 , function() {
    // Animation complete.
  });
});

orginalMatureSizeHeight = $("#categoryPicker ul li.mature img").height();
orginalMatureSizeWidth= $("#categoryPicker ul li.mature img").width();

$("#categoryPicker ul li.mature").hover(function(){
		  
	$(this).find("img").animate({
		width: $(this).find("img").width()*1.1,
		height: $(this).find("img").height()*1.1
  	}, 150 , function() {
    // Animation complete.
  });
	
	
	$(this).animate({
		opacity: 1
	  }, 100, function() {
    // Animation complete.
  });

	
},function(){
	
	$(this).find("img").animate({
		width: orginalMatureSizeWidth,
		height: orginalMatureSizeHeight
	 }, 150 , function() {
    // Animation complete.
  });

	
	$(this).animate({
		opacity: 0.5
	 }, 100 , function() {
    // Animation complete.
  });
});
	
}
	
	
$('.catGirl a.linkWrap').find('background-color','transparent');

//$('#filterHeader').quicksand( $('#filterResults .catGirl') );

$(".catGirl a.linkWrap").mouseenter(function(){
 //     $(this).find("span.detail").slideDown("slow");
    }).mouseleave(function(){
//      $(this).find("span.detail").fadeOut("slow");
    });

//$(".catGirl a.linkWrap").hover(function(){
//	$(this).find("span.detail").fadeIn("slow");
//      },function(){
//	$(this).find("span.detail").fadeOut("slow");
//		  });

$("ul.demo1").ytplaylist({addThumbs:true, playerWidth: '403px', playerHeight: '350px', autoPlay: false, holderId: 'ytvideo2', showRelated: false});


$(".videoClip").click(function() {
	  $('#ytvideo2').show();
	  $("#large").hide();
});

$(".swapImage").click(function() {
	  $('#ytvideo2').hide();
	  $("#large").show();
});


/*$("ul.demo1").ytplaylist({
				addThumbs:true, 
				autoPlay: false, 
				playerWidth: '434px',
				playerHeight: '121px',
				thumbSize: 'large',
				showInline: true
				});*/



/*$('.tabLinks li a').click(function() {
	
	 panel= $(this).attr("href");


	$(".tabPanelInner").hide();
	$(panel).show();
	return false;
});*/

});
