/*
$(document).ready(function(){
	$('#contents').shadow({ color: "#a6a6a6", offset: 5 });	
	$('.first-result').shadow({ color: "#e5e5e5", offset: 4 });
});
*/

win = false;
function popup(url, w, h) {
	if ( (win) && (!win.closed) ) {
		win.location = url;
		win.focus();
	} else {
		win = window.open((url), 'popupwin', 'top=10,left=10,width='+w+',height='+h+',resizable=yes,toolbar=no,status=yes,scrollbars=yes');
		win.focus();
	}
}

$(document).ready(function(){
      $("li.discover-tab").mouseover(
          function () {
            $('div.tab1-menu').show();
          }
      );
      
      $("li.discover-tab").mouseout(
          function () {
            $('div.tab1-menu').hide();
          }
      );

    $("div.discover-menu").hover(
      function () {
        $('div.tab1-menu').show();
      }, 
      function () {
        $('div.tab1-menu').hide();
      }
    );
		
		/*
    //this is the script to popup content on gallery tile view page
    $('#gallery-list div.result').each(function(){

        // get the content to popup
        var popup_content = $(this).find('div.details').clone();
        var popup_container = $(this).find('div.popup-box');

        $(this).find('a.image').hover(
            function(){
                popup_container.hide();
                popup_container.html( popup_content ).show();
                popup_container.css({width:"202px", "padding":"10px"});
            },
            function(){
                popup_container.hide();
            }
        );
        
        $(this).find('div.popup-box').hover(
            function(){
                popup_container.hide();
                popup_container.html( popup_content ).show();
                popup_container.css({width:"202px", "padding":"10px"});
            },
            function(){
                popup_container.hide();
            }
        );
    });
    
    $('#gallery-list div.first-result').each(function(){
        
        // get the content to popup
        var popup_content = $(this).find('div.details').clone();
        var popup_container = $(this).find('div.popup-box');

        $(this).find('a.image').hover(
            function(){
                popup_container.hide();
                popup_container.html( popup_content ).show();
                popup_container.css({width:"202px", "padding":"10px"});
            },
            function(){
                popup_container.hide();
            }
        );
        
        $(this).find('div.popup-box').hover(
            function(){
                popup_container.hide();
                popup_container.html( popup_content ).show();
                popup_container.css({width:"202px", "padding":"10px"});
            },
            function(){
                popup_container.hide();
            }
        );
    });
		*/
    
    $('a.more-categories').click(function(){
    
            $('div.categories-expand').show();
            $('a.more-categories').hide();
    });
     
    $('a.close-categories').click(function(){
    
            $('div.categories-expand').hide();
            $('a.more-categories').show();
    });
     
});