﻿$(document).ready(function(){
  $("a.overlay").overlay({ 
        expose: '#366e7b', 
        effect: 'apple', 
        onBeforeLoad: function() {
//        	$('.contentWrap').attr('src','http://www.storecommander.com/demosub/index.php');
        	$('.contentWrap').attr('src',this.getTrigger().attr("href"));
//        	$('.contentWrap').css('height','0px');
/*        	var wrap = this.getContent().find(".contentWrap"); 
          wrap.load(this.getTrigger().attr("href"));*/
//        	$('.contentWrap').css('height','526px');
/*        	$.get(this.getTrigger().attr("href"),function(){
        		});*/
        }
/*        ,
        onLoad: function() {
          var wrap = this.getContent().find(".contentWrap"); 
          wrap.load(this.getTrigger().attr("href"));
          alert(this.getTrigger().attr("href"));
        }*/
    }); 

  $("a.overlay2").overlay({ 
        expose: '#366e7b', 
        effect: 'apple', 
        onBeforeLoad: function() {
        	$('.contentWrap2').attr('src',this.getTrigger().attr("href"));
        }
    }); 


});


$(document).ready(function(){
// main vertical scroll 
$("#scrollablemain").scrollable({ 
 
    // basic settings 
    vertical: true, 
    size: 1, 
    clickable: false, 
 
    // up/down keys will always control this scrollable 
    keyboard: 'static', 
 
    // assign left/right keys to the actively viewed scrollable 
    onSeek: function(event, i) { 
        horizontal.scrollable(i).focus(); 
    } 
 
// main navigator (thumbnail images) 
}).navigator("#main_navi"); 
 
// horizontal scrollables. each one is circular and has its own navigator instance 
var horizontal = $(".scrollable").scrollable({clickable: false,size: 1}).circular().navigator(".navi"); 
 
 
// when page loads setup keyboard focus on the first horzontal scrollable 
horizontal.eq(0).scrollable().focus();
});