var $jQ = jQuery.noConflict();

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

	// Slider Homepage
	$jQ('#slide .placeholder').cycle({
		fx:'scrollRight',
		timeout:2000,
		speed:2500,
		cleartypeNoBg: true,
		startingSlide: 0, 
		prev:   '#prev', 
		next:   '#next'
	});
	
	$jQ('#prev, #next').css({opacity: 0.33}).hover(function() {
                            $jQ(this).stop().animate({
                                opacity: 0.8
                            }, 300);
                        }, function() {
                            $jQ(this).stop().animate({
                                opacity: 0.33
                            }, 300);
                        });

	// Blog Homepage
	$jQ('.homepostlist').jcarousel();
	
	$jQ('.homepostlist li:last').css('margin','0');
	
	// Twitter Slider
	$jQ('#twitter_update_list').cycle({
		fx:'cover',
		timeout:3000,
		cleartypeNoBg: true,
		slideExpr:'li'
	});
	
	//Over
	$jQ('.homepostlist li').mouseenter(function(){
        $jQ(this).addClass('over');
    }).mouseleave(function(){
        $jQ(this).removeClass('over');
    });

	$jQ('<div class="conttitcart"></div>').insertBefore('.checkout-cart-index .main');
		
	// Custom Menu
	$jQ(".category").click(function() {
		var open = this.getAttributeNode('lang').value;
		$jQ(".subcategory_" + open).slideToggle('medium');
	});	

	$jQ('.product-shop #productTagName').removeClass('required-entry');
	
	// FancyBox jQuery
	jQuery("a.group").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true }); 
	
	//$jQ('.catalog-category-view .category-image').insertBefore('.catalog-category-view .main-container.col1-layout');
	
	$jQ('.breadcrumbs-cart a#show').click(function(){
		$jQ('#mycart-block').fadeIn();
    });
	
	$jQ('#mycart-block a.off').click(function(){	
		$jQ('#mycart-block').fadeOut();
	});
	
	$jQ('#mycart-block').stickyfloat({ 
		duration: 600,
		offsetY: 150
	});

	$jQ('#mycart-block').draggable();
	
	$jQ('#mycart-block').insertBefore('.category-products .toolbar');
	
	$jQ('a[href=#totop]').click(function(){
	$jQ('html, body').animate({scrollTop:0}, 600);
	return false;
	}); 
	
	
});
