$.fn.equalHeight = function ()
{
	var tallest = 0;
	this.each(function(){
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	$(this).height(tallest);
	return true;
}




$(function() {
		   $('#shop').jcarousel({visible: 5, scroll: 2, auto: 2, wrap: 'last'	} );
		   $('#shop li img').hover(function(){
		   	this_title = $(this).attr('alt');
		   	$('#shop_title').html('<p>'+this_title+'</p>');
		   }, function() {
		   	$('#shop_title p').html('');
		   	
		   });
		   
		   $('.slideshow').cycle({fx: 'fade' });
		   $(".slider_items p").hide();
		   
    // $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 8000, true); 
  $('#slider_tovar ul').jcarousel({scroll:1, auto:5, wrap: 'last', vertical:true});  
  
  // submit fix
  $('#search form').keypress(function(event) {
  if (event.keyCode == '13') {
     $(this).submit();
   }});
   
   // iworld shop menu 
   $('.iw_shop_menu').wrap('<div class="iw_shop_wr1" />').wrap('<div class="iw_shop_wr2" />');
   
     $('.sidebar_height').equalHeight();
	 $(window).load(function(){$('.mini_item').equalHeight();});

	// pagination
	$('.pagination .ditto_page').hide();
	$('.pagination .ditto_currentpage').next().show().next().show();
	$('.pagination .ditto_currentpage').prev().show().prev().show();
	$('.pagination .ditto_page:last, .pagination .ditto_page:first ').show();

});

function galleryCounts () {return true;}  