
var $j = jQuery.noConflict();

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



var op1 = $j('.wpsc_select_variation:eq(0) option').size();

if (op1 == 2){
$j('.wpsc_select_variation:eq(0)').val($j(".wpsc_select_variation:eq(0) option:eq(1)").val());
}



$j('.wpsc_buy_button').click(function() {

var values = $j('.wpsc_select_variation:eq(0)').val();
var values2 = $j('.wpsc_select_variation:eq(1)').val();

if (values == 0 || values2 == 0 ){
alert('Please Select a Color/Size');
return false;
}

else {

}

});


  $j('.offerSlideShow').cycle({
		fx: 'fade',
		timeout:  7000	});
	
	$j('#imageSlideshowHolder').cycle({
		fx: 'scrollLeft',
		timeout:  5000  // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	
	

$j('div.bottompart_left:last').removeClass('bottompart_left').addClass('bottompart_right');



 $j(".imgswap").hover(
          function(){this.src = this.src.replace("_off","_on");},
          function(){this.src = this.src.replace("_on","_off");
     });
     
     $j(".bulletswap").hover(
          function(){this.src = this.src.replace("_off","_on");},
          function(){this.src = this.src.replace("_on","_off");
     });



$j("a.fancybox").fancybox({

			'titleShow' : false,
			'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
			'autoScale'			: true


});
		
		
		$j(".singlefancyproduct").click(function(){
		
		$j("a.fancybox:first").trigger('click');
		return false;
		
		});
			

$j("#homevideo").fancybox({
			'width' : 645,
			'height': 400,
			'titleShow' : false,
				'autoScale'			: false,
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
			
			

$j(".biofancy").fancybox({
			'width' : 800,
			'height': 550,
			'titleShow' : false,
				'autoScale'			: false,
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
			

$j(".iconfancy").fancybox({
			'width' : 800,
			'height': 550,
			'titleShow' : false,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
	


$j('.expand_btn a').click(function() {



var target = $j(this).attr("id");

var target2 = 'poste' + target;


	$j('#' + target2 + ' .postpic').fadeOut();
	
	// $j('#thisrowpicid').fadeOut();
	
	$j('#' + target2 + ' .post-excerpt').hide();
	$j('#' + target2 + ' .expand_btn').hide();
	$j('#' + target2 + ' .full-footer').show();
	
	
	$j('#' + target2 + ' .post-full').fadeIn();
	
	$j('#' + target2 + ' .meta').animate({
	    marginLeft: 32
	    }, 700);
	$j('#' + target2 + ' .metacomments').show();
	
	$j('#' + target2 + ' .post-top-title').animate({
	    width: 590
	    }, 700, function(){
	    
	    
	    $j('#' + target2 + ' .post-pic-large').animate(
	    {
	    height:321}, 1000
	    
	    
	    );
	    
	    
	    });
	    return false;
    
});

$j('.header_topcontener').click(function() {


var target = $j(this).attr("id");

var target2 = 'post' + target;


 $j('#' + target2 + ' .post-pic-large').animate(
	    {
	    height:0}, 400
	    
	    
	    );



$j('#' + target2 + ' .post-full').hide();


$j('#' + target2 + ' .post-top-title').animate({
    width: 285
    }, 300)
    
    $j('#' + target2 + ' .meta').animate({
	    marginLeft: 333
	    }, 300);
    
    $j('#' + target2 + ' .expand_btn').show();
$j('#' + target2 + ' .full-footer').hide();
    
    $j('#' + target2 + ' .post-excerpt').fadeIn();

    $j('#' + target2 + ' .postpic').fadeIn();
    
    return false;

});






       });
	
	
	$j(function(){

    var config = {    
         sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
         interval: 200,  // number = milliseconds for onMouseOver polling interval    
         over: doOpen,   // function = onMouseOver callback (REQUIRED)    
         timeout: 200,   // number = milliseconds delay before onMouseOut    
         out: doClose    // function = onMouseOut callback (REQUIRED)    
    };
    
    function doOpen() {
        $j(this).addClass("hover");
        $j('ul:first',this).css('visibility', 'visible');
    }
 
    function doClose() {
        $j(this).removeClass("hover");
        $j('ul:first',this).css('visibility', 'hidden');
    }

    $j("ul.dropdown li").hoverIntent(config);
    
    $j("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");

});	


