<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/SIG/Puntos/MaterTemplate.Master" CodeBehind="Busqueda.aspx.vb" Inherits="SGHweb.Busqueda" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <section class="container">
  <ul class="menu" runat="server" id="menu3">
    <li><a href="Default.aspx?hotel=<%= Session("hotel").ToString()%>">Volver al Catalogo..</a></li>
    <li id="linkcesta" runat="server"><a href="Carrito.aspx">Cesta de Productos..</a></li>
    <div id="search" class="pull-right">
        <input type="text" class="buscarP" id="buscarP" name="search" placeholder="Buscar" value="" />
        <div class="button-search pavicon-search">&nbsp;</div>
    </div>
</ul>
	

<h3>Resultados para: <%= Server.HtmlEncode(Request.QueryString("q"))%></h3>


<div class="category-product">
		
		<div class="product-list"  id="grilla_productos" runat="server"> 			
		</div>
	
</div>	
		
	
	
<script type="text/javascript">
<!--
    function display(view) {
        if (view == 'list') {
            $('.product-grid').attr('class', 'product-list');

            $('.product-list .item').each(function (index, element) {
                html = '<div class="right">';
                html += '  <div class="cart">' + $(element).find('.cart').html() + '</div>';
                html += '  <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
                html += '  <div class="compare">' + $(element).find('.compare').html() + '</div>';
                html += '</div>';

                html += '<div class="left">';

                var image = $(element).find('.image').html();

                if (image != null) {
                    html += '<div class="image">' + image + '</div>';
                }

                var price = $(element).find('.price').html();

                if (price != null) {
                    html += '<div class="price">' + price + '</div>';
                }

                html += '  <div class="name">' + $(element).find('.name').html() + '</div>';
                html += '  <div class="description">' + $(element).find('.description').html() + '</div>';

                var rating = $(element).find('.rating').html();

                if (rating != null) {
                    html += '<div class="rating">' + rating + '</div>';
                }

                html += '</div>';

                $(element).html(html);
            });

            $('.display').html('<li><span>Display:</span></li><li><a title="" onclick="display(\'grid\');" class="pavicon-grid"></a></li><li><a title="" onclick="display(\'list\');" class="active pavicon-list"></a></li>');

            $.totalStorage('display', 'list');

        } else {

            $('.product-list').attr('class', 'product-grid');

            $('.product-grid .item').each(function (index, element) {

                html = '';

                var image = $(element).find('.image').html();

                if (image != null) {
                    html += '<div class="image">' + image + '</div>';
                }

                html += '<div class="name">' + $(element).find('.name').html() + '</div>';
                html += '<div class="description">' + $(element).find('.description').html() + '</div>';

                var price = $(element).find('.price').html();

                if (price != null) {
                    html += '<div class="price">' + price + '</div>';
                }

                var rating = $(element).find('.rating').html();

                if (rating != null) {
                    html += '<div class="rating">' + rating + '</div>';
                }

                html += '<div class="cart">' + $(element).find('.cart').html() + '</div>';
                html += '<div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
                html += '<div class="compare">' + $(element).find('.compare').html() + '</div>';

                $(element).html(html);

            });


            $('.display').html('<li><span>Display:</span></li><li><a title="" onclick="display(\'grid\');" class="active pavicon-grid"></a></li><li><a title="" onclick="display(\'list\');" class="pavicon-list"></a></li>');


            $.totalStorage('display', 'grid');
        }
    }

    view = $.totalStorage('display');

    if (view) {
        display(view);
    } else {
        display('grid');
    }

//-->
</script>
</asp:Content>
