Subversion Repositories SmartDukaan

Rev

Rev 6959 | Rev 6968 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
6598 amit.gupta 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
74
 
4237 varun.gupt 75
	$('#shoppingExpInfo').click(function(){
76
		$.colorbox({
4284 varun.gupt 77
    		width: "550px",
78
    		height: "320px",
4237 varun.gupt 79
    		inline: true,
80
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 81
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
82
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
83
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 84
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 85
			onComplete: function(){
6261 amit.gupta 86
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 87
			}
4237 varun.gupt 88
    	});
89
	});
6245 kshitij.so 90
 
6552 kshitij.so 91
 
6959 kshitij.so 92
	$('.emiInfo').click(function(){
6453 kshitij.so 93
		$.colorbox({
6967 kshitij.so 94
    		width: "590px",
95
    		height: "480px",
6453 kshitij.so 96
    		inline: true,
6552 kshitij.so 97
    		href: "<h3 style='font-size: 14px; margin: 5px;'>EMI Details</h3><br />" +
6967 kshitij.so 98
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
99
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. Completely free for 3 months.<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
100
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
101
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
102
    		"<thead>"+
103
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
104
            "</thead>"+
105
            "<tbody>"+
106
            "<tr>"+
107
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
108
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
109
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
110
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
111
            "</tr>"+
112
            "<tr>"+
113
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
114
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
115
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
116
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>9.67%</td>"+
117
            "</tr>"+
118
            "</tbody>"+
119
            "</table>"+
120
            "<br>"+
121
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
122
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 123
    		"<br>"+
6967 kshitij.so 124
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
125
    		"</ul>"+
6959 kshitij.so 126
    		"<br>"+
6967 kshitij.so 127
    		"</div>"+
128
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
129
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months. Completely free for 3 months. <br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
130
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
131
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
132
    		"<thead>"+
133
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 134
            "</thead>"+
135
            "<tbody>"+
136
            "<tr>"+
6959 kshitij.so 137
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6967 kshitij.so 138
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
139
            "</tr>"+
140
            "<tr>"+
141
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
142
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
143
            "</tr>"+
144
            "</tbody>"+
145
            "</table>"+
146
            "<br>"+
147
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
148
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
149
    		"<br>"+
150
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
151
    		"</ul>"+
152
    		"<br>"+
153
    		"</div>"+
154
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
155
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
156
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
157
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
158
    		"<thead>"+
159
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='6'>All Inclusive Processing Fee*</th>"+
160
            "</thead>"+
161
            "<tbody>"+
162
            "<tr>"+
163
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 20%;'>Minimum Payment Amount</th>"+
164
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6959 kshitij.so 165
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
166
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
167
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
168
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
169
            "</tr>"+
6772 kshitij.so 170
            "<tr>"+
6967 kshitij.so 171
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>1500</td>"+
172
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
173
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
174
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
175
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
176
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6772 kshitij.so 177
            "</tr>"+
6967 kshitij.so 178
            "</tbody>"+
179
            "</table>"+
180
            "<br>"+
181
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
182
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
183
    		"<br>"+
184
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
185
    		"</ul>"+
186
    		"<br>"+
187
    		"</div>"+
188
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
189
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
190
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
191
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
192
    		"<thead>"+
193
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='6'>All Inclusive Processing Fee*</th>"+
194
            "</thead>"+
195
            "<tbody>"+
6772 kshitij.so 196
            "<tr>"+
6967 kshitij.so 197
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 20%;'>Minimum Payment Amount</th>"+
198
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
199
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
200
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
201
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
202
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6772 kshitij.so 203
            "</tr>"+
204
            "<tr>"+
6967 kshitij.so 205
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>1000</td>"+
206
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
207
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
208
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
209
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
210
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
211
            "</tr>"+
212
            "</tbody>"+
213
            "</table>"+
214
            "<br>"+
215
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
216
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
217
    		"<br>"+
218
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
219
    		"</ul>"+
220
    		"<br>"+
221
    		"</div>"+
222
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
223
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months. <br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
224
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
225
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
226
    		"<thead>"+
227
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='6'>All Inclusive Processing Fee*</th>"+
228
            "</thead>"+
229
            "<tbody>"+
230
            "<tr>"+
231
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 20%;'>Minimum Payment Amount</th>"+
232
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
233
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
234
            "</tr>"+
235
            "<tr>"+
6959 kshitij.so 236
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>1500</td>"+
6967 kshitij.so 237
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
238
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>5.58%</td>"+
6772 kshitij.so 239
            "</tr>"+
6967 kshitij.so 240
            "</tbody>"+
241
            "</table>"+
242
            "<br>"+
243
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
244
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
245
    		"<br>"+
246
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
247
    		"</ul>"+
248
    		"<br>"+
249
    		"</div>"+
250
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
251
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
252
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
253
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
254
    		"<thead>"+
255
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='6'>All Inclusive Processing Fee*</th>"+
256
            "</thead>"+
257
            "<tbody>"+
6772 kshitij.so 258
            "<tr>"+
6967 kshitij.so 259
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 20%;'>Minimum Payment Amount</th>"+
260
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
261
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
262
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
263
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6772 kshitij.so 264
            "</tr>"+
265
            "<tr>"+
6959 kshitij.so 266
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>2500</td>"+
6967 kshitij.so 267
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
268
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
269
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
270
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 271
            "</tr>"+
6967 kshitij.so 272
            "</tbody>"+
273
            "</table>"+
274
            "<br>"+
275
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
276
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
277
    		"<br>"+
278
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
279
    		"</ul>"+
280
    		"<br>"+
281
    		"</div>"+
282
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/kotak-icon.png' style='vertical-align: middle;'></div>"+
283
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-kotak\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
284
    		"<div id='emi-table-kotak' style='padding-left: 5px;display: none;'>"+
285
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
286
    		"<thead>"+
287
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='6'>All Inclusive Processing Fee*</th>"+
288
            "</thead>"+
289
            "<tbody>"+
6959 kshitij.so 290
            "<tr>"+
6967 kshitij.so 291
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 20%;'>Minimum Payment Amount</th>"+
292
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
293
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
294
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
295
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 296
            "</tr>"+
297
            "<tr>"+
6967 kshitij.so 298
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>500</td>"+
299
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
300
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
301
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
302
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
303
            "</tr>"+
304
            "</tbody>"+
305
            "</table>"+
306
            "<br>"+
307
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
308
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
309
    		"<br>"+
310
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
311
    		"</ul>"+
312
    		"<br>"+
313
    		"</div>"+
314
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/axis-icon.png' style='vertical-align: middle;'></div>"+
315
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a onclick='javascript:toggle(\"emi-table-axis\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
316
    		"<div id='emi-table-axis' style='padding-left: 5px;display: none;'>"+
317
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
318
    		"<thead>"+
319
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='6'>All Inclusive Processing Fee*</th>"+
320
            "</thead>"+
321
            "<tbody>"+
322
            "<tr>"+
323
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 20%;'>Minimum Payment Amount</th>"+
324
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
325
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
326
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
327
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
328
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
329
            "</tr>"+
330
            "<tr>"+
6959 kshitij.so 331
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>2500</td>"+
6967 kshitij.so 332
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
333
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
334
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
335
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
336
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6959 kshitij.so 337
            "</tr>"+
6967 kshitij.so 338
            "</tbody>"+
339
            "</table>"+
340
            "<br>"+
341
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
342
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
343
    		"<br>"+
344
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
345
    		"</ul>"+
346
    		"<br>"+
347
    		"</div>"+
348
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
349
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
350
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
351
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
352
    		"<thead>"+
353
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
354
            "</thead>"+
355
            "<tbody>"+
6959 kshitij.so 356
            "<tr>"+
6967 kshitij.so 357
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
358
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
359
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
360
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 361
            "</tr>"+
362
            "<tr>"+
6967 kshitij.so 363
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
364
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
365
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
366
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6959 kshitij.so 367
            "</tr>"+
6772 kshitij.so 368
            "</tbody>"+
369
            "</table>"+
370
            "<br>"+
6967 kshitij.so 371
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
372
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
373
    		"<br>"+
374
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
375
    		"</ul>"+
376
    		"<br>"+
377
    		"</div>"+
378
    		"<br><br>",
6453 kshitij.so 379
			onComplete: function(){
380
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
381
			}
382
    	});
383
	});
6245 kshitij.so 384
 
6792 vikram.rag 385
	$('a.mk_best_deal_detail').live('click', function(){
386
		var offerLinkHtml = '';
387
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 388
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 389
		}
390
		$.colorbox({
391
			width: "550px",
392
    		height: "300px",
393
    		inline: true,
394
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
395
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
396
    			'</p><span class="right">' + offerLinkHtml 
397
		});
398
	});
6453 kshitij.so 399
 
6792 vikram.rag 400
 
6245 kshitij.so 401
	$('#pickupstoreInfo').click(function(){
402
		$.colorbox({
403
    		width: "550px",
404
    		height: "370px",
405
    		inline: true,
406
    		href: "<h3>Frequently Asked Questions</h3><br />" +
407
		"<b>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
408
		"<b>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
409
		"<b>Q)</b> How do i avail this facility ?<br /><br />" +
410
		"<b>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
411
		"<b>Q)</b> When will the product be available for pickup ?<br /><br />" +
412
		"<b>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
413
 
414
			onComplete: function(){
6262 amit.gupta 415
				var ev = "Product Page";
6303 amit.gupta 416
				var label = window.location.pathname;
6264 amit.gupta 417
				if (label=="" || label=="#")
6261 amit.gupta 418
				{
6303 amit.gupta 419
					label = "";
6262 amit.gupta 420
					ev = "Home Page";
6261 amit.gupta 421
				}
6262 amit.gupta 422
				else if (label.indexOf("shipping") != -1){
423
					ev = "Shipping Page";
424
					var blkstr = [];
6263 amit.gupta 425
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 426
						blkstr.push(str);
427
					});
6303 amit.gupta 428
					label = blkstr.join(", ");
429
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
430
					ev = "Category Page";
431
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
432
					ev = "Product Page";
6262 amit.gupta 433
				}
6261 amit.gupta 434
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 435
			}
436
    	});
437
	});
4126 varun.gupt 438
 
5420 amit.gupta 439
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 440
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
441
		var widgetBox = $(this).siblings('.common-widget-content-area');
442
		var controlBox = $(this).siblings('.common-widget-control-bar');
443
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 444
 
4126 varun.gupt 445
		if (isColapsed)	{
446
			if(controlBox.length > 0)	{
447
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 448
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 449
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
450
				});
451
			} else	{
452
				$(widgetBox).slideDown();
453
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
454
			}
455
		} else	{
456
			$(widgetBox).slideUp(function(){
457
				$(controlBox).slideUp('fast');
458
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
459
			});
460
		}
461
		$(this).data('is_colapsed', !isColapsed);
462
	});
463
 
464
	/**
465
	 * Update count of products checked for comparison
466
	 **/
467
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 468
		updateCompareCount();
4126 varun.gupt 469
	});
470
 
471
	$("#research_compare").live('click', function(){
472
		var seldata = "";
5322 amit.gupta 473
		var prodnames = "";
4126 varun.gupt 474
		var tot = 1;
475
		var saprt = "";
476
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 477
		var haveSameProductType = true;
478
		var productType = null;
479
 
4126 varun.gupt 480
		$(par).each(function(){
4926 varun.gupt 481
 
482
			if(productType != null && productType != $(this).attr('producttype'))	{
483
				haveSameProductType = false;
484
			}
485
			productType = $(this).attr('producttype');
486
 
4126 varun.gupt 487
			if(tot == 1)	{
5358 amit.gupta 488
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 489
				seldata += "p" + tot + "=" + $(this).val();
490
			} else	{
491
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 492
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 493
			}
494
			tot ++;
495
		});
4984 varun.gupt 496
 
4926 varun.gupt 497
		if(! haveSameProductType)	{
498
			alert("Only products of same category can be compared");
499
		} else if(tot > 6)	{
4126 varun.gupt 500
			alert("Can compare upto five products only.");
501
		} else if(tot > 2)	{
5552 phani.kuma 502
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 503
		} else	{
504
			alert("Please select atleast two products");
505
		}
506
	});
507
 
508
	$("#research_delete").live('click', function(){
509
		var research_tot = $("#research_total").val();
510
		var seldata = [];
511
		var tot = 0;
512
		var saprt = "";
513
		var par = $('#myresearch').find('input[type=checkbox]:checked');
514
 
515
		$(par).each(function(){
516
			seldata.unshift($(this).val());
517
			tot ++;
518
		});
519
 
520
		if(tot > 0)	{
521
			var t = (research_tot * 1) - (tot * 1);
522
			$("#research_total").val(t);
523
 
524
			jQuery.ajax({
525
				type: "GET",
526
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
527
				success: function(msg)	{
528
					jQuery.each(seldata, function(intIndex, objValue){
529
						delete_from_storage_set("resitems", objValue);
530
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
531
							$(this).remove();
532
							if(t === 0)	{
533
								$("#research_default").css("display", "block");
534
							}
535
						});
536
					});
4984 varun.gupt 537
 
4922 varun.gupt 538
					//Updating the count
539
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 540
 
541
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
542
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
543
					}
4126 varun.gupt 544
				}
545
			});
546
		} else	{
547
			alert("Please select atleast one product");
548
		}
549
	});
550
 
551
	// No uid cookie
552
	if (!$.cookie("uid"))	{
553
		// No uid in storage
554
		if (!$.Storage.get("uid"))	{
555
			if (!$.Storage.get("resitems"))	{
556
				$.Storage.set("resitems", "[]");
557
			}
558
			if (!$.Storage.get("histitems"))	{
559
				$.Storage.set("histitems", "[]");
560
			}
561
		}
562
		else	{			// uid in storage : logout
563
			$.Storage.remove("uid");
564
			$.Storage.set("resitems", "[]");
565
			$.Storage.set("histitems", "[]");
566
		}
567
		load_research_widget();
568
		load_history_widget();
569
	}
570
	else	{				// With uid cookie
571
		var cookie = $.cookie("uid");
572
		// Just logged in merge storage items
573
		if (!$.Storage.get("uid"))	{
574
			$.Storage.set("uid", cookie);
575
			merge_history_items();
576
			load_research_items();
577
		}
578
		else	{
579
			// UID changed
580
			if ( cookie != $.Storage.get("uid"))	{
581
				$.Storage.set("uid", cookie);
582
				$.Storage.set("resitems", "[]");
583
				$.Storage.set("histitems", "[]");
584
				merge_history_items();
585
				load_research_items();
586
			}
587
			else	{		// Uid is same
588
				if (!$.Storage.get("resitems"))	{
589
					$.Storage.set("resitems", "[]");
590
					load_research_items();
591
				}
592
				else	{
593
					load_research_widget();
594
				}
595
 
596
				if (!$.Storage.get("histitems"))	{
597
					$.Storage.set("histitems", "[]");
598
					merge_history_items();
599
				}
600
				else	{
601
					load_history_widget();
602
				}
603
			}
604
		}
605
	}
4798 varun.gupt 606
 
607
	function load_research_items(){
608
		jQuery.ajax({
609
			type: "GET",
610
			url: "/myresearch",
611
			cache: false,
612
			success: function(json) {
613
			    $.Storage.set("resitems", json);
614
			    load_research_widget();
615
		    }
616
		});
617
	}
618
 
619
	function load_research_widget(){
620
		var myResearchWidgetContainer = $("#myresearch");
621
 
622
		if($(myResearchWidgetContainer).length == 0) {
623
			return;
624
		}
625
		var resitems = $.Storage.get("resitems");
626
 
627
		if (resitems == "[]") {
628
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
629
		      <tbody>\
630
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
631
		       </tbody>\
632
		      </table>';
633
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
634
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
635
			return;
636
		}
637
		var params = "/" + resitems;
638
 
639
		jQuery.ajax({
640
			type : "GET",
641
			url : "/myresearch" + params,
642
			cache: true,
643
			success : function(html) {
644
	   		    $("#myresearch").html(html);
645
	   			updateCompareCount();
646
 
647
			    // Product Title
648
			    $("#myresearch table td div a.truncate").each(function() {
649
						$(this).truncate({addtitle : true});
650
			    });
651
 
652
			    // Product Price
653
			    $("#myresearch table td div div.price").each(function() {
654
						$(this).truncate({addtitle : true});
655
				});
656
 
657
			    // Product Details
658
			    $("#myresearch table td div div.text").each(function() {
659
						$(this).truncate( {addtitle : true});
660
				});
661
		    }
662
		});
663
	}
4126 varun.gupt 664
});