var globalErr=1;var SearchType="partial";var searchDisplayDivId=(searchDisplayType=="overlay")?"search_dropdown":"content";var pager1=new Pager('overlaySearchResultId',3);jQuery(document).ready(function()
{var prev='';if(document.getElementById("gallery_right"))
{jQuery("#gallery_right").css({height:"196px",width:"196px"});}
if(jQuery("#left_menu").attr("class")=="left_menu")
{document.getElementById('content').style.marginLeft=184+"px";jQuery("#content").css({width:"547px"});}});function showform(id)
{document.getElementById(id).style.display="block";}
function hideform(id)
{document.getElementById(id).style.display="none";}
jQuery(document).ready(function(){function loadHeaderImages()
{var json_array_object=eval(array_of_header_images);var str='';var imgStr='';jQuery.each(json_array_object,function(key,value){str+='<img src="_images/_header_images/_frontend/'+value+'" alt=""/>';});jQuery(".header_images").append(str);}
loadHeaderImages();if(document.getElementById("header_images"))
{if(jQuery("#header_images img").length>1)
{jQuery('#header_images').cycle({fx:'fade',timeout:6000,delay:-2000,speed:3000,random:true});}}
jQuery('.submenu ul:first').css('width','119px');jQuery('.submenu ul:last').css('width','119px');jQuery('.submenu ul:first li,.submenu ul:last li').css('padding','0px 0px 0px 9px');if(jQuery('.left_container').children().length==0&&jQuery('.right_container').children().length>=1)
{jQuery('.main_content').css({"width":"720px","padding":"0px 0px 0px 0px"});jQuery('.main_content_inner').css("padding","0px 17px 0px 13px");jQuery('.left_container').remove();}
else if(jQuery('.right_container').children().length==0&&jQuery('.left_container').children().length>=1)
{jQuery('.main_content').css({"width":"720px","padding":"0px 0px 0px 0px"});jQuery('.main_content_inner').css("padding","0px 0px 0px 13px");jQuery('.right_container').remove();}
else if(jQuery('.right_container').children().length==0&&jQuery('.left_container').children().length==0)
{jQuery('.main_content').css({"width":"930px","padding":"0px 0px 0px 0px"});jQuery('.main_content_inner').css("padding","0px 0px 0px 13px");jQuery('.left_container').remove();jQuery('.right_container').remove();}
jQuery('.producers_submenu').hide();jQuery('.producer').click(function(){jQuery(this).next().slideToggle();});jQuery('#sKey').focus(function(){searchDefaultText=jQuery(this).attr("value");jQuery(this).attr("value","");});jQuery("#sKey").blur(function(){if(jQuery(this).attr("value")=='')
jQuery(this).attr("value",searchDefaultText);});});jQuery('.producers_list').click(function(){jQuery('.producers_names_list').find('a').removeClass('selected');jQuery(this).children('a').addClass('selected');categoryproducerId=jQuery(this).children('.producer_id').val();jQuery.ajax({url:siteURL+"productsinfo.php",type:'POST',data:{"producerId":categoryproducerId},success:function(msg)
{if(msg!=''){jQuery('.details_container').replaceWith(msg);jQuery('.group_names').click(function(){fetchChildGroups(this);});}},error:function(XMLHttpRequest,textStatus,errorThrown)
{alert('Error occured : '+XMLHttpRequest+" \n "+textStatus+"\n"+errorThrown);}});});jQuery('.groups_list').click(function(){jQuery('.groups_names_list').find('a').removeClass('selected');jQuery(this).children('a').addClass('selected');categorygroupId=jQuery(this).children('.group_id').val();jQuery.ajax({url:siteURL+"productsinfo.php",type:'POST',data:{"groupId":categorygroupId},success:function(msg)
{if(msg!=''){jQuery('.details_container').replaceWith(msg);jQuery('.child_group_name').click(function(){fetchProducts(this);});}},error:function(XMLHttpRequest,textStatus,errorThrown)
{alert('Error occured : '+XMLHttpRequest+" \n "+textStatus+"\n"+errorThrown);}});});jQuery('.group_names').click(function(){fetchChildGroups(this);});function fetchChildGroups(objThis){jQuery('.producer_names').find('a').removeClass('selected');jQuery('.sub_categorie').remove();jQuery('.download_pdf').remove();jQuery(objThis).children('a').addClass('selected');categoryparentGroupId=jQuery(objThis).children('.parent_group_id').val();jQuery.ajax({url:siteURL+"productsinfo.php",type:'POST',data:{"parentGroupId":categoryparentGroupId},success:function(msg)
{if(msg!=''){jQuery(msg).insertAfter('.producer_description');jQuery('.child_group_name').click(function(){fetchProducts(this);});}},error:function(XMLHttpRequest,textStatus,errorThrown)
{alert('Error occured : '+XMLHttpRequest+" \n "+textStatus+"\n"+errorThrown);}});}
function fetchProducts(objThis){jQuery('.sub_group_names').find('a').removeClass('selected');jQuery('.download_pdf').remove();jQuery(objThis).children('a').addClass('selected');categorychildGroupId=jQuery(objThis).children('.child_group_id').val();jQuery.ajax({url:siteURL+"productsinfo.php",type:'POST',data:{"childGroupId":categorychildGroupId},success:function(msg)
{if(msg!=''){jQuery(msg).insertAfter('.sub_categorie');}},error:function(XMLHttpRequest,textStatus,errorThrown)
{alert('Error occured : '+XMLHttpRequest+" \n "+textStatus+"\n"+errorThrown);}});}
$(function(){if(jQuery("#slider ul li").length>1)
{jQuery("#slider").easySlider({auto:false,continuous:true});jQuery(".photo_slider span#nextBtn a").hide().fadeIn(1000);jQuery(".photo_slider span#nextBtn").hover(function()
{if(jQuery(".photo_slider span#nextBtn a").css("display","block"))
{jQuery(".photo_slider span#nextBtn a").css("display","block");}},function()
{if(jQuery(".photo_slider span#nextBtn a").css("display","block"))
{jQuery(".photo_slider span#nextBtn a").css("display","none");}});}
jQuery(".photo_slider span#prevBtn").hover(function()
{if(jQuery(".photo_slider span#nextBtn a").css("display","block"))
{jQuery(".photo_slider span#nextBtn a").css("display","none");}});});
