Warning : A non-numeric value encountered in /www/wwwroot/elgzar.com/wp-content/plugins/product-catalog/Front_end/catalog_front_end_view.php on line 11
السعر",
show_linkbutton: "on",
linkbutton_text: "عرض المنتج",
parmalink: "https://elgzar.com/our-products/",
show_popup_linkbutton: "on"
};
/*** ***/
var allowZooming = 'off';
jQuery(function(){
var defaultBlockWidth=275;
var defaultBlockHeight=275;
var $container = jQuery('#huge_it_catalog_container_13');
// add randomish size classes
$container.find('.element_13').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_13',
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_13 .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( '.default-block_13', 'click', function(){
var strheight=0;
jQuery(this).parents('.element_13').find('.wd-catalog-panel_13 > div').each(function(){
strheight+=jQuery(this).outerHeight()+10;
//alert(strheight);
})
strheight+=320;
if(jQuery(this).parents('.element_13').hasClass("large")){
jQuery(this).parents('.element_13').animate({
height: "320px"
}, 300, function() {
jQuery(this).removeClass('large');
$container.hugeitmicro('reLayout');
});
jQuery(this).parents('.element_13').removeClass("active");
return false;
}
jQuery(this).parents('.element_13').css({height:strheight});
jQuery(this).parents('.element_13').addClass('large');
$container.hugeitmicro('reLayout');
jQuery(this).parents('.element_13').css({height:"320px"});
//alert(strheight);
jQuery(this).parents('.element_13').animate({
height:strheight+"px",
}, 300,function(){ $container.hugeitmicro('reLayout');});
});
var $sortBy = jQuery('#huge_it_catalog_content_13 #sort-by');
jQuery('#huge_it_catalog_content_13 #shuffle a').click(function(){
$container.hugeitmicro('shuffle');
$sortBy.find('.selected').removeClass('selected');
$sortBy.find('[data-option-value="random"]').addClass('selected');
return false;
});
jQuery(window).load(function(){
$container.hugeitmicro({ filter: '*' });
});
////filteringgggggg
// bind filter on select change
jQuery(document).ready(function(){
jQuery('#huge_it_catalog_filters_13 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 });
});
// var topmargin = jQuery("#huge_it_catalog_filters_13 ul").height();
// jQuery("#huge_it_catalog_options_13").css({'margin-top':parseInt(topmargin) + 5});
// var topmargin = jQuery("#huge_it_catalog_options_13").height();
// jQuery("#huge_it_catalog_filters_13").css({'margin-top':'5px'});
/* <-- VIEW 2 LOAD MORE CLICK */
/*
*/
/* VIEW 2 LOAD MORE CLICK --> */
/* <-- POPUP LEFT CLICK --> */
jQuery("#huge_it_catalog_popup_list_13 .heading-navigation_13 .left-change").click(function(){
//var strid = jQuery(this).closest(".pupup-element").prev(".pupup-element").find('a').data('popupid').replace('#','');
var height = jQuery(window).height();
//jQuery('#huge_it_gallery_pupup_element_'+strid).css({height:height*0.7});
var num = jQuery(this).find("a").attr("href").replace('#', '');
if(num >= 1){
var strid = jQuery(this).closest(".pupup-element").prev(".pupup-element").find('a').data('popupid').replace('#','');
jQuery('#huge_it_catalog_pupup_element_'+strid).css({height:height*0.7});
jQuery(this).closest(".pupup-element").removeClass("active");
jQuery(this).closest(".pupup-element").prev(".pupup-element").addClass("active");
}else{
var strid = jQuery("#huge_it_catalog_popup_list_13").find(".pupup-element").last().find('a').data('popupid').replace('#','');
jQuery('#huge_it_catalog_pupup_element_'+strid).css({height:height*0.7});
jQuery(this).closest(".pupup-element").removeClass("active");
jQuery("#huge_it_catalog_popup_list_13").find(".pupup-element").last().addClass("active");
}
if(jQuery('.pupup-element.active .description').height() + jQuery('.right-block h3').height() + 350 > jQuery('.pupup-element.active .right-block').height()){
if(jQuery('.pupup-element.active img').height() > jQuery('.pupup-element.active .image-block_13').height()){
jQuery('.pupup-element.active .right-block').css('overflow-y', '');
jQuery('.pupup-element.active .popup-wrapper_13').css('overflow-y', 'auto');
}else{
jQuery('.pupup-element.active .right-block').css('overflow-y', 'auto');
}
}else {
if(jQuery('.pupup-element.active img').height() > jQuery('.pupup-element.active .image-block_13').height()){
jQuery('.pupup-element.active .popup-wrapper_13').css('overflow-y', 'auto');
}
}
});
/* <-- POPUP RIGHT CLICK --> */
jQuery("#huge_it_catalog_popup_list_13 .heading-navigation_13 .right-change").click(function(){
var height = jQuery(window).height();
var num = jQuery(this).find("a").attr("href").replace('#', '');
var cnt = 0;
jQuery("#huge_it_catalog_popup_list_13").find(".pupup-element").each(function(){
cnt++;
});
// alert(num+" "+cnt);
if(num <= cnt){
var strid = jQuery(this).closest(".pupup-element").next(".pupup-element").find('a').data('popupid').replace('#','');
jQuery('#huge_it_catalog_pupup_element_'+strid).css({height:height*0.7});
jQuery(this).closest(".pupup-element").removeClass("active");
jQuery(this).closest(".pupup-element").next(".pupup-element").addClass("active");
}else{
var strid = jQuery("#huge_it_catalog_popup_list_13").find(".pupup-element:first-child a").data('popupid').replace('#','');
jQuery('#huge_it_catalog_pupup_element_'+strid).css({height:height*0.7});
jQuery(this).closest(".pupup-element").removeClass("active");
jQuery("#huge_it_catalog_popup_list_13").find(".pupup-element:first-child").addClass("active");
}
if(jQuery('.pupup-element.active .description').height() + jQuery('.right-block h3').height() + 350 > jQuery('.pupup-element.active .right-block').height()){
if(jQuery('.pupup-element.active img').height() > jQuery('.pupup-element.active .image-block_13').height()){
jQuery('.pupup-element.active .right-block').css('overflow-y', '');
jQuery('.pupup-element.active .popup-wrapper_13').css('overflow-y', 'auto');
}else{
jQuery('.pupup-element.active .right-block').css('overflow-y', 'auto');
}
}else {
if(jQuery('.pupup-element.active img').height() > jQuery('.pupup-element.active .image-block_13').height()){
jQuery('.pupup-element.active .popup-wrapper_13').css('overflow-y', 'auto');
}
}
});
//////
});
});
jQuery(document).ready(function(){
jQuery('body').delegate('.element_13 .image-block_13 .image-overlay a', 'click', function() {
var strid = jQuery(this).attr('href').replace('#','');
jQuery('body').append('');
jQuery('#huge_it_catalog_popup_list_13').insertBefore('#huge-popup-overlay_13');
var height = jQuery(window).height();
var width=jQuery(window).width();
if(width<=767){
jQuery('body').scrollTop(0);
}
jQuery('#huge_it_catalog_pupup_element_'+strid).addClass('active').css({height:height*0.7});
jQuery('#huge_it_catalog_popup_list_13').addClass('active');
jQuery('#huge_it_catalog_pupup_element_'+strid+' ul.thumbs-list_13 li:first-child').addClass('active');
var strsrc=jQuery('#huge_it_catalog_pupup_element_'+strid+' ul.thumbs-list_13 li:first-child a img').attr('src');
jQuery('#huge_it_catalog_pupup_element_'+strid+' .image-block_13 img').attr('src',strsrc);
//alert(strsrc);
if(jQuery('.pupup-element.active .description').height() + jQuery('.right-block h3').height() + 350 > jQuery('.pupup-element.active .right-block').height()){
if(jQuery('.pupup-element.active img').height() > jQuery('.pupup-element.active .image-block_13').height()){
jQuery('.pupup-element.active .right-block').css('overflow-y', '');
jQuery('.pupup-element.active .popup-wrapper_13').css('overflow-y', 'auto');
}else{
jQuery('.pupup-element.active .right-block').css('overflow-y', 'auto');
}
}else {
if(jQuery('.pupup-element.active img').height() > jQuery('.pupup-element.active .image-block_13').height()){
jQuery('.pupup-element.active .popup-wrapper_13').css('overflow-y', 'auto');
}
}
return false;
});
jQuery('body').delegate('#huge_it_catalog_popup_list_13 .popup-wrapper_13 .right-block ul.thumbs-list_13 li a', 'click', function() {
var width=jQuery(window).width();
if(width<=767){
jQuery('body').scrollTop(0);
}
jQuery(this).parent().parent().find('li.active').removeClass('active');
jQuery(this).parent().addClass('active');
jQuery(this).parents('.right-block').prev().find('img').attr('src',jQuery(this).find('img').attr('src'));
return false;
});
jQuery('body').delegate('#huge_it_catalog_popup_list_13 .heading-navigation_13 .close', 'click', function() {
closePopup();
return false;
});
jQuery('body').on('click','#huge-popup-overlay_13',function(){
closePopup();
return false;
});
function closePopup() {
jQuery('#huge-popup-overlay_13').remove();
jQuery('#huge_it_catalog_popup_list_13 li').removeClass('active');
jQuery('#huge_it_catalog_popup_list_13').removeClass('active');
}
});
Hessian Shopping Bags , Packaging Bags