// -------------- SCREEN RESOLUTION
function screenres()
{
if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) {
var wdth = 950; //Change this variable to match your configuration
document.body.style.zoom = screen.width/950;
document.Fm.TxAre.value=950;

}
}

//----------------- CHECKBOX
function SetHTML1(type) {
	$('.checkbox').change(function(event){
			checked_value = $(this).val();			
			if(this.checked)
			{
		document.getElementById("checked_value").style.display = "none"
		// Using style.display="block" instead of style.display="" leaves a carriage return
		document.getElementById(type).style.display = ""
	}
	}); 
			}

//----------------- PAGINATION
function pageselectCallback(page_index, jq){
                var new_content = $('#hiddenresult div.result:eq('+page_index+')').clone();
                $('#Searchresult').empty().append(new_content);
                return false;
            }
           

            function initPagination() {
                var num_entries = $('#hiddenresult div.result').length;
                // Create pagination element
                $("#Pagination").pagination(num_entries, {
                    num_edge_entries: 2,
                    num_display_entries: 8,
                    callback: pageselectCallback,
                    items_per_page:1
                });
             }
                    
      
            $(document).ready(function(){      
                $('#hiddenresult').load('snippet.html', null, initPagination);
            });
            
//------------------- SHOPPING CART SLIDE
$(document).ready(function(){
 
	$(".btn-slide").click(function(){
		$("#panel").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
	
	 
});

//------------------- MEMBER LOGIN
jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loadingImage : 'images/loading.gif',
        closeImage   : 'images/closelabel.png'
      })
    })

//------------------- SELECTED SIZES
function SetHTML1(type) {
	$('.checkme').change(function(event){
			checked_value = $(this).val();			
			if(this.checked)
			{
		document.getElementById("checked_value").style.display = "none"
		// Using style.display="block" instead of style.display="" leaves a carriage return
		document.getElementById(type).style.display = ""
	}
	}); 
			}
//------------------------ PRODUCT INFO TABS
$(document).ready(function() {
 
	$('.tabs a').click(function(){
		switch_tabs($(this));
	});
 
	switch_tabs($('.defaulttab'));
 
});
 
function switch_tabs(obj)
{
	$('.tab-content').hide();
	$('.tabs a').removeClass("selectedtab");
	var id = obj.attr("rel");
 
	$('#'+id).show();
	obj.addClass("selectedtab");
}

//-
