Subversion Repositories SmartDukaan

Rev

Rev 1806 | Rev 1809 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1806 Rev 1807
Line 1... Line 1...
1
// Ebizon Move script js into the file
1
// Ebizon Move script js into the file
2
 
2
 
3
$(document).ready(function() {
-
 
4
  var SelectID;
-
 
5
  var subtract;
-
 
6
  var check = 0;
-
 
7
  var count = $('.comparision-product-column').length;
-
 
8
  if(count < 4) {
-
 
9
    if(count == 3) {
-
 
10
      subtract = 6;
-
 
11
    } else if(count == 2) {
-
 
12
      subtract = 3;
-
 
13
    } else {
-
 
14
      subtract = 0;
-
 
15
    }
-
 
16
    var parentWidth = $('#comparision-right').width();
-
 
17
    var width = (parentWidth - subtract)/count;
-
 
18
    var newWidth = parseInt(width);
-
 
19
    $('.product-name').width(newWidth);
-
 
20
    $('.comparision-product-column').width(newWidth);
-
 
21
  }
-
 
22
  var styleTrack = $('.jspTrack').attr('style');
-
 
23
  $('.jspTrackbottom').attr('style', styleTrack);
-
 
24
  var styleDrag = $('.jspDrag').attr('style');
-
 
25
  $('.jspDragbottom').attr('style', styleDrag);
-
 
26
  $('.ui-state-default').click(function(){
-
 
27
    var aID = $("li.ui-state-active").children('a:first').attr('href');
-
 
28
    var array = aID.split("#");
-
 
29
    var displayID = array[1];
-
 
30
    var new_aID = $(this).children('a:first').attr('href');
-
 
31
    var new_array = new_aID.split("#");
-
 
32
    var new_displayID = new_array[1];
-
 
33
    $('.'+displayID).each(function(){
-
 
34
      this.style.display = 'none';
-
 
35
      $(this).removeClass("comparision-block").addClass('comparision-hide');
-
 
36
    });
-
 
37
    if(new_displayID == 'vtab-1') {
-
 
38
   //   $('#comparision-right').removeClass("product-comparision-internal").addClass('product-comparision-home');
-
 
39
    //  $('.scroller-columns').hide();
-
 
40
    //  $('#comparision-summary-content').show();
-
 
41
    //  $('.comparision-page-title').hide();
-
 
42
    } else {
-
 
43
//      $('#comparision-right').removeClass("product-comparision-home").addClass('product-comparision-internal');
-
 
44
//      $('.scroller-columns').show();
-
 
45
 //     $('#comparision-summary-content').hide();
-
 
46
  //    $('.comparision-page-title').show();
-
 
47
    }
-
 
48
    $('.comparision-page-title').html(this.title);
-
 
49
    $('.ui-state-active').removeClass("ui-tabs-selected ui-state-active");
-
 
50
    $(this).addClass("ui-tabs-selected ui-state-active");
-
 
51
    $('.'+new_displayID).each(function() {
-
 
52
      var new_count = $('.'+new_displayID).length;
-
 
53
      if(new_count !== count) {
-
 
54
        $('.comparision-product-column').each(function(){
-
 
55
          var check_childern = $(this).find('.'+new_displayID).html();
-
 
56
          if(check_childern == null && check == 0) {
-
 
57
            $(this).append("<div class='"+new_displayID+" comparision-hide comparision-empty-column'><div class='featureslisting'><ul><li class='mainFeature'>No features listed.</li></ul></div></div>");
-
 
58
            check = 1;
-
 
59
          }
-
 
60
        });
-
 
61
      }
-
 
62
      $(this).removeClass("comparision-hide").addClass('comparision-block');
-
 
63
      this.style.display = 'block';
-
 
64
    });
-
 
65
    return false;
-
 
66
  });
-
 
67
  $('.comparision-hide').each(function(){
-
 
68
    this.style.display = 'none';
-
 
69
  });
-
 
70
});
-
 
71
 
3
 
72
$('#frmProceedToPay').submit(function(){
4
$('#frmProceedToPay').submit(function(){
73
	  //Tracking this click for Google Analytics
5
	  //Tracking this click for Google Analytics
74
	  _gaq.push(['_trackEvent', 'Order', 'Proceed to Pay', "", 2]);
6
	  _gaq.push(['_trackEvent', 'Order', 'Proceed to Pay', "", 2]);
75
	  return true;
7
	  return true;