jQuery.fn.styleSwitcher = function(){
	$(this).click(function(){
		loadStyleSheet(this);
		return false;
	});
	function loadStyleSheet(obj) {
		$.get( obj.$(this).attr('rel'),function(data){
			$('#stylesheet').attr('href','http://prettierpixels.com/intellidogs/wp-content/themes/intellidogs/style/css/' + data + '.css');
		});
	}
}

$(document).ready(function(){
	
	$('#selected_tab div').css('margin-top', '0');
	$('#selected_tab div').css('border-bottom', 'none');

	$("ul.tabs").tabs( "div.panes > div", { 
        effect: 'fade'
    });
    
    $(".store_item a[rel]").overlay({ 
	    
	     onBeforeLoad: function() {  
  
            // grab wrapper element inside content  
            var wrap = this.getOverlay().find(".contentWrap");  
            var self = this;  
  
            // load the page specified in the trigger 
            // + init events in its callback 
            wrap.load(this.getTrigger().attr("href"), function(){ 
                $('.close', this).click(function(){self.close()}); 
            }); // end wrap.load 
        },
        
        onClose : function() {
        	$(".contentWrap").html("");
        }
	     
	});
    
  $('#tab_nav a').styleSwitcher();
    
  flowplayer("gucci_player", "http://thedogsbody.co.uk/wp-content/themes/intellidogs/style/flv/flowplayer-3.1.5.swf");

});