2011-11-09 01:34:15 +00:00
|
|
|
var $j = jQuery.noConflict();
|
|
|
|
$j(document).ready(function(){
|
2012-02-06 18:53:25 +00:00
|
|
|
// caching selections to speed up response
|
2012-02-07 18:41:21 +00:00
|
|
|
var tabs = $j('ul.tabs');
|
2012-02-06 18:53:25 +00:00
|
|
|
var tabsId = $j('#tabs');
|
|
|
|
var tabs1 = $j('.tabs1');
|
|
|
|
var tabs2 = $j('.tabs2');
|
|
|
|
var tabs3 = $j('.tabs3');
|
2012-02-08 13:56:44 +00:00
|
|
|
var tabsDash1 = $j('.tabs-1');
|
|
|
|
var tabsDash2 = $j('.tabs-2');
|
|
|
|
var tabsDash3 = $j('.tabs-3');
|
|
|
|
var tabsLink1 = $j('li.tabs1');
|
|
|
|
var tabsLink2 = $j('li.tabs2');
|
|
|
|
var tabsLink3 = $j('li.tabs3');
|
2012-02-06 18:53:25 +00:00
|
|
|
var contentBlockContent = $j('#content-block-content');
|
|
|
|
|
2012-03-01 14:11:06 +00:00
|
|
|
// on pageload we are showing only the Active tab, not Unglued or Wishlisted
|
2012-03-02 14:40:10 +00:00
|
|
|
if (location.hash == "#1" || location.hash == "#2" || location.hash == "#3") {
|
|
|
|
tab = location.hash;
|
|
|
|
} else {
|
|
|
|
tab = $j('#locationhash').html();
|
|
|
|
}
|
2012-03-02 15:28:37 +00:00
|
|
|
|
2012-03-02 14:40:10 +00:00
|
|
|
if(tab == "#1") {
|
2012-02-24 16:37:06 +00:00
|
|
|
tabsDash2.hide();
|
|
|
|
tabsDash3.hide();
|
|
|
|
tabsLink1.addClass('active');
|
2012-03-02 14:40:10 +00:00
|
|
|
} else if(tab =="#2") {
|
2012-03-01 14:11:06 +00:00
|
|
|
tabsDash1.hide();
|
|
|
|
tabsDash3.hide();
|
|
|
|
tabsLink2.addClass('active');
|
2012-03-02 14:40:10 +00:00
|
|
|
} else {
|
|
|
|
tabsDash1.hide();
|
|
|
|
tabsDash2.hide();
|
|
|
|
tabsLink3.addClass('active');
|
2012-02-24 16:37:06 +00:00
|
|
|
}
|
2012-02-22 03:00:23 +00:00
|
|
|
|
2012-02-06 18:53:25 +00:00
|
|
|
tabs1.click(function(){
|
|
|
|
tabs.find('.active').removeClass('active');
|
2012-02-08 13:56:44 +00:00
|
|
|
tabsLink1.addClass('active');
|
2012-02-06 18:53:25 +00:00
|
|
|
contentBlockContent.find('.active').removeClass('active');
|
|
|
|
tabsDash1.addClass('active').show(300);
|
|
|
|
tabsDash2.hide(200);
|
|
|
|
tabsDash3.hide(200);
|
|
|
|
tabsId.removeClass('wantto').removeClass('ungluing').addClass('unglued');
|
2012-02-24 16:37:06 +00:00
|
|
|
location.hash = "#1";
|
2011-11-09 01:34:15 +00:00
|
|
|
});
|
2012-02-06 18:53:25 +00:00
|
|
|
tabs2.click(function(){
|
|
|
|
tabs.find('.active').removeClass('active');
|
2012-02-08 13:56:44 +00:00
|
|
|
tabsLink2.addClass('active');
|
2012-02-06 18:53:25 +00:00
|
|
|
contentBlockContent.find('.active').removeClass('active');
|
|
|
|
tabsDash2.addClass('active').show(300);
|
|
|
|
tabsDash1.hide(200);
|
|
|
|
tabsDash3.hide(200);
|
|
|
|
tabsId.removeClass('unglued').removeClass('wantto').addClass('ungluing');
|
2012-02-24 16:37:06 +00:00
|
|
|
location.hash = "#2";
|
2011-11-09 01:34:15 +00:00
|
|
|
});
|
2012-02-06 18:53:25 +00:00
|
|
|
tabs3.click(function(){
|
|
|
|
tabs.find('.active').removeClass('active');
|
2012-02-08 13:56:44 +00:00
|
|
|
tabsLink3.addClass('active');
|
2012-02-06 18:53:25 +00:00
|
|
|
contentBlockContent.find('.active').removeClass('active');
|
|
|
|
tabsDash3.addClass('active').show(300);
|
|
|
|
tabsDash2.hide(200);
|
|
|
|
tabsDash1.hide(200);
|
|
|
|
tabsId.removeClass('unglued').removeClass('ungluing').addClass('wantto');
|
2012-02-24 16:37:06 +00:00
|
|
|
location.hash = "#3";
|
2011-11-09 01:34:15 +00:00
|
|
|
});
|
|
|
|
$j('.empty-wishlist span.bounce-search').click(function(){
|
|
|
|
$j('div.js-search-inner').effect("bounce", 500, function() {
|
|
|
|
$j('div.js-search-inner input[type="text"]').focus();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|