$(document).ready(function(){
        
/*
 * Read More / Collapse button script starts here
 */
        
            $(".content_home_txt").hide();
            $flag = 1;
            $(".read_more").click(function(){
                $(".content_home_txt").slideToggle("slow");
                if($flag == 1)
                {
                    $(this).attr("title",'Collapse');
                    $(this).removeClass("read_more");
                    $(this).addClass("collapse");
                    $flag = 0;
                }
                else{
                    $(this).attr("title",'Read More');
                    $(this).removeClass("collapse");
                    $(this).addClass("read_more");
                    $flag = 1;
                }
            });

/*
 * Sub category menu listing in left panel
 */
            var curr="";
            var curr_url = location.href;
            var curr_sub_cat_name = curr_url.substring(curr_url.lastIndexOf('/')+1);
                
            /*$(".left_main_nav").parents("li").children("ul").hide();
            $(".left_main_nav").click(
                function(){
                if($(this).parents("li").children("ul").css('display')!="block")
                {
                    $(".left_main_nav").parents("li").children("ul").hide();
                    $(this).parents("li").children("ul").show();
                }
                else{
                    $(this).parents("li").children("ul").hide();
                }
            }
            );*/

/*
 * Brands listing on mouse click / hover
 */
            $("#brand_list").css("display","none");
            $("#floatbrands").hover(
                function () {
                    $("#brand_list").css("display","block");
//					// on hovering over find the element we want to fade *up*
//					var fade = $('> .hoverbrandslist', this);
//
//					// if the element is currently being animated (to fadeOut)...
//					if (fade.is(':animated')) {
//						fade.fadeIn(500);
//					} else {
//						// ...stop the current animation, and fade it to 1 from current position
//						fade.stop().fadeTo(500, 1);
//					}
				},
//				function () {
//					var fade = $('> .hoverbrandslist', this);
//					if (fade.is(':animated')) {
//						fade.fadeOut(500);
//
//					} else {
//						fade.stop().fadeTo(500, 0);
//					}
//				},
				function () {
						$("#brand_list").css("display","none");
				}
            );
            /*
            $(".left_brand_nav").click(function(){
                if($("#brand_list").css("display") != "none")
                {
                    $("#brand_list").css("display","none");
                }
                else{
                    $("#brand_list").css("display","block");
                }
            });*/

/*
 * Superfish menu, Lightbox function call
 */

            $(function(){
                $('ul.sf-menu li').css("overflow","visible");
                $('ul.sf-menu').superfish();
            });

            $('a.lightbox').lightBox();
            /*$('.newsImg').lightBox();*/
});
//<![CDATA[
function check_empty()
{
  if($('#query').val() == 'Product Search' || $('#query').val() == '')
  {
    alert_box('<h1>Error<\/h1><p class="alert_desc">Please enter a valid keyword for the Product Search.</p>');
    return false;
  }
}
//]]>
