/***
var $ob_9 = { action: 'my_action', post: 'load_more_elements_into_catalog', view: 0, catalog_id: 9, count_into_page: 1, allow_lightbox: "on", show_thumbs: "on", thumbs_position: "before", show_description: "on", show_price: "on", price_text: "Price", show_linkbutton: "on", linkbutton_text: "View Product", parmalink: "http://www.binasolution.com/spare-part-komputer-aksesories/" };
/*** ***/
var allowZooming = 'off'; jQuery(function(){ var defaultBlockHeight=275; var defaultBlockWidth=275;
var $container = jQuery('#huge_it_catalog_container_9');
// add randomish size classes $container.find('.element_9').each(function(){ var $this = jQuery(this), number = parseInt( $this.find('.number').text(), 10 ); //alert(number); if ( number % 7 % 2 === 1 ) { $this.addClass('width2'); } if ( number % 3 === 0 ) { $this.addClass('height2'); } });
$container.hugeitmicro({ itemSelector : '.element_9', masonry : { columnWidth : 275+20+2 }, masonryHorizontal : { rowHeight: 300+20 }, cellsByRow : { columnWidth : 300+20, rowHeight : 240 }, cellsByColumn : { columnWidth : 300+20, rowHeight : 240 }, getSortData : { symbol : function( $elem ) { return $elem.attr('data-symbol'); }, category : function( $elem ) { return $elem.attr('data-category'); }, number : function( $elem ) { return parseInt( $elem.find('.number').text(), 10 ); }, weight : function( $elem ) { return parseFloat( $elem.find('.weight').text().replace( /[\(\)]/g, '') ); }, id : function ( $elem ) { return $elem.find('.id').text(); } } });
var $optionSets = jQuery('#huge_it_catalog_options_9 .option-set'), $optionLinks = $optionSets.find('a');
$optionLinks.click(function(){ var $this = jQuery(this);
if ( $this.hasClass('selected') ) { return false; } var $optionSet = $this.parents('.option-set'); $optionSet.find('.selected').removeClass('selected'); $this.addClass('selected');
var options = {}, key = $optionSet.attr('data-option-key'), value = $this.attr('data-option-value');
value = value === 'false' ? false : value; options[ key ] = value; if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) {
changeLayoutMode( $this, options ) } else {
$container.hugeitmicro( options ); }
return false; });
var isHorizontal = false; function changeLayoutMode( $link, options ) { var wasHorizontal = isHorizontal; isHorizontal = $link.hasClass('horizontal');
if ( wasHorizontal !== isHorizontal ) {
var style = isHorizontal ? { height: '75%', width: $container.width() } : { width: 'auto' };
$container.filter(':animated').stop();
$container.addClass('no-transition').css( style ); setTimeout(function(){ $container.removeClass('no-transition').hugeitmicro( options ); }, 100 ) } else { $container.hugeitmicro( options ); } }
$container.delegate('.title-block_9', 'click', function () { var strheight = 0; jQuery(this).parents('.element_9').find('.wd-catalog-panel_9 > div').each(function () { strheight += jQuery(this).outerHeight() + 10; }); strheight +=320; if (jQuery(this).parents('.element_9').hasClass("large")) { jQuery(this).parents('.element_9').animate({ height: "320px" }, 300, function () { jQuery(this).removeClass('large'); $container.hugeitmicro('reLayout'); }); jQuery(this).parents('.element_9').removeClass("active"); return false; }
jQuery(this).parents('.element_9').css({height: strheight}); jQuery(this).parents('.element_9').addClass('large');
$container.hugeitmicro('reLayout'); jQuery(this).parents('.element_9').css({height: "320px"});
jQuery(this).parents('.element_9').animate({ height: strheight + "px", }, 300, function () { $container.hugeitmicro('reLayout'); }); });
var $sortBy = jQuery('#huge_it_catalog_content_9 #sort-by'); jQuery('#huge_it_catalog_content_9 #shuffle a').click(function(){ $container.hugeitmicro('shuffle'); $sortBy.find('.selected').removeClass('selected'); $sortBy.find('[data-option-value="random"]').addClass('selected'); return false; });
// bind filter on select change jQuery(document).ready(function () { jQuery('#huge_it_catalog_filters_9 ul li').click(function () { // get filter value from option value var filterValue = jQuery(this).attr('rel'); // use filterFn if matches value filterValue = filterValue;//filterFns[ filterValue ] || $container.hugeitmicro({filter: filterValue}); });
jQuery(".element_9 .thumbs-block ul li a img").click(function (e) { var lightbox_is = "on"; if (lightbox_is != "on") { e.preventDefault(); var new_src = jQuery(this).attr("src"); // alert(new_src); var image = jQuery(this).closest(".element_9").find(".default-block_9 .image-block_9 img"); image.attr("src", new_src); zoom_start(); } }); });
jQuery(window).load(function(){
$container.hugeitmicro({ filter: '*' }); }); });